I expect something to show on the LCD, but it stays blank.
EDIT: I moved the LCD instructions to the loop to see what I could see and the final PWDuty value is 12291, way more than 512. The LED now ramps up in brightness but then drops down once the duty exceeds 512. I also needed to add a pause after the LCD initialization in order to see anything on the screen).
Where the heck is it getting 12291?Code:FadeInPause CON 5 ; Pause during LED fade in ' Fade in LED to set brightness FOR i = 0 to 100 ; must match ARRAY SIZE of data table above ReadCODE (DataTable + i), DataWord PWMDuty = DataWord GOSUB ChngLEDBrightness #IFDEF USE_LCD_FOR_DEBUG HSEROUT [LCD_INST, LCD_CLR] pause 5 HSEROUT ["PWMDuty=",DEC PWMDuty," "] #ENDIF pause FadeInPause NEXT i




Bookmarks