In Part I and Part II, and in PIC Curiosity we learned how to create a project, build it, test it and deploy on a PIC microcontroller.
Now we need to learn how to do something useful with it.
As I mentioned in PIC Curiosity post, Microchip has set of development boards which really helps microcontroller development.
I have very old one PICKit 2 Low Count Demo (I cannot even find link to it – I found next model PICKit 3), PICKit 44-Pin Demo Board, like this one but I have different microprocessor (PIC16F887) and one of the latest ones – Curuosity (this one). They are named based on the microprocessor in use.
I have created three repositories on my GitHub page, one for PICKit 2 Board, one for PICKit 44-Pin Board, and one for Curiosity board: pic690_blinking_led, pic887_blinking_led
, pic1619_blinking_led.
We already used them in previous posts. But we used only one project.
Each repository has several files to learn different parts of microcontroller programming:
main.c – Blinking LED project
main_button.c – using button to turn on the LED
main_timer.c – using timer module
main_timer_interrupt.c – using timer module with interrupt
main_interrupt.c – using interrupt module
main_adc.c – Analog to Digital conversion module
main_pwm.c – Pulse-Width modulation module
main_wdt.c – using watch dog timer
Curiosity code (PIC1619) contains also:
main_7segment.c – using 7 segment LED display
main_keypad.c – using 4×4 Universal 16 Key Keypad For Arduino
main_lcd_display.c – using LCD Display (1602A-1)
Please note that you cannot use all those file together, only one at a time. So what you can do it open the project from Part I or Curiosity, right click on Source Files, select Add Existing Item… and add all files to the project. Next right click on each .c file and select Exclude File(s) from current configuration. And leave one you want to try out (or right click and select Include File(s) in current configuration).
Now rebuild the project and deploy to the board.
I am not going into the details here about each project, each file is heavily commented and I hope each is self explanatory.