main:
movlw 0x00
movwf count1
/////1 second routine
incf count1
movf count1,0
call bcd
return
bcd:////////////////bcd to ASCII conversion routine
movwf TMP5
swapf TMP5,0
andlw 0x0F
addlw 0x06
btfss STATUS,DC
goto lessnine3
addlw 0x31
goto digit3
lessnine3:
addlw 0x2A
digit3:
movwf PORTD
call SND_DTA
movf TMP5,0
andlw 0x0F
addlw 0x06
btfss STATUS,DC
goto lessnine4
addlw 0x31
goto digit4
lessnine4:
addlw 0x2A
digit4:
movwf PORTD
call SND_DTA
return
movlw 0x00
movwf count1
/////1 second routine
incf count1
movf count1,0
call bcd
return
bcd:////////////////bcd to ASCII conversion routine
movwf TMP5
swapf TMP5,0
andlw 0x0F
addlw 0x06
btfss STATUS,DC
goto lessnine3
addlw 0x31
goto digit3
lessnine3:
addlw 0x2A
digit3:
movwf PORTD
call SND_DTA
movf TMP5,0
andlw 0x0F
addlw 0x06
btfss STATUS,DC
goto lessnine4
addlw 0x31
goto digit4
lessnine4:
addlw 0x2A
digit4:
movwf PORTD
call SND_DTA
return