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

Best Way for change speed in software uart

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



Joined: 18 Oct 2003
Posts: 145

View user's profile Send private message

Best Way for change speed in software uart
PostPosted: Fri Apr 13, 2007 2:03 am     Reply with quote

Hi,

I use software uart for control some device, and I need to change the speed in fly, or make a dynamic "STREAM" identify for not duplicate code (#USE RS232, fgetc, etc)

Anybody make this? and can tell me

Thank you very much!!

Best Regards
Ttelmah
Guest







PostPosted: Fri Apr 13, 2007 3:08 am     Reply with quote

Basically, you can't.
The entire putc/getc code will be duplicated for the second stream. If you look at how it is done, the 'common' part, represents only a couple of instructions (the actual shift, and masking operations). Everything else changes,to give accurate timings. If you wanted this, you'd have to write it yourself, perhaps basing it on the variable based delay functions that have been published here. However don't be suprised if this is a lot larger than the existing code, and at the amount of 'tweaking' needed to get the timings right...

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