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 Dilemma

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



Joined: 22 Apr 2006
Posts: 87

View user's profile Send private message

RS232 Dilemma
PostPosted: Tue Jun 20, 2006 8:35 am     Reply with quote

I need to read RS232 data stream which is sent by a RS232 Module . the Stream looks like this on the HyperTerminal .

If I type o and press enter the module sends the following . which is time, date etc


152344220060623



Is there a built in function in CCS to read this serial data ?

I have tried the code below that is not working.

If it cant be done using built in CCS functions can I read this in character at a time using any pin on the PIC, can any one point me in the right direction as to how to do this .?

Thanks in Advance .

#use rs232(debugger,baud=300,parity=e,rcv=PIN_C7,bits=7,stream=MSF)

char c;

c=fgetc(MSF);
fprintf(MSF,"%C",c);
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

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

PostPosted: Wed Jun 21, 2006 5:22 am     Reply with quote

Answered on Microchip forum
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
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