How can I send and receive 16 bits of data between two PICs
Posted: Mon Oct 05, 2009 10:01 am
I would like to send and receive 16 bits of data from one PIC to another but I'm not sure how to go about doing this. I was thinking of using fputc from rs232 but I only see in the options the ability to send and receive 9 bits using long_data and setting the bits=9. Any suggestions? Thanks.
kdoney34711
Joined: 05 Oct 2009 Posts: 6
Posted: Mon Oct 05, 2009 10:16 am
Do you have to use any specific pics and does it have to be in one transfer?
Of course if it must be in one transfer you will need more ports. _________________ KDONEY
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
Posted: Mon Oct 05, 2009 4:47 pm
Serial data is usually sent in bytes. That is how hardware UARTs are constructed. The 9th bit, parity bit, etc. are special and not generally expandable to 16 bits.
To send 16 bits just use two byte transfers. _________________ The search for better is endless. Instead simply find very good and get the job done.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum