Parallax 27986 Скачать руководство пользователя страница 12

599 Menlo Drive • # 100 • Rocklin, CA 95765

Sales / Technical Support  - Tel: (916) 624-8333    Fax: (916) 624-8003

Web: http://www.parallaxinc.com  or  http://www.stampsinclass.com • Email: [email protected]

 1-27-2000, V1.0 • Mfg. by www.

RFDigital.com

 

     

Page 

12

RF MODULES

n+3 doesn’t exist).  The second method is based on a Cyclic-Redundancy-Check algorithm.  The CRC16, as it is
called, uses a sophisticated equation to calculate a checksum that catches 99% of transmission errors and is
unaffected by symmetrical data.  (If this method is used, Byte n+3 is the last byte of the packet).

The Master and Slave use an acknowledge-based protocol to communicate with each other.  The process works
in the following fashion:

a)  The Master decides to send some data.

i) 

It creates a new packet number (previous packet 1).

ii)  It builds a packet, one byte at a time, calculating the checksum (using the XOR or the CRC method)

for each byte.  It finishes the packet by appending the checksum (1 or 2 bytes) to the end.

iii)  It transmits the entire packet.

b)  The Slave periodically checks for incoming data.

i) 

If a packet arrives, it calculates a checksum (using the same method as the Master).

ii)  If the calculated checksum matches the received checksum, the Slave transmits a positive

acknowledgement to the Master (by simply transmitting the checksum).

iii)  If the calculated checksum does not match the received checksum, the Slave transmits a negative

acknowledgement to the Master (by simply transmitting the one’s-compliment form of the checksum).

iv)  If the packet is good (as determined by step ii above) the Slave verifies that that packet number is not

the same as the previous packet’s (indicating that a duplicate was received) and processes the data
of the packet.  In this example, the process is simply to pass the data on to the Serial LCD Display.  If
the packet number is the same, the packet is just ignored.

v)  If the packet is bad (as determined by step iii above), the Slave starts over, looking for a packet

again.

c)  The Master, immediately after sending the packet, looks for an acknowledgement from the Slave.

i) 

If a negative acknowledgement or no acknowledgement was received, the Master delays a random
amount of time (0 to 255 ms) and then retransmits the entire packet.

ii)  If a positive acknowledgement was received, the Master continues with its other tasks.

Using the above methods of transmission, data can be sent reliably for more than 250 feet.  Our tests reached
more than 400 feet, with trees and buildings in between.  Many packets became lost or damaged in transmission
but the two devices were able to adjust for this and communicate slowly.  Your environment may cause different
results.

The source code provide is named “Txcvr_Master_…” and “Txcvr_Slave_…”.  Each piece of code has a
corresponding companion program.  For example, the Txcvr_Master_XOR.BS2 source code uses the XOR
method and is meant to be programmed into the “Master” device (a BASIC Stamp 2).  The Slave device should
be programmed with the corresponding “Slave” code, namely Txcvr_Slave_XOR.BS2.

Be very careful to match up the correct code for the device and application.  Do not try to program a BASIC
Stamp 2sx with code that ends in a .BS2 extension.  Do not try to use the XOR code for the Master and the CRC
code for the Slave

.

Содержание 27986

Страница 1: ...se boards that include encoders decoders addressing RF data processing and even the antenna in a simple fully range tested board that is ready to plug right into your project Just apply 5VDC ground an...

Страница 2: ...9600 baud data into the module The receive module outputs the same data at 9600 baud All RF data processing is done automatically by the modules You cannot send a continuous 9600 baud stream spacing b...

Страница 3: ...keep them away from water moisture and direct sunlight The serial input and output pins operate at 5V and 0V logic levels Do not attempt to connect directly to a computer RS232 port as this will damag...

Страница 4: ...disallow other students to perform their wireless experiments Mechanical Size 1 75 Inch x 3 25 Inch x 0 4 Inch Environmental Temperature 10c to 60c Electrical Power 5 VDC 0 250 VDC Logic Levels Cmos...

Страница 5: ...at 9600 baud but can only transmit between modules at 1200 baud This pin is optional but can be used to automatically pace the data for maximum efficiency This pin should connect to the device that o...

Страница 6: ...go high Leaving all 4 address pins disconnected will effectively set the module to address 0 This pin only functions in Switch Mode PIN 14 ADDR1 Input Address Input 1 1 of 4 address input pins 16 diff...

Страница 7: ...status of the 4 address pins of the transmitter See table below IMPORTANT OUTPUT DATA BITS AND ADDRESS BITS ARE INVERTED Example The transmitter is in switch mode and 5V is applied to ADDR3 and 5V is...

Страница 8: ...esses OUT1 OUT2 and OUT3 of the receiver will reflect the state of the bit positions in transmitted byte The receiver reads its address pins ADDR1 through ADDR4 to verify the received byte is intended...

Страница 9: ...ushbutton remote control All inputs including the mode pin are internally pulled low so when in switch mode it is not necessary to connect the mode pin Connecting the mode pin to ground or leaving it...

Страница 10: ...SEROUT commands to send and receive 9600 N 8 1 bytes The modules can not send and receive continuous 9600 baud serial data If the Flow Control TXFLO will not be used for sending serial data TXD you mu...

Страница 11: ...eiver sends textual data while the Slave device the other BASIC Stamp 2 with Transceiver tries to receive the data properly and display it on a 2 x 16 Serial LCD Module Part 27910 or 27913 Note It is...

Страница 12: ...as determined by step ii above the Slave verifies that that packet number is not the same as the previous packet s indicating that a duplicate was received and processes the data of the packet In this...

Отзывы: