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

CCS C gets()

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



Joined: 18 Mar 2010
Posts: 5

View user's profile Send private message

CCS C gets()
PostPosted: Fri Jun 11, 2010 8:40 am     Reply with quote

hi!

I designed a wireless system.
Receiver system is working with pic18f452. PIC tries to get data with gets() command. But system cannot work. Data can be sent. But receiver cannot get.

Does gets() command need "enter==0D" ascii code or another else?
Ttelmah



Joined: 11 Mar 2010
Posts: 19504

View user's profile Send private message

PostPosted: Fri Jun 11, 2010 8:48 am     Reply with quote

Read the manual!.....

gets, wants ASCII 13 (0xD).

In all honesty, for serial I/O, dont use gets.
Use something like 'get_string' from input.h, or your own enhanced version of this.
Unless transmission is 100% reliable (direct wiring, and you _know_ what is being sent), gets, is 'asking for trouble'....

Best Wishes
3l3ctr0



Joined: 18 Mar 2010
Posts: 5

View user's profile Send private message

PostPosted: Fri Jun 11, 2010 8:56 am     Reply with quote

thnx for your answer !!
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