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

transmitting a group of hex bytes

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



Joined: 12 Jan 2009
Posts: 33

View user's profile Send private message

transmitting a group of hex bytes
PostPosted: Tue Jan 27, 2009 7:23 am     Reply with quote

I would like to transmit c chain of 60 hex bytes.
So far the only way i have done this successfully is using a very long printf.

I have used a putc() in a loop, this however seems to add several '0's throughout, which i can't have.

Is there any other method for outputting data without directly using the registers.

thanks,
Matt
Wayne_



Joined: 10 Oct 2007
Posts: 681

View user's profile Send private message

PostPosted: Tue Jan 27, 2009 7:47 am     Reply with quote

putc(c) and printf("%c", c); or printf("%x", c); should work.

If you are getting corrupted data then there must be another problem with either your code or your hardware!
mshearer



Joined: 12 Jan 2009
Posts: 33

View user's profile Send private message

PostPosted: Tue Jan 27, 2009 7:54 am     Reply with quote

ah thanks, your quite right.
It looks like my attempt to set the TX9D bit for parity is going wrong somewhere. Or my terminal program is handling it oddly

thanks again

matt
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