Thanks a lot, I'm going crazy with this.
a few, perhaps irrelevant, comments:
why store the value of circunferencia as 1 (data @0,1) and the use Read 0, circunferencia at power up to read it? why not set the variable to 1 (circunferencia=1) at start up and not worry about EEPROM?
why use Pause 1 three times for turning on the display when you could use Pause 3?
It is nice to have an End statement somewhere.
PIC MCU has output drive limitations - that's why Steve commented on using 300ohms to keep it within spec. Besides, the transistors have quite large hFE so you don't need to drive the base that hard to turn on the 7segments!
SENSOR? what kind of output? since there is no pull up (or pull down) on this line make sure logic 1 and 0 are true and the line doesn't float as you have disabled the internal port B pullups.
-warrier
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.
well, I have tried with 3 buttons now (the third to return from the subrutine) and it continue taking 20 sec to return. I'm very sure It must be a PBP issue, because with simple test programs the speed is fine.
Can I have some corrupt file inside PBP?
Bookmarks