I use the eeprom because I wanted to later modified that value, but I need It to not get lost when I turn off the power. But so far I was unnable to write something in the eeprom using the write command, it does nothing, and I tried it on a 16f84a and a 16f627. Not only with this code, I have made some simple codes to test it and the result is always the same.
The pause 3 times were some stupid test I made, I already changed that.
I already changed the resistor, first I tried with 300ohm, and now with 470ohm.
But nothing changed.
The sensor is a photomicrosensor, so RB0 is connected to a phototransistor, with their respective resistors.
I tried disconecting it and puting the pin to gorund but, again, nothing changed.