Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/12/02 04:06
Read: times


 
#19684 - RE: Using Timer 2 as Serial port baud rate?
Hi Dennis,

Thanks for the info - I've set it up to run at 28,800 on the /16 formula - that way if it is /32 it will run at 14,400.

The reason I'm using Timer 2 is because the code that I'm modifying already uses Timer 1 for a very important purpose (controlling the fuel injection pulse length). If you haven't guessed I'm modifying my car's ECU.

My only other problem is that the Serial Interrupt also runs some code which I'm not sure about (due to my lack of 8051/2 assembly knowledge).
Here's the code snippet:

MOV_____ PSW,#018H
MOV_____ R1,SBUF
CLR_____ RI
MOV_____ A,@R1
JNB_____ RB8,L0052
MOV_____ R0,#00FH
MOVX____ A,@R0
ADD_____ A,#0FCH
MOVX____ A,@R1
JC______ L0052
CLR_____ EA _____*
INC_____ P2 _____*
MOVX____ A,@R1 __*
DEC_____ P2 _____*
SETB____ EA _____*

L0052___ RETI

The parts with stars next to them are what I'm unsure about - It's probably very simple.

Cheers,

George Ricketts


List of 16 messages in thread
TopicAuthorDate
Using Timer 2 as Serial port baud rate?            01/01/70 00:00      
RE: Using Timer 2 as Serial port baud rate?            01/01/70 00:00      
RE: Using Timer 2 as Serial port baud rate?            01/01/70 00:00      
RE: Using Timer 2 as Serial port baud rate?            01/01/70 00:00      
RE: Using Timer 2 as Serial port baud rate?            01/01/70 00:00      
RE: Using Timer 2 as Serial port baud rate?            01/01/70 00:00      
RE: Using Timer 2 as Serial port baud rate?            01/01/70 00:00      
RE: Using Timer 2 as Serial port baud rate?            01/01/70 00:00      
RE: Using Timer 2 as Serial port baud rate?            01/01/70 00:00      
RE: Using Timer 2 as Serial port baud rate?            01/01/70 00:00      
RE: Using Timer 2 as Serial port baud rate?            01/01/70 00:00      
RE: Using Timer 2 as Serial port baud rate?            01/01/70 00:00      
RE: Using Timer 2 as Serial port baud rate?            01/01/70 00:00      
RE: Using Timer 2 as Serial port baud rate?            01/01/70 00:00      
RE: Using Timer 2 as Serial port baud rate?            01/01/70 00:00      
RE: Using Timer 2 as Serial port baud rate?            01/01/70 00:00      

Back to Subject List