here's an interesting project batee.
Of course to minimize delay you should use the highest baud rate such 9600. For this 20MHZ crystal is recommended.
"I was thinking of sending one-character commands to minimize the data transfer time."
indeed!
"Also, is there a way to determine when a byte has been received by the UART so that it's not sitting waiting on data or a timeout? I saw something about RCIF in the datasheet. Is it possible to read this and do the HSERIN command if set?"
there's a few way to do it. Of course by Usart Interrupt or waiting for specific receive character. this one will work with specefic character.
Code:
DEFINE OSC 20
DEFINE HSER_BAUD 9600
DEFINE HSER_CLROERR 1
Hserin [wait ("c")] ;wait for c
;do the rest here
you can use every PIC with internal USART like 16F628 and such other to do your job. Be sure to choose one who an run at 20MHZ. Maybe PIC12F629 or PIC12F675 running at 20MHZ with DEBUG, DEBUGIN command can also do the job too.
hope this help
regards
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks