No, that won't matter.
Can you post your Proteus files (zipped)?
No, that won't matter.
Can you post your Proteus files (zipped)?
DT
Yes, all is OK now !
If v_cal is 1023 (maximum 5.000V) it's correct this command for memorise in EEPROM :
write 0, v_cal
I read the PBP help, but I find only this : write 5,B0 ' Send value in B0 to EEPROM location 5.
And I can read them when I need, with this command :
read 0, v_cal ???
It's enough like these or need more ?
Thanks in advance and sorry for my ignorance...
If you have PBP 2.60, then you could ...If v_cal is 1023 (maximum 5.000V) it's correct this command for memorise in EEPROM :
write 0, v_cal
...
read 0, v_cal ???
It's enough like these or need more ?
If you don't have 2.60 yet, you'll need to ...Code:write 0, WORD v_cal read 0, WORD v_cal
Code:write 0, v_cal.LowByte write 1, v_cal.HighByte read 0, v_cal.LowByte read 1, v_cal.HighByte
DT
I understand now ; I read 10 pages of search "eeprom".
Of course, the answer it's simple if somebody help ! Thanks, Mr.Darrel !
....
So, if eeprom it's like in picture :
75 (hex) = 117 (dec)
v_cal = 117 * 4,8875 = 572 mVolts ?
Last edited by fratello; - 14th November 2010 at 16:31. Reason: adding picture
Yes, if you saved the MAX A/D value instead of the converted value.So, if eeprom it's like in picture :
75 (hex) = 117 (dec)
v_cal = 117 * 4,8875 = 572 mVolts ?
In that case, be sure to use the previous formula to convert it to voltage.
Code:v_cal=v_cal * 5000 ' I use VDD as Vref v_cal=div32 1023.
DT
I use this code :
Code:vmax = 0 for cnt =1 to 70 adcin 3, v_cal vmax =vmax max v_cal pause 100 next cnt v_cal=vmax * 5000 ' I use VDD as Vref v_cal=div32 1023 write 0, v_cal.LowByte pause 10 write 1, v_cal.HighByte pause 10
Then you have saved the value as a Voltage.
And 117 means 117mV.
Since I = E / R ... with a 0.02 ohm resistor ...
0.117 / 0.02 = 5.85 Amps
Dividing by 0.02 is the same as multiplying times 50.
117 * 50 = 5850 or 5.850 Amps.
DT
Bookmarks