View previous topic :: View next topic |
Author |
Message |
3l3ctr0
Joined: 18 Mar 2010 Posts: 5
|
CCS C gets() |
Posted: Fri Jun 11, 2010 8:40 am |
|
|
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: 19505
|
|
Posted: Fri Jun 11, 2010 8:48 am |
|
|
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
|
|
Posted: Fri Jun 11, 2010 8:56 am |
|
|
thnx for your answer !! |
|
|
|