This course introduces basic concepts of PIC micro-controller programming using C. Starting from installation of required software, this course gives insight of programming the PIC microcontroller to access General Purpose Input Output (GPIO) pins, Configuring external interrupts, Timers and counters, ADCs, LCD and Keypad interfacing, PWM generation and few communication protocols like UART, I2C and SPI.
The course is well designed for beginners without any prior knowledge about the micro-controllers to get started with the subject. Also this course contains topics for advanced coders.
Few project examples like IoT temperature logger, Water level controller are added to gain more insight of PIC programming and sensor interfacing.
- Write a code to alternatively blink two LEDs connected to RB7 and RB6.
- Blink LEDs connected to RB7, RB6 and RB5 as follows:
- RB7 LED should turn on first with other two LEDs in OFF state.
- After 1 second, RB6 LED should turn on with RB7 in ON state and RB5 in OFF state.
- After 1 second, RB5 should turn on, with RB6 and RB7 in ON state.
- Turn of the three LEDs in the order of RB5 first, then RB6 and RB7 at a delay of 1 seconds each.
- The program should run in an infinite loop.
- A tactile switch connected at RB0 to start/stop blinking of LED connected to RB7. A self-locking switch at RB1 to control LED blinking at RB6. Two switches must operate independently with interrupts.