Welcome to "PIC Journey: Navigating the World of Microchip's Microcontrollers".
In this comprehensive learning series, we invite enthusiasts, students, and professionals alike to embark on an exciting voyage into the intricate world of PIC microcontrollers by Microchip Technology. Whether you're a beginner curious about the fundamentals or a seasoned tinkerer looking to expand your skillset, this journey is tailored for you.
The projects shared in this repository are educational in nature and aim to introduce beginners and hobbyists to C and Assembly programming for PIC10F, PIC12F, and PIC16F microcontrollers. I myself, at the time of writing these lines, fall into the category of a beginner in projects involving Microchip microcontrollers. However, I decided to document this journey. I believe this initiative may help other interested parties who wish to embark on a similar journey.
With that said, if you find any errors or opportunities for improvement in the projects shared in this repository, please let me know.
The projects folder contains several projects involving circuits with the PIC16F628A, PIC16F887, PIC12F675, LEDs and sesors that may help beginners. Throughout my learning journey, I made a point of documenting every step of the development of each project, including the source codes. I believe that this detailed documentation can offer the target audience valuable shortcuts for developing more complex projects. The "Content" section below references each project, with links to the full documentation and source codes.
All content (including code and schematic) of this repository can be freely distributed using the MIT Free Software model. By using or installing Library you are agreeing to the terms of the MIT licence (see license.txt file).
Copyright (c) 2024 Ricardo Lima Caratti.
Contact: [email protected].
- Contribution
- About the author
- Projects
- Blink a LED - PIC10F200, PIC12F675 and PIC16F628A
- Controlling multiple LEDs - PIC12F675 and PIC16F628A
- PIC microcontrollers with LCD 16x2 - PIC16F
- Developing a library for 16x2 LCD - PIC16F
- OLED I2C Display (Under construction..)
- DC motor and Cooler and PWM with PIC microcontrollers - PIC16F
- LED RGB PIC16F
- PIC microcontrollers and HC-S04 ultrasonic sensor - PIC10F200, PIC12F675 and PIC16FXXX
- PIC microcontrollers and LM35 and TMP36 temperature sensors - PIC12F675 and PIC16F877
- PIC10F200 and 74HC595 Shift Register device
- 1-Wire protocol with PIC and DS18B20
- Single wire protocol with DHT11
- MQ series gas sensor
- UART and BLUETOOTH
- Controlling Servo with PIC microcontrollers (PWM)
- Using PUSH BUTTONS with interrupt
- PIC and 74HC151 Multiplexer
- PIC and 74HC4067 Analog Multiplexer
- PIC Microcontroller Programming Tools
- PICKit3 and ICSP
- Tips
- References
If you've found value in this repository, please consider contributing. Your support will assist me in acquiring new components and equipment, as well as maintaining the essential infrastructure for the development of future projects. Click here to make a donation or scan the QR code provided below.
I hold a Master's degree in Educational Technology from the Federal University of Ceará, where I delved into the ways technology can enhance learning experiences. My passion for computer science led me to specialize in it, focusing on Distributed Systems Development with an Object-Oriented approach, at the University of Brasília. My academic journey began with a Bachelor's degree in Information Systems from the União Pioneira de Integração Social (UPIS-Brasília). Outside the classroom, my main hobbies are electronics and Amateur Radio.
MPLAB X is an integrated development environment (IDE) produced by Microchip Technology for the development of embedded applications on PIC microcontrollers. MPLAB X is based on the open-source NetBeans platform and runs on Windows, macOS, and Linux operating systems, offering a versatile and user-friendly interface for developers.
Key features of MPLAB X include:
-
Cross-Platform Support: Compatible with multiple operating systems, allowing for a flexible development environment.
-
Advanced Editor: Features like code completion, syntax highlighting, and a range of debugging tools aid in efficient code development.
-
Debugger Integration: Supports in-circuit debugging and emulation for Microchip's microcontrollers and digital signal controllers.
-
Project Management Tools: Simplifies the process of managing multiple project elements, including source files, libraries, and toolchains.
-
Compiler Integration: Compatible with Microchip's MPLAB XC Compilers as well as other third-party compilers.
-
Version Control Support: Offers support for popular version control systems for collaborative and organized development.
-
Extensibility: Users can add new functionality or support for new devices through plugins.
-
Simulator: Includes a simulator for virtual testing of code, which is useful for early stage development and troubleshooting.
MPLAB X is widely used by professionals, hobbyists, and students due to its comprehensive features and the broad range of Microchip devices it supports. It's a crucial tool for anyone working on projects involving Microchip's microcontrollers or digital signal controllers.
See MPLAB® X Integrated Development Environment (IDE)
The K150 is a low-cost, high-performance PIC programmer. It is designed to support a wide range of popular PIC microcontroller chips. The K150 allows for various operations such as reading, writing, and encryption of the microcontroller's memory. One of its key features is the use of high-speed USB communication, which facilitates faster programming compared to some other programmers like PICSTART. The device's programming speed and quality are reliable, making it a suitable choice for both hobbyists and professionals working with PIC microcontrollers.
To use the K150 PIC programmer, several key components and steps are required:
-
K150 Programmer Hardware: The primary device needed is the K150 programmer itself. It's a compact unit designed specifically for programming PIC microcontrollers.
-
Computer with USB Port: A computer (Windows-based, typically) with a USB port is required to connect the K150 programmer. The computer acts as the host for the programming software.
-
Programming Software: Software compatible with the K150 is needed to interface with the programmer. This software is used to write, read, and transfer the microcontroller code. Popular choices include "PICPgm Programmer" or "Microbrn".
-
Device Drivers: Appropriate drivers must be installed on the computer to ensure that the K150 programmer is recognized and can communicate effectively. These drivers are usually available on the website of the K150 manufacturer or from the software provider.
-
USB Cable: A USB cable is used to connect the K150 programmer to the computer. This cable is essential for data transfer and powering the device.
-
PIC Microcontroller: The specific PIC microcontroller that you intend to program. The K150 supports a wide range of PIC microcontrollers.
-
Source Code for the PIC: The actual program or code that you want to write into the PIC microcontroller. This code is written in a suitable programming language, usually Assembly or C.
-
Basic Knowledge of PIC Programming: A fundamental understanding of microcontroller programming and operation is necessary to effectively use the K150.
Once everything is set up, the programming process involves connecting the PIC microcontroller to the K150, using the software to load and transfer the code, and then writing the code to the microcontroller's memory. The K150 provides a cost-effective and user-friendly solution for programming PIC microcontrollers, making it a popular choice among hobbyists and educators.
The PICkit 3 is a programmer and debugger for Microchip's PIC microcontrollers and dsPIC digital signal controllers. It is part of Microchip's suite of tools for developing and debugging embedded systems applications using their microcontrollers. Here are some key features of the PICkit 3:
-
Compatibility: The PICkit 3 is compatible with a wide range of PIC microcontrollers and dsPIC digital signal controllers, making it a versatile tool for a broad array of development projects.
-
USB Interface: It connects to a PC via USB, providing an easy and convenient way to program and debug microcontrollers without needing an external power supply.
-
In-Circuit Debugging: The tool allows for in-circuit debugging, which means you can program, monitor, and debug your code directly on the target device while it is operating within your system. This feature is crucial for real-time testing and troubleshooting.
-
MPLAB IDE Integration: It integrates seamlessly with Microchip's MPLAB Integrated Development Environment (IDE), offering a full range of development tools within a single platform. This integration simplifies the programming and debugging process.
-
Programming: The PICkit 3 can be used to program microcontrollers with the user's application code. It supports a variety of programming modes and can program memory, EEPROM, and other components of the microcontroller.
-
Portability: Its compact size makes it portable and convenient for use in various settings, from development labs to educational environments.
-
Advanced Features: It supports advanced features like serial wire debugging and can provide power to the target board if needed.
-
Target Voltage Range: The PICkit 3 can support a target voltage range of 2.0V to 6.0V.
Overall, the PICkit 3 is a powerful and versatile tool for anyone working with Microchip's range of microcontrollers and digital signal controllers, from hobbyists and students to professional engineers.
Source: PICkit™ 3 Programmer/Debugger User’s Guide
Source: Pickit 3 Programmer/Debugger
- PICkit™ 3 Programmer/Debugger User’s Guide
- In-Circuit Serial Programming™ (ICSP™) Guide
- Diagram 01 - ICSP Wiring (PIC Series)
- Pickit 3 Programmer/Debugger
- PIC16F887 Data Sheet
- PIC16F87XA Data Sheet
- PIC16F627A/628A/648A Data Sheet
- PIC10F200 Data Sheet
- PIC12F675 Data Sheet
- PIC10F220/222 Data Sheet
- MPLAB® XC8 C Compiler User’s Guide
- MPASMTM Assembler, MPLINKTM Object Linker, MPLIBTM Object Librarian User’s Guide
- MPLAB® XC8 PIC® Assembler User's Guide
- Simulator
- PICSimLab means Programmable IC Simulator Laboratory
- PICSimLab - Programmable IC Simulator Laboratory
- M. P. Bates, Interfacing PIC microcontrollers: Embedded design by interactive simulation. Newnes, 2013.
- F. Pereira, Microcontroladores PIC: programação em C. Saraiva Educação SA, 2007.
- Experiments with PIC16F628A
- PIC®Microcontrollers with Enhanced Mid-Range Core Building Upon a Foundation of Success
- PICmicroTM Mid-Range MCU Family Reference Manual
- PIC Projects - Site with many nice projects using PIC microcontrollers
- PIC10F200 - Smallest and cheapest microcontroller - tutorial
- Assemblers for PIC® and AVR® Microcontrollers
- Assembler Overview
- MPLAB® XC8 PIC Assembler User's Guide for Embedded Engineers
- PIC16C5X / PIC16CXXX Math Utility Routines
- Math Utility Routines
- Microcontroller Basics - With PIC10F200
- Introduction to the MPLAB® XC8 PIC® Assembler
- PIC Microcontroller Programming - PIC AS Assembler using MPLAB X IDE, Blinking LED
- GNL Project - Youtube Channel with many PIC10F200 project and Assembly programming
- How to Use a Simple Microcontroller Part 1 - An Introduction (PIC10F200)
- 2Bit - PIC10F200 Programming
- PIC assembly programming