Thanks Melanie,
The Compiler is V1.45 and Programmer is WinPicProg V1.95.
Fuses set for Watch Dog, Power Up, Brown Out, Int Osc.
I am aware of the 16F628A pins setup.
This is not a hardware problem.
Also, it appears to affect all portA pins being used as output.
I didn't notice that before because the other pins are normally held at low (0) when I2C is called.
It's definitely an effect of the I2C actions - the interruption of the output is exactly in synch with the 1 second polling of the RTC!
I have also tested the circuit on a protoboard - it does the same.
Unfortunately I don't know much about Assembly coding, so I can't interpret the I2C routines in the PBL.inc file.
As you know, when writing to the portA register we mask out any other pins to retain their state.
Is this also the case with the I2C routines - do they write as a complete byte or are they capable of writing to single pins alone?
The effect is similar to a non-masked write.
After the interruption, the affected pin restores to it's correct state due to the program loop.
Viewed on a LED, you see a mainly "On" state, with a visible short interruption at a "one second" rate.
kenmac
Bookmarks