I vote to re-order the code.
Hi Russ,
The waveform and any talk about HIGH / LOW is assumed to be in reference to the (ground / common / Vss) of the PIC. Your LEDs are “referenced” to the plus “rail” of the supply. That would make the LED output appear to be (upside down / negative logic). You could rewire the LEDs or re-order the code.
By the way, it is very interesting to put both LEDs on the single 1k resistor. Causing the voltage to vary differently when one, two or none of the LEDs are on! Getting, the same reading on a true RMS and a cheap 0.7 of peak meter is not an easy task! Where do you measure the voltage?
I vote to re-order the code.
-Adam-
Ohm it's not just a good idea... it's the LAW !
Bookmarks