Simplified, and still not working.
Shows "off" on the screen until I press the button - then says "on" and stays that way, even after button releasedCode:DEFINE OSC 4 ' Define LCD registers and bits DEFINE LCD_DREG PORTC 'LCD addressing DEFINE LCD_DBIT 4 'L1 = $80 DEFINE LCD_RSREG PORTD 'L2 = $C0 DEFINE LCD_RSBIT 2 'L3 = $94 DEFINE LCD_EREG PORTD 'L4 = $D4 DEFINE LCD_EBIT 3 TRISD = %10000000 but var portd.0 lcdout $fe,1 Start: if but = 0 then lcdout $fe,$8A,"On " else lcdout $fe,$8A,"Off" endif goto start
I went back to a 4Mhz clock, and have measured voltages and resistances to ground and +5v on d.0 (pin 19)





Bookmarks