I also am trying to get the example hserin code to work.
It does not seem to be correct.. (the one that uses PIR1A.5 or so)
I need a tight loop to collect bursts of serial string data @ 9600 and would like to know when the first byte enters the two byte buffer.
I was thinking of monitoring the actial input pin that is connected to the usart.... (lookin for a start bit)... that would give me fair warning that something was entering the usart.... then pop over to the hserin and wait for the byte to show. kind of a poor mans data based interupt
Has anyone done this ??
That would give me time to get back and service the usart before it overflows. I could care less knowing when it is full because it's too late.
I now use hserin with a 2 ms timeout and it works OK for now.
Is there a good book out there that gives examples of interupt use with the usart?
876 and 877 here....
tcbcats




Bookmarks