You need at least a 2mS pause after the clear screen command.HSEROUT [LCD_INST, LCD_CLR, LCD_L1]
Then you need another LCD_INST before the LCD_L1.
Or just leave out the LCD_L1 since the clear screen leaves the cursor on line 1.
You need at least a 2mS pause after the clear screen command.HSEROUT [LCD_INST, LCD_CLR, LCD_L1]
Then you need another LCD_INST before the LCD_L1.
Or just leave out the LCD_L1 since the clear screen leaves the cursor on line 1.
Last edited by Darrel Taylor; - 14th January 2013 at 14:52.
DT
I have a 5ms pause before the Main loop, but I think it's irrelevant since the ADCIN gets a value which is immediately different than the set value for DutyVar1 (set to 0 earlier in the code) and hence it goes straight into the IF block.
I'll add a 5ms pause in the IF block, too. And remove the LCD_L1 if it's not needed.
Thanks again, Darrel!
Bookmarks