Page 3 of 3

Re: 16f18877 internal Zero Cross Detector

Posted: Thu Feb 12, 2026 9:57 pm
by chipfryer27
Hi

Maybe not quite what you are after but you can reference pins directly, for example in a decision


Screenshot 2026-02-12 214622.jpg
Screenshot 2026-02-12 214622.jpg (87.23 KiB) Viewed 105 times
Regards

Re: 16f18877 internal Zero Cross Detector

Posted: Thu Feb 12, 2026 10:05 pm
by mnfisher
Possibly!

I suspect you might be able to do $PORTA0 = 1 in a calculation too?

Though - this is new to me - and I've not tried it...

Re: 16f18877 internal Zero Cross Detector

Posted: Fri Feb 13, 2026 5:22 am
by chipfryer27
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)

Screenshot 2026-02-13 051633.jpg
Screenshot 2026-02-13 051633.jpg (48.19 KiB) Viewed 77 times

Regards