In this example we will connect an LDR again but this time when the ADC value goes below a certain number we will switch an LED on, in real life this could be an alarm or a night light. The…
Code
-
-
In this example we connect an LDR to ADC channel 2 which is PA 2. Once again you will get a value in theory between 0 and 1023. The more light that there is the higher the value. We will…
-
In this example we connect a push button switch to RD0 when the button is pressed we will light an LED(s), when the button is not pressed the LED(s) will not be lit. Since we are using a QL200 development…
-
In this example we connect an RGB led to PORT C 0 – 2 of our PIC16F877A. Again we are using the Ql 200 PIC development board. The RGB LED is a common anode type, so to light an individual…
-
This is a simple ‘Hello world’ type example. This was to test out a PIc18F4520 development board that I purchased, the board comes with 8 LED’s connected to PORT B. Here is the kit I purchased AliExpress.com Product – PIC18F4520-I/P…
-
In this example we used an RGB LED breakout board, here is a picture of an Surface mount RGB breakout board which was similar to the one we used, the PIC was a PIC16F877 We will connect the Red, Green…