Re: ASM och MCP9701
Postat: 20 oktober 2010, 08:33:02
Den enklare varianten med tabell:
Kod: Markera allt
movf decimals, W ; Lookup and convert value i decimals
call dectable
movwf decimals
; Send ten's
swapf decimals, W
andlw H'F'
addlw H'30'
call lcd_send_data
; Send one's
movf decimals, W
andlw H'F'
addlw H'30'
call lcd_send_data
;;Call with byte to retrieve in W (in this case, W in range of 0-3)
dectable
addwf PCL
dt 0, 25, 50, 75