With the sentence: "IF Solar <= 0 THEN NoSolar" I would like to send the following message to the display "No Solar"
Using HD44780
I have tried several options. And checked the datarecord for the display and <b> EEPROM. </b>
But I haven' t been able to send the message that when there is no sun, "No Solar" has to be inserted in the place where the
variable"Solar" outputs the values.
Do you have a suggestion for how I should solve this problem?
<code><pre><font size=2>
DisplayLine1:
READADC10 0,Solar
'Solar = 512' 2.50 Volt
byte = $80; Start Line 1
GOSUB SendCmdByte
<b> EEPROM 6,("Solcelle:" ; 6..14 </b>
FOR get = 6 TO 14
READ get,byte
GOSUB SendDataByte
NEXT
IF Solar <= 0 THEN NoSolar
LET Solar = Solar * 50 / 32 * 10 / 32
Disp1000Linie1:
byte = Solar / 10000 | "0"
IF Solar >= 10000 THEN Disp1000Digit1
byte = " "
Disp1000Digit1:
GOSUB SendDataByte
Disp100Linie1:
byte = Solar / 1000 // 10 | "0"
IF Solar >= 1000 THEN Disp100Digit1
byte = " "
Disp100Digit1:
GOSUB SendDataByte
Disp10Linie1:
byte = Solar / 100 // 10 | "0"
GOSUB SendDataByte
Disp10Digit1:
byte = "."
GOSUB SendDataByte
DispUnits1:
byte = Solar / 10 // 10 | "0"
GOSUB SendDataByte
DispDecimal1:
byte = Solar // 10 | "0"
GOSUB SendDataByte
byte = " "
GOSUB SendDataByte
byte = "V"
GOSUB SendDataByte
byte = "o"
GOSUB SendDataByte
byte = "l"
GOSUB SendDataByte
byte = "t"
GOSUB SendDataByte
NoSolar:
byte = $80; Start Line 1
GOSUB SendCmdByte
<b> EEPROM 15,("NoData" ;66..85 </b>
FOR get = 15 TO 20
READ get,byte
GOSUB SendDataByte
NEXT
goto DisplayLine1
</font></pre></code>
<b> regards </b>
Monie
Using HD44780
I have tried several options. And checked the datarecord for the display and <b> EEPROM. </b>
But I haven' t been able to send the message that when there is no sun, "No Solar" has to be inserted in the place where the
variable"Solar" outputs the values.
Do you have a suggestion for how I should solve this problem?
<code><pre><font size=2>
DisplayLine1:
READADC10 0,Solar
'Solar = 512' 2.50 Volt
byte = $80; Start Line 1
GOSUB SendCmdByte
<b> EEPROM 6,("Solcelle:" ; 6..14 </b>
FOR get = 6 TO 14
READ get,byte
GOSUB SendDataByte
NEXT
IF Solar <= 0 THEN NoSolar
LET Solar = Solar * 50 / 32 * 10 / 32
Disp1000Linie1:
byte = Solar / 10000 | "0"
IF Solar >= 10000 THEN Disp1000Digit1
byte = " "
Disp1000Digit1:
GOSUB SendDataByte
Disp100Linie1:
byte = Solar / 1000 // 10 | "0"
IF Solar >= 1000 THEN Disp100Digit1
byte = " "
Disp100Digit1:
GOSUB SendDataByte
Disp10Linie1:
byte = Solar / 100 // 10 | "0"
GOSUB SendDataByte
Disp10Digit1:
byte = "."
GOSUB SendDataByte
DispUnits1:
byte = Solar / 10 // 10 | "0"
GOSUB SendDataByte
DispDecimal1:
byte = Solar // 10 | "0"
GOSUB SendDataByte
byte = " "
GOSUB SendDataByte
byte = "V"
GOSUB SendDataByte
byte = "o"
GOSUB SendDataByte
byte = "l"
GOSUB SendDataByte
byte = "t"
GOSUB SendDataByte
NoSolar:
byte = $80; Start Line 1
GOSUB SendCmdByte
<b> EEPROM 15,("NoData" ;66..85 </b>
FOR get = 15 TO 20
READ get,byte
GOSUB SendDataByte
NEXT
goto DisplayLine1
</font></pre></code>
<b> regards </b>
Monie