CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

rs232 array

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
sreicks



Joined: 10 Dec 2007
Posts: 1
Location: Chicago

View user's profile Send private message Send e-mail Visit poster's website

rs232 array
PostPosted: Tue Dec 11, 2007 3:16 am     Reply with quote

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








PostPosted: Tue Dec 11, 2007 6:36 am     Reply with quote

Take a look at the CCS example EX_SISR.C
Guest








PostPosted: Tue Dec 11, 2007 8:41 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Dec 11, 2007 9:46 am     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group