PC<> PIC communication Communications between the PC and Thorian receiver are via a USB > TTL serial port, directly connected to the PIC eliminating any other components. Data rate is 9600 baud, 8 bits, no parity, 1 stop bit standard serial data.
|
|||||||||
PIC<> RF communication Once the PIC receives the 4 bytes, it retransmits this over RF as 8 bytes.
The inverted bytes are used for checksum |
|||||||||
Reserved addresses If the PC sends an address 0 then anything for data1,2,3 the USB interface will respond back to the PC with address 0, data1=1, data2=2, data3=3
Address 255 If the USB PIC device receives an address of 255 from the PC, it will reroute the data in standard TTL 9600 to PIC pin 13 RB7 - ICSP pin 4. This is used to program a Thorian device with a new address. To set a new address on the receiving device, say 201, send
(Future features like 2 way comms will require a confirmation bit (address, A.C.K. ?). |
|||||||||
Bit timing: The on time is the same for every bit. The off time however varies. This determains whether the bit is 0 or 1
The receieving PIC re-syncs after every bit to minimise on data timing errors when it receives over the air. |
|||||||||
Temperature sensor information Data Format: The PIC sends data to the PC in the following format:
Calculating the Temperature
1. Convert Data2: Read the value in Data2 as a decimal number (its value ranges from 0 to 256).
2. Process the additional bits: The three highlighted bits in Data1 MSB correspond to the following decimal values (from left to right): First bit: 1024 Second bit: 512 Third bit: 256 For every one of these bits that is set to 1, add its corresponding value to the decimal value obtained from Data2.
3. Compute the temperature: Divide the sum (the value of Data2 plus the added bits’ values) by 16.
Additional flags Battery low This flag is activated when the battery voltage drops below 2.6 V. When this flag is set, it indicates that the measured temperature is below zero.
Note:
|
|||||||||
Some details below if the 434 Mhz AM transmitter and receiver pair:
Transmitter Head Parameters
|
|||||||||
Receiver Module Parameters
|
|||||||||
← Back to Projects