|
|
View previous topic :: View next topic |
Author |
Message |
cfernandez
Joined: 18 Oct 2003 Posts: 145
|
Best Way for change speed in software uart |
Posted: Fri Apr 13, 2007 2:03 am |
|
|
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
|
|
Posted: Fri Apr 13, 2007 3:08 am |
|
|
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 |
|
|
|
|
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
|