Here you define the pin port that you will use to drive your LCD display.Code:Define LCD registers and bits Define LCD_DREG PORTD Define LCD_DBIT 4 Define LCD_RSREG PORTE Define LCD_RSBIT 0 Define LCD_EREG PORTE Define LCD_EBIT 1
adval is a word variable (16 bits) and you load this variable in two steps copying two single bytes (adval.highbyte = ADRESH will transfer the high byte) and ( adval.lowbyte = ADRESL will transfer the low byte)Code:adval.highbyte = ADRESH ' Move HIGH byte of result to adval adval.lowbyte = ADRESL ' Move LOW byte of result to adval
Al.




Bookmarks