I am trying to use TMR0 as a counter, and eventally display the count on the LCD. I am also running with the 32khz. internal oscillator. The following program works fine:
TRISC = %000000
TRISA = %000100
OSCCON = %00000011
WDTCON = %0000000
Define LCD_DREG PORTC 'Set LCD data port
DEFINE LCD_DBIT 0 'Set LCD starting data bit
DEFINE LCD_RSREG PORTC 'Set LCD register select port
DEFINE LCD_RSBIT 4 'Set LCD register select bit
DEFINE LCD_EREG PORTA 'Set LCD enable port
DEFINE LCD_EBIT 1 'Set LCD enable bit
DEFINE LCD_BITS 4 'Set LCD bus size
DEFINE LCD_LINES 2 'Set LCD number of lines
Lcdout $fe, 1 ' Clear LCD screen
Lcdout "I Love" ' Display Hello
Lcdout $fe, $C0 ' Clear LCD screen
Lcdout "This"
end
When I add this line:
OPTION_REG = %00110000
It quits working.
Does anyone know why?
Thank you.
Bookmarks