Lots of problems.
The max value a word variable can store is 65536,
so what's this supposed to do:
Any value in other than zero in d0 will result in at least 1000000Code:d0 = (d0-48)*100000
which severely overflow that variable, and then you do it again and again.
and yes, I see you are subtracting from an ASCII value to acquire a real value.
It looks like you're also only reading and writing one byte to EEPROM
which might be fine as long as the value is always less than 256.
The long you are trying to write is likely four bytes.
Is there really a long variable type in PBP now?
Something like this might work if there is:
Depending on which var the left side of the sum is calculated in,Code:long j = 0; long = long + (d0-48)*100000 long = long + (d1-48)*10000 long = long + (d2-48)*1000 long = long + (d3-48)*100 long = long + (d4-48)*10 long = long + (d5-48)
otherwise you'll need to be more creative.


						
					
				
				
				
				
			

Bookmarks