![]() | ![]() | ![]() |
| |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
![]() |
| | Tools |
| | #1 |
|
Hi, i send the sensor data to RF transmitter with serial communication(1-wire) then on the reciever board RF reciever get the data and send it to the micro by serial comunication and show it on lcd. i should send the sensor data every 5 minutes and during this time micro goes to sleep mode. after two or three transfering , i can't see anything on lcd but after restarting the micro it works without any problem. why do you think after 2 or 3 transfering this problem is occuring? how can i solve the problem? is it about software? i use microcode sudio picbasic pro2.41 . i use serin and serout instructions for serial communication. | |
| |
| | #2 |
|
hi.. First of all you send preamble which are 5 byte of 0x55 or 0xAA...Then send 5 byte 0x00 and 5 byte 0xFF for obtain synchron.. Perhaps it causes the problem... | |
| |
| | #3 |
|
hi, are you sure that i should send that 25 bytes befor sending my data? my problem is that after recieving data for 3 or 4 times ,something wrong happen to the data and i can't see anything on lcd.do you think that my problem will solve by sending that preamle bytes befor my dada bytes? Last edited by amindzo; 15th August 2006 at 12:26 PM. | |
| |
| | #4 |
|
You have a pullup on the reset pin?
| |
| |
| | #5 |
|
yes, i put a 4.7K resistor between reset pin and vcc.(pin number 1 in pic16f873a).this is not my problem. could you help me more?
| |
| |
| | #6 |
|
You might try reading my PIC RF tutorial?, it's not a good idea to try and send standard serial data over a radio link, you should encode it in some way (Manchester coding, or some other NRZ system). A radio link is AC coupled, RS232 is DC coupled - that's the first problem!.
| |
| |
| | #7 |
|
i use haming code. is it good for my application? should i send some preamble bytes? Last edited by amindzo; 15th August 2006 at 09:51 PM. | |
| |
| | #8 | |
| Quote:
| ||
| |
| | #9 |
|
I have done it by PICC...I sent preamble+sencron before sending any data...After sending data i waited 80 Us for 1200 baud after each data sending...But i'm not sure that this application can solve your problem...
| |
| |
|
| Tags |
| communication, modules, pic, serial |
| Thread Tools | |
| Display Modes | |
| |