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

Long data, unknown data process and traffic?

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



Joined: 07 Feb 2009
Posts: 38

View user's profile Send private message

Long data, unknown data process and traffic?
PostPosted: Fri Jun 18, 2010 9:24 am     Reply with quote

Hello,
my first problem is that
I want to send integer data from pc to pic, I searched and analyzed many codes.
Generally data is sent from pc to pic as character; a,b,c,d,1,2,hello and
generally code is "if (kbhit()) getch()" like this. Yes, it is possible to send long data,
for example 1020 integer value or hello world. But I am afraid that when I send data
from pc to pic, if the data does not arrive to pic, What I will do, it is important.
So I have many ideas. Firstly, I think send datas as one by one.
Maybe It can be used "for loop" or different way. And I want to know if the data is correct
or not. So pic have to send same data to pc back for confirmation. It is necessary for correction.

Second problem is that: Now I can send data to pic via pc.
I send datas that 1,2,3,4 etc.But When I want to send data 120, 135 (this is unknown data).
When will I do.I means that I know data 1,2,3,4 I can write code as "if (a==1)
(defined a as character). But I don't know 120,130,140 like this(this is unknown data).
If unknown data send. How I understand data. So I want to use both cases. I must to write
codes as if (a==1) and if (a==unknown data) like this. How can I compose code. Please write
to cover both the problem sample code(in addition I am using 18f452).

Best regards
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