goto init ; yes so shut down
MOVf ADRES,0 ; load value
MOVwf lsn ; store for conversion
call interp ; using interpolation method
call bin_bcd ; convert into 2 digits
MOVf digit1,0 ; load msb
call table ; convert into 7 segment format
MOVwf PORTB ; send to display
bsf PORTA,2 ; enable character
btfss TMR0,6 ; test bit
goto $-1 ; loop
bcf PORTA,2
MOVf digit2,0 ; load lsb
call table ; convert into 7 segment format
MOVwf PORTB ; send to display
bsf PORTA,3 ; enable character
btfsc TMR0,6 ; test bit
goto $-1 ; loop
bcf PORTA,3
goto main
end
上一页 [1] [2] [3]
本文关键字:程序 PIC单片机,单片机-工控设备 - PIC单片机