View previous topic :: View next topic |
Author |
Message |
sreicks
Joined: 10 Dec 2007 Posts: 1 Location: Chicago
|
rs232 array |
Posted: Tue Dec 11, 2007 3:16 am |
|
|
Ok, i apologize, for asking the obvious, but i have tried searching the forum and i can't get a direct answer.
but can anyone direct me to some very basic code showing how to send an array over rs232 from a pic and then the code for the receiving pic as well. My array will be 3 rows of 8 .
I understand I am supposed to use printf() and getc() but i don't know exactly how it should be set up.
Also, it would be convenient if you I could see how to make the "get" statement an interrupt.
thank you,
sam |
|
|
Guest
|
|
Posted: Tue Dec 11, 2007 6:36 am |
|
|
Take a look at the CCS example EX_SISR.C |
|
|
Guest
|
|
Posted: Tue Dec 11, 2007 8:41 am |
|
|
yeah, i've seen that on the example list, but i'm actaully working on a mac right now for the programming, and then i'll switch it onto a PC for compiling, but unfortunately i don't have access to that PC yet, so thus i don't have the example code . If you could would it be possible to email that code to me at:
[email protected]
thanks,
sam |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Tue Dec 11, 2007 9:46 am |
|
|
The sizeof operator will tell you the size of your array in bytes. Then use putc() and getc() to send the array byte at a time. You can do that with a variable, array, structure, anything else. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
|