EEPROM problems

elsey.jack

New Member
Hello all, quick question here.

Why doesn't this code work? When I try to compile it the programming editor tells me that there is a sytnax error in the EEPROM line. I've scoured what the manual has to say about EEPROM but I still don't know what is wrong.

Any ideas?

Code:
main:
	b2 = 48
	b3 = 48
	b4 = 48
	
	EEPROM 6 ,(b2, b3, b4)

end
 

boriz

Senior Member
See manual 2, page 5.

"Constants are ‘fixed’ numbers that are used within the program..."

You are trying to use variables. Not the same thing. Won't work.
 

westaust55

Moderator
EEPROM is a complier directive that is only actioned at the time the program is downloaded into the PICAXE.

So the line EEPROM 6 ,(b2, b3, b4) is actioned but the avriables are bnot yeta ssigned so you only load zero's

use the WRITE command instead to load values from variables within the runing program

or put the values directly into the EEPROM statement
 
Top