Sorry for bugging you guys but I am going crazy.
I receive data from a camera controller which sends groups of 7 bytes every time you move the joystick or enter a command. I have to keep my program running doing other things but need to catch every packet that comes.
I got the interrupt thing working using HSERIN and also by reading RCIF directly but only with 1 byte at a time. Some good news is that the 1st byte is always $A0 and the 7th is always $AF. I need them in their respective bytes to be able to decode the command. The commands come at a rate of 4800bps and I am running a 16F877A at 20MHz.
I have used SERIN2 successfully in the form SERIN2 port,speed,[byte1,byte2, yte3 etc etc]
but using this system means that I have to continusly poll the SERIN2 command and while the PIC responds to the commands it sometimes looses another. I rather loose a response then a command.
Regards
Chris
Bookmarks