Hello,
Please can you confirm that the Zero Cross Detector inside the PIC16F18856 can only work with a mains input (as in the attached schematic and LTspice simulation) if there is also a resistor to ground from the ZCDxIN pin? (R5 in the attached schematic).
If the resistor to ground is absent, then the current source internal to the PIC16F18856 will not operate, and therefore zero cross will not be detected….-[Both current source and current sink inside the micro must operate (alternately) in order for zero cross detection to happen].
Section 21.2 of page 316 of the PIC16F18856 datasheet makes it clear that the zero cross detection needs both the internal current source, and also the internal current sink, inside the micro, to operate alternately. If one never operates then there will be no zero cross detection.
As such, the resistor to ground (R5 in the attached schematic, is necessary for zero cross detection).
Do you agree?
The schematic in the PIC16F18856 datasheet shows a situation where the AC source and the microcontroller are both referenced to the same “ground”. But with the AC Mains setup of the attached schematic and simulation, this situation is not prevalent…and therefore the resistor to ground is needed (ie from ZCDxIN pin to ground)…do you agree?
PIC16F18856 datasheet:
**broken link removed**
If the current source doesnt get activated, then the OUT bit of the ZXDxCON register never gets cleared, and thus zero cross would never be detected. Therefore R5 is needed in the top post schematic.
The problem is, the datasheet doesnt say what current has to flow from the internal current source, or to the internal current sink, in order for current flow to be acknowledged by the micro.
That is, the PIC18F18856 datasheet doesnt tell what is the detection threshold of current. Do you know?
Even microchips app note on this, fails to say what is the current detection threshold...
https://ww1.microchip.com/downloads/en/AppNotes/90003138A.pdf
Please can you confirm that the Zero Cross Detector inside the PIC16F18856 can only work with a mains input (as in the attached schematic and LTspice simulation) if there is also a resistor to ground from the ZCDxIN pin? (R5 in the attached schematic).
If the resistor to ground is absent, then the current source internal to the PIC16F18856 will not operate, and therefore zero cross will not be detected….-[Both current source and current sink inside the micro must operate (alternately) in order for zero cross detection to happen].
Section 21.2 of page 316 of the PIC16F18856 datasheet makes it clear that the zero cross detection needs both the internal current source, and also the internal current sink, inside the micro, to operate alternately. If one never operates then there will be no zero cross detection.
As such, the resistor to ground (R5 in the attached schematic, is necessary for zero cross detection).
Do you agree?
The schematic in the PIC16F18856 datasheet shows a situation where the AC source and the microcontroller are both referenced to the same “ground”. But with the AC Mains setup of the attached schematic and simulation, this situation is not prevalent…and therefore the resistor to ground is needed (ie from ZCDxIN pin to ground)…do you agree?
PIC16F18856 datasheet:
**broken link removed**
If the current source doesnt get activated, then the OUT bit of the ZXDxCON register never gets cleared, and thus zero cross would never be detected. Therefore R5 is needed in the top post schematic.
The problem is, the datasheet doesnt say what current has to flow from the internal current source, or to the internal current sink, in order for current flow to be acknowledged by the micro.
That is, the PIC18F18856 datasheet doesnt tell what is the detection threshold of current. Do you know?
Even microchips app note on this, fails to say what is the current detection threshold...
https://ww1.microchip.com/downloads/en/AppNotes/90003138A.pdf
Attachments
Last edited: