Ive been having further issues with my 'electronic safe'. I'm using the read/write commands so that I can store the variables in the chips memory and use them to compare the values entered using a keypad to determine if the right code has been entered. I need to do this as I'm including a feature in my program which allows the code to be changed. However, they don't seem to be working as I planned. At the beginning of the program the chip is told to:
After this I enter the correct code using the keypad, and the chip is told to execute the following code. The values for b2-b5 are 2,4,7,10 respectively.
I'm not sure what the problem is; either the chip isn't storing the variables or it isn't recalling them properly. Am I using the command incorrectly/the wrong command?
Many thanks, Dracion
Code:
'This section is (should) only executed the first time the program runs.
write b7,2
write b8,4
write b9,7
write b10,10
'Value of key +1
Code:
read b7,b7
read b8,b8
read b9,b9
read b10,b10
if b2=b7 and b3=b8 and b4=b9 and b5=b10 then goto safeopen
Many thanks, Dracion