May I use a timer0 interrupt and a software RS232 ?
In another way does the software RS232 use the timer0 ?
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Fri Sep 04, 2009 12:31 am
Quote:
May I use a timer0 interrupt and a software RS232 ?
The timer interrupt will interfere with the bit timing of the software UART.
Use the DISABLE_INTS parameter in the #use rs232() statement to
prevent this.
http://www.ccsinfo.com/forum/viewtopic.php?t=36570
Quote:
In another way does the software RS232 use the timer0 ?
No. It uses software timing loops to create the time delays for the bits.
The CCS software UART code uses method #3 of making a software
UART, as listed on this page:
http://www.8052.com/faqs.phtml?FAQ=124758
hmn44 Guest
Posted: Fri Sep 04, 2009 12:48 am
Once more read the manual first ! many thanks
John P
Joined: 17 Sep 2003 Posts: 331
Posted: Fri Sep 04, 2009 9:23 am
Method 2 on the list is perfectly usable, and it lets you keep your timer running all the time (if you need that) and doesn't hog the processor. But if the timer is running that way, there will be "glitches" in its operation at the start of a received byte. And, it involves some non-trivial programming where having an oscilloscope to check timing can be helpful.
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