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 support@ccsinfo.com

Can I use ItoA (integer to ascii) instruction with PIC16f873

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



Joined: 03 Dec 2004
Posts: 6

View user's profile Send private message

Can I use ItoA (integer to ascii) instruction with PIC16f873
PostPosted: Mon Jan 31, 2005 10:56 am     Reply with quote

I am trying the split numbers captured from the tmr0 register in separate digits e.g 123 into 1,2,3 so that i can send it each digit to different 7segment display which have been multiplexed at the pic 16f873 output pins.

I am using C and the CCS compiler.

Can anybody help pls?


Regards,
rwyoung



Joined: 12 Nov 2003
Posts: 563
Location: Lawrence, KS USA

View user's profile Send private message Send e-mail

PostPosted: Mon Jan 31, 2005 11:02 am     Reply with quote

123 / 100 = 1

123 % 100 = 23

23 / 10 = 2

23 % 10 = 3
_________________
Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month!
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Mon Jan 31, 2005 11:47 am     Reply with quote

Quote:
Can I use ItoA (integer to ascii) instruction with PIC16f873

Yes. You could also use sprintf and force the output to always use 3 digits.
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