It does not helps. And I'm not using MCLR pin for anything except programming. Tried TRISIO=%00101000 but that does not helps. Tried disabling MCLR from config, also no change. Making a pin input creates issues with others being output.
It does not helps. And I'm not using MCLR pin for anything except programming. Tried TRISIO=%00101000 but that does not helps. Tried disabling MCLR from config, also no change. Making a pin input creates issues with others being output.
Did you try a new PIC? I've never seen what you're describing. Thinking something internal might be whacked.
its a classic rmw problem.
can also be caused by excessive load on output pin (capacitive or resitive) causing pin to not achieve proper logic level.
Warning I'm not a teacher
Yes tried new chip. Output pins are connected to MPSA42 transistor via 10K resistor.
If I swap chip with 12F1840, will problem still exist?
I decided to put it aside, to give my mind some rest, and back to DS3231.
I found that it does not return seconds properly.
Have two different example codes, they work fine for minutes and hours, but does not work for seconds - seconds increase like 02 04 08 10 12 14 16 till 28, then 29 and again increase in 2 and so on.
Code:SecondsMSB=BCDSeconds & $70 SecondsMSB=SecondsMSB>>4 SecondsLSB=BCDSeconds & $0F ' Seconds=(SecondsMSB*10)+SecondsLSB 'combines DECMinutes MSB and LSB x=RTCSEC >> 4 Y=RTCseC // 16 z=X*10+Y
more than likely , you need to understand and remedy the situation.If I swap chip with 12F1840, will problem still exist?
http://www.picbasic.co.uk/forum/showthread.php?t=15843&highlight=shadow
http://www.picbasic.co.uk/forum/showthread.php?t=15013&highlight=shadow
and post your code and a schematic so we don't just keep guessing
Warning I'm not a teacher
Code is posted above.
Schematic is simple, there are 4 MPSA42 transistors, each of which is connected via 10K resistor to corresponding ports (ZERO, ONE, TWO, TRE) as shown in code. GPIO.5 is tied via 10K resistor to VDD, and button pulls it to zero.
Only addition to code above is
Code:koka: if GPIO.5=0 THEN 'if pin pressed goto tavi 'launch rotation ENDIF pause 1 GOTO KOKA
Bookmarks