CPU is reseting from RA0 and RA1
Hi, I want to share an annoying behaviour of RA0 and RA1 pins of 16f1507 and 16f15354.
In two projects one using 1507 other 15354, pins RA0 and RA1 are connected to buzzer which has several nf capacitance. Each pin is connected to gnd by 100pf capacitors. They are multiplexed to buzz and to read button (for 15354 one of them is used as analog input).
For 1507 RA1 ıs used to lit a led (active low) then read an optocoupler output from RA0. But whenever I complete reading and turning RA1 high chip is resetting. If I short circuit RA0 to gnd it does not reset. If appears that a pulse from RA1 to RA0 through buzzer capacitance is causing it. There is no reason for this reset, LVP is disabled, MCLR is input. I solved it by setting both pins as output low then turning both high simultaneously. By chance my hardvare was allowing it.
For 15354 when buzzer is activated I was setting these pins alternatingly 01 and 10, but at the first change attempt chip was resetting. That is solved by first setting both pins low then applying desired bit pattern.
This may be a common behaviour of pic16f1xxx chips that should be investigated.