what baud rate are you using?
what baud rate are you using?
"I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams
hi kamikaze47,
the baud rate is 9600.i check it in hyper terminal and working both tx and rx with stop bit 1. i can't understand how and why but it's working. i connected to my project and working also perfectly. i am using serout2 command.
thanks for your help.if anyone need sample code for srf02 tell me.
At 9600 baud, each bit is approx 104uS long, so a PAUSEUS 104 after your serout command should represent that 2nd stop bit.
I'm glad its working 4 u.
"I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams
Adding
DEFINE CHAR_PACING 104 'Serout character pacing in us
will give you an extra 104 uSecs between characters - effectively giving you an extra stop bit at 9600 bps.
HTH
Brian
In hopes you are still monitoring this thread, Kamikaze, I would very much like to collaborate with you and receive a copy of your sample code for using the SRF02.
I am currently developing an application that will work with the SRF02. It uses a DS1337 clock's Alarm1 (INTA) as an interrupt to an 18F4550 MCU to wake it up out of SLEEP mode, take 6 range measurements from the SRF02, average the 6 measurements into a single average value, store it in EEPROM and go back to sleep till the next interrupt. Interrupts can be set according to DS1337 clock Alarm settings or a person could replace the clock interrupts with a push button interrupt to manually take measurements and display them.
If you could post your code here it would be a help to me and possibly to other members of this forum.
BTW, I see that you had some difficulties in using a serial interface with the SRF02. I am using I2C interface which seems a lot simpler. Curious....how come you chose to use the serial interface option as opposed to I2C??
i never used the srf02. I was just helping out santamaria with his serial problems.
But it sounds like you have a good idea about what you want to do. Why not give it a go. Were are you getting stuck?
"I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams
Bookmarks