View Full Version : internal eeprom problem
amodpathak
- 8th June 2015, 10:05
Iam working with 16F876A.i want to store and read two different word in eeprom at different locations.
For first word i used
Write 0,numb.highbyte
Write 1,numb.lowbyte
What be for second word?
Second word is Tempp
HenrikOlsson
- 8th June 2015, 11:09
Hi,
Next free location would be 2 so
WRITE 2, TempB.Highyte
WRITE 3, TempB.LowByte
Or you can use the WORD modifier and let PBP handle the high/low byte stuff (I don't know in what order it writes it so either you look into that or you use the WORD modifier when you READ the data as well)
WRITE 0, WORD Numb
WRITE 2, WORD TempB
Or....
WRITE 0, WORD Numb, WORD TempB
/Henrik.
amodpathak
- 8th June 2015, 18:26
Tkanks Henrik.I got my work done.
I had one more problem.iam making Thermistor based thermostat. My problem is my temperature does not go below 0 degree. Please help me out.
HenrikOlsson
- 8th June 2015, 18:48
Then you need to travel to a location where it's colder than where you're currently situated....
Seriously though, don't you have another thread where you're discussing that topic?
As I said in that thread, BYTES and WORDS in PBP aren't signed so comparisons like If myValue < 0 won't work because myValue (if it's a BYTE or WORD) will always be considered to be either zero or larger than 0.
Apart from that I'm not up to speed with what you're doing, how you're measuring the thermistor, what values you're getting for different temperature etc.
/Henrik.
Powered by vBulletin® Version 4.1.7 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.