ok MWS here are the *implicite* settings made explicite:
______________________________________________________________________________________________
$regfile = "m328pdef.dat".
$crystal = 8000000
'********************copied from IDE options********************************
$hwstack=40
$swstack=16
$framesize=32
'********************copied from IDE options******************************** '
Config Lcdpin = Pin , Db4 = Portc.5 , Db5 = Portc.2 , Db6 = Portc.1 , Db7 = Portc.0 , E = Portc.4 , Rs = Portc.3
Config Lcd = 20 * 4
Dim Dummy As Word
Cls : Wait 1
Icr1 = 4096
Dummy = Icr1
Shift Dummy , Right , 2
Pwm1a = Dummy
Do
Cls
Locate 1 , 1 : Lcd "IC " ; Bin(icr1)
Locate 2 , 1 : Lcd "IC " ; Bin(icr1)
Locate 3 , 1 : Lcd "pw " ; Bin(pwm1a)
Locate 4 , 1 : Lcd "co " ; Bin(compare1a)
Wait 4
Loop
End
_________________________________________________________________
I still wonder why those settings may produce at the very first run a *wrong* LCD display and on all following runs the *right* LCD one :(
If the settings are wrong, e.g. to small why are they ok for the second and all following LCD outpts of the *unchanged* variables in an *unchanged* enviroment?
btw compiling and running the code with explicite setting dosn't change any thing, so[b:86763218ba] I'm still confused[/b:86763218ba]
Hope you can see now what you need to analyse and pls give advice for correct settings
best regards
MHz
↧