Hi
Maybe not quite what you are after but you can reference pins directly, for example in a decision
Regards
16f18877 internal Zero Cross Detector
-
chipfryer27
- Valued Contributor
- Posts: 1929
- http://meble-kuchenne.info.pl
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 421 times
- Been thanked: 644 times
-
chipfryer27
- Valued Contributor
- Posts: 1929
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 421 times
- Been thanked: 644 times
Re: 16f18877 internal Zero Cross Detector
Hi
You can indeed reference ports/pins in calculations.
This calculation immediately turns on the inbuilt LED on a lolin-lite (pin 22, active low)
Regards
You can indeed reference ports/pins in calculations.
This calculation immediately turns on the inbuilt LED on a lolin-lite (pin 22, active low)
Regards
Re: 16f18877 internal Zero Cross Detector
Maybe an easier method would be to simply connect a dual optical isolator via resistor directly to the micro controller transformer on the secondary ac side. Your open collector outputs will switch at every zero crossing.
That signal is connected to the hardware interrupt which services the routine.
If you need schematic help, I do have a working example.
Send me a note at aw@machineautomationproducts.net
That signal is connected to the hardware interrupt which services the routine.
If you need schematic help, I do have a working example.
Send me a note at aw@machineautomationproducts.net