Continue to Site

Reply to thread

LEDs can´t be switchoe ON or OFF using code, unless you define what ON and OFF means.


* usually you can set a PORT output HIGH or LOW

* but to do so you first need to define the port as an output.

* and you need to define (depending on your LED wiring) whether LOW or HIGH means ON


Also PWM is not the best method to debug a code, because

* the human eye can´t barely differentiate between a constant 50% and 100% duty cycle.

* the PWM module will (may) be running even if the main() is stalled in an endless while(1) loop. . or even if the microcontroler is in idle mode ...


Klaus


Part and Inventory Search

Back
Top