How do I get 2 decimals with the Basic codes below?
I have put "READADC10 3,w3" to 10 bit to get a wider resolution
I am using PICAXE-28X
I have tried to insert the following text at the end of the codes,
to make the second decimal appear in the display.
Byte = w3 // 1 | "0"
GOSUB SendDataByte
<code><pre><font size=2>
DisplayLine4:
READADC10 3,w3
byte = $D4; Start Line 4
GOSUB SendCmdByte
EEPROM 56,("Volt: " ;56..64
FOR get = 56 TO 64
READ get,byte
GOSUB SendDataByte
NEXT
let w3 = w3 / 20
SERTXD("Volt: ",#w3,CR,LF)
1000Linie:
byte = w3 / 10000 | "0"
IF w3 >= 10000 THEN Disp1000Digit4
byte = " "
Disp1000Digit4:
100Linie:
byte = w3 / 1000 // 10 | "0"
IF w3 >= 1000 THEN Disp100Digit4
byte = " "
Disp100Digit4:
GOSUB SendDataByte
10Linie:
byte = w3 / 100 // 10 | "0"
IF w3 >= 100 THEN Disp10Digit4
byte = " "
Disp10Digit4:
GOSUB SendDataByte
Units:
byte = w3 / 10 // 10 | "0"
GOSUB SendDataByte
DispDecimalPoint4:
byte = "."
GOSUB SendDataByte
Decimal_1:
byte = w3 // 10 | "0"
GOSUB SendDataByte
Decimal_2:
byte = w3 // 1 | "0"
GOSUB SendDataByte
byte = " "
GOSUB SendDataByte
byte = "V"
GOSUB SendDataByte
byte = "o"
GOSUB SendDataByte
byte = "l"
GOSUB SendDataByte
byte = "t"
GOSUB SendDataByte
</font></pre></code>
In the display is shown e.g. 2.10 where I expeted it to show 2.18 ?
How du I get a wider resolution so the second decimal appear as well?
Would I get a more accurate result with the POKE og PEEK commands?
If so how isn't done in the codes?
<b> Best regards </b>
Monie
I have put "READADC10 3,w3" to 10 bit to get a wider resolution
I am using PICAXE-28X
I have tried to insert the following text at the end of the codes,
to make the second decimal appear in the display.
Byte = w3 // 1 | "0"
GOSUB SendDataByte
<code><pre><font size=2>
DisplayLine4:
READADC10 3,w3
byte = $D4; Start Line 4
GOSUB SendCmdByte
EEPROM 56,("Volt: " ;56..64
FOR get = 56 TO 64
READ get,byte
GOSUB SendDataByte
NEXT
let w3 = w3 / 20
SERTXD("Volt: ",#w3,CR,LF)
1000Linie:
byte = w3 / 10000 | "0"
IF w3 >= 10000 THEN Disp1000Digit4
byte = " "
Disp1000Digit4:
100Linie:
byte = w3 / 1000 // 10 | "0"
IF w3 >= 1000 THEN Disp100Digit4
byte = " "
Disp100Digit4:
GOSUB SendDataByte
10Linie:
byte = w3 / 100 // 10 | "0"
IF w3 >= 100 THEN Disp10Digit4
byte = " "
Disp10Digit4:
GOSUB SendDataByte
Units:
byte = w3 / 10 // 10 | "0"
GOSUB SendDataByte
DispDecimalPoint4:
byte = "."
GOSUB SendDataByte
Decimal_1:
byte = w3 // 10 | "0"
GOSUB SendDataByte
Decimal_2:
byte = w3 // 1 | "0"
GOSUB SendDataByte
byte = " "
GOSUB SendDataByte
byte = "V"
GOSUB SendDataByte
byte = "o"
GOSUB SendDataByte
byte = "l"
GOSUB SendDataByte
byte = "t"
GOSUB SendDataByte
</font></pre></code>
In the display is shown e.g. 2.10 where I expeted it to show 2.18 ?
How du I get a wider resolution so the second decimal appear as well?
Would I get a more accurate result with the POKE og PEEK commands?
If so how isn't done in the codes?
<b> Best regards </b>
Monie