The 16f18877 has a Zero Cross Detector as one of its CIP.
I cannot find this component within FC.
Is the ZCD accessed by utilizing the "CODE" command icon within the flow chart?
Or am I missing something?
Did a search within FC and no results.
16f18877 internal Zero Cross Detector
-
hippalator
- Posts: 37
- http://meble-kuchenne.info.pl
- Joined: Tue Jul 15, 2025 9:05 pm
- Has thanked: 5 times
-
mnfisher
- Valued Contributor
- Posts: 1826
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 153 times
- Been thanked: 864 times
Re: 16f18877 internal Zero Cross Detector
Yes, you would need to use some C to enable the ZCD module - this would be in either a code block or in a custom interrupt.
See section 21 of the datasheet.
It looks relatively straightforward - but if using it to measure mains zero crossing then great care is needed with the wiring (not something for a breadboard
)
The syntax REGISTERbits.FIELD = n (for example ZDCONbits.EN = 1) or REGISTER = n to set the whole register is used.
Martin
See section 21 of the datasheet.
It looks relatively straightforward - but if using it to measure mains zero crossing then great care is needed with the wiring (not something for a breadboard
The syntax REGISTERbits.FIELD = n (for example ZDCONbits.EN = 1) or REGISTER = n to set the whole register is used.
Martin