68HC11/FOX11 board Digital Clock Source Code (Need Help)
I need help, to write a source code for the FOX11 board and Micocontroller 68HC11; to use the LCD on the actual FOX11 board to display a digital clock. There is no external components. Below is what I have and what i need is to add the part to have it correctly show on the LCD. I am not proficient enough to get this to work and need help. If this code is not workable please advise. Thank you
org 0; start address of data
hr rmb 1;hour counts in bcd
min rmb 1;minutes count bcd
sec rmb 1;second count bcd
fsec rmb 2;fraction of second count for rti routine
fcnt equ244;number of rtii interrupts to make 1 second*
org $180*subroutine intitrtii
initrtii
bset tmsk2, x $40; set rtii flagcli
clr fsec ; initialize fsec
clr fsec+1
rts ; return*service routine rrtii
rrti
ldx #regbas
ldaa #$40; clear rtif
staa tflg2, x
ldy fsec ; count # of rtii
iny ;occurrences
sty fsec
cpy #fcnt ; add 1 to sec if
beq second ;enough occurred
seconds
clr fsec ;reset fraction sec count
clr fsec+1;to zero
ldaa sec
adda #1;add 1 to second countdaa;adjust for decimal arithmetic
cmpa #$60;check for seconds = = 60
beq minutes ; adjust minutes if = = 60
staa sec
rti
minutes
clr sec ;reset sec to zero
ldaa min
adda #1;add 1 to minute countdaa;adjust for decimal arithmetic
cmpa #$60;check for minutes = = 60
beq hours ;adjust hours if = = 60
staa min
rti
hours
clr min ;reset min to zero
ldaa hr
adda #1;add 1 to hour countdaa;adjust for decimal arithmetic
staa hr
cmpa #$24;check for hours = = 24
bne return ;reset to 0 if = = 24
return
rti