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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/09/02 09:49
Read: times


 
#19594 - RE: Tiny BASIC on a DS89C420 (A2 eng sample)
Phil,

You are correct about not being able to just write "mov th1,#254" as Basic-52 uses Timer2 to generate the bit rate.

From what i can see the baud rate routine (in the intel source)is :
------------------------------------------

BG1: CLR A ;DO BAUD RATE
MOV R3,A
MOV R1,A
MOV R0,#4
JB RXD,$ ;LOOP UNTIL A CHARACTER IS RECEIVED
;
BG2: DJNZ R0,$ ;FOUR CLOCKS, IN LOOP
CALL DEC3210+4 ;NINE CLOCKS
MOV R0,#2 ;ONE CLOCK
JNB RXD,BG2 ;TWO CLOCKS, LOOP UNTIL DONE
JB RXD,$ ;WAIT FOR STOP CHARACTER TO END
JNB RXD,$
CALL RCL ;LOAD THE TIMER
-------------------------------------

As you can see the RCL subroutine loads timer 2 for the deduce bit rate.

------------------------------------
RCL: DB 8BH ;MOV R3 DIRECT OP CODE
DB 0CBH ;RCAP2H LOCATION
DB 89H ;MOV R1 DIRECT OP CODE
DB 0CAH ;RCAP2L LOCATION
RET
------------------------



regards,
p

List of 11 messages in thread
TopicAuthorDate
Tiny BASIC on a DS89C420 (A2 eng sample)            01/01/70 00:00      
RE: Tiny BASIC on a DS89C420 (A2 eng sample)            01/01/70 00:00      
RE: Tiny BASIC on a DS89C420 (A2 eng sample)            01/01/70 00:00      
RE: Tiny BASIC on a DS89C420 (A2 eng sample)            01/01/70 00:00      
RE: Tiny BASIC on a DS89C420 (A2 eng sample)            01/01/70 00:00      
RE: Tiny BASIC on a DS89C420 (A2 eng sample)            01/01/70 00:00      
RE: Tiny BASIC on a DS89C420 (A2 eng sample)            01/01/70 00:00      
RE: Tiny BASIC on a DS89C420 (A2 eng sample)            01/01/70 00:00      
RE: Tiny BASIC on a DS89C420 (A2 eng sample)            01/01/70 00:00      
RE: Tiny BASIC, BASIC-52 on a DS89C420            01/01/70 00:00      
RE: Tiny BASIC on a DS89C420 (A2 eng sample)            01/01/70 00:00      

Back to Subject List