Professional Documents
Culture Documents
Micro-PIC18F (Lite)
www.microembedded.in
Table of Contents
1. Introduction. .................................................................................................................................................... 3
1.1 Overview .................................................................................................................................................... 3
1.2 Features ..................................................................................................................................................... 3
1.3 Pin Diagram ................................................................................................................................................ 4
a) PIC18F458 ................................................................................................................................................ 4
b) PIC18F4550 .............................................................................................................................................. 4
c) PIC18F4520............................................................................................................................................... 5
2. Hardware: Functional Description and Interfacing. ......................................................................................... 5
2.1 I2C Interface (EEPROM and RTC)............................................................................................................. 6
2.2 SPI Interface (EEPROM and SD Card). ..................................................................................................... 6
2.3 Analog to Digital Converter (ADC). .......................................................................................................... 7
2.4 Serial Communication using UART (RS232). ............................................................................................. 7
2.5 External Interrupt Switch ......................................................................................................................... 8
2.6 Port Extensions ......................................................................................................................................... 8
2.6.1 CN3, CN4 (ICSP) ................................................................................................................................... 8
2.6.2 CN7 ...................................................................................................................................................... 9
2.6.3 CN8 .................................................................................................................................................... 10
2.6.4 CN9 .................................................................................................................................................... 11
2.6.5 CN10 .................................................................................................................................................. 12
2.6.7 CN12 .................................................................................................................................................. 14
3. Software : Functional Description and Interfacing. ....................................................................................... 15
3.1 Programming Overview of Micro-PIC18F. ............................................................................................... 15
3.2 PC Connection Setup................................................................................................................................ 15
3.3 MPLAB X Programming IDE. .................................................................................................................... 15
3.3.1. Creating a new project ..................................................................................................................... 15
3.3.2. Opening an existing project. ........................................................................................................... 17
3.3.3. Creating a new Source file and Header File .................................................................................... 17
3.3.4. Compiling Project ............................................................................................................................. 17
3.4. Executable Flashing Tool (PICLoader.exe). ............................................................................................ 17
1. Introduction.
1.1 Overview
PIC is a family of modified Harvard architecture microcontrollers made by Microchip Technology.
The PIC microcontroller is the most widely used controller in the automation industry today. It is
the most preferred choice of engineers working in the field of industrial electronics solutions.
The Micro-PIC18F kit has interfaced the PIC18F series microcontroller, to various peripherals
on the board. Devices like LED’s and LCD, I2C interface based memory devices, RTC, SD/MMC Card
interface, Matrix Keypad, ADC, DAC, graphical LCD, Stepper motor, etc can also be interfaced on the
board.
1.2 Features
The Micro-PIC18F microcontroller board has been specifically designed keeping in mind the
needs of students for learning the PIC architecture. The board gives a complete overview for
interfacing various peripheral devices which are used in the industry and consumer devices alike. A
hands-on with the board will develop in the student the experience to design and implement
various devices and products based on the PIC Microcontroller.
b) PIC18F4550
The I2C interface from the processor has been brought out on the Micro-PIC18F board. The
Devices such as RTC (DS1307) with I2C interface have been integrated on the board. Separate Add-
on for EEPROM (AT24Cxx) is available. In such cases, these add-ons must be connected to CN11.
The Port pins have to be configured to work as I2C clock and Data lines. No jumper settings are
needed to use this interface.
The SPI EEPROM card should be connected on the CN11 header (refer CN11 pin out details).
Interfacing Details for I2C Interface.
The SPI EEPROM card should be connected on the CN11 header (refer CN11 pin out details).
Interfacing Details for SPI Interface.
The processor on the Micro-PIC18F contains a 10 bit ADC with 12 channels. The board has
provided the user with 2 channels. Analog voltage is provided using potentiometers P1 and P2. ADC
Ch7 and ADC Ch6 peripheral is connected to this input. The Analog voltage can be measured at CN3
and CN2 respectively.
Interfacing Details for ADC.
UART interface from the controller is available for the user on the Micro-PIC18F board. UART is
connected to USB to Serial.
©MicroEmbedded Technologies, 2014-2015
Micro-PIC18F Development Kit User Manual
Interfacing Details for UART.
The External Interrupt is generated using a switch connected to Port pin RB2.
CN3 PIC18F
CN3.1 Reset
CN3.2 +5V
CN3.3 GND
CN3.4 RB7 (PGD)
CN3.5 RB6 (PGC)
CN3.6 RB5 (PGM)
CN4 PIC18F
CN4.1 +5V
CN4.2 NC
CN4.3 Reset
CN4.4 RB5 (PGM)
CN4.5 NC
CN4.6 RB6 (PGC)
CN4.7 NC
CN4.8 RB7 (PGD)
CN4.9 NC
CN4.10 GND
2.6.2 CN7
CN7 PIC18F
CN7.1 +5V
CN7.2 NC
CN7.3 NC
CN7.4 +3.3V
CN7.5 RA0
CN7.6 RA1
CN7.7 RA2
CN7.8 RA3
CN7.9 RA4
CN7.10 RA5
CN7.11 RE1
CN7.12 RE0
CN7.13 RE2
CN7.14 GND
CN8 PIC18F
CN8.1 +5V
CN8.2 NC
CN8.3 RE0
CN8.4 +3.3V
CN8.5 RB0
CN8.6 RB1
CN8.7 RB2
CN8.8 RB3
CN8.9 RB4
CN8.10 RB5
CN8.11 RB6
CN8.12 RB7
CN8.13 RE1
CN8.14 GND
CN9 PIC18F
CN9.1 +5V
CN9.2 NC
CN9.3 RA0
CN9.4 +3.3V
CN9.5 RC0
CN9.6 RC1
CN9.7 RC2
CN9.8 RC3
CN9.9 RC4
CN9.10 RC5
CN9.11 RC6
CN9.12 RC7
CN9.13 RA1
CN9.14 GND
CN10 PIC18F
CN10.1 +5V
CN10.2 NC
CN10.3 RA2
CN10.4 +3.3V
CN10.5 RD0
CN10.6 RD1
CN10.7 RD2
CN10.8 RD3
CN10.9 RD4
CN10.10 RD5
CN10.11 RD6
CN10.12 RD7
CN10.13 RA3
CN10.14 GND
CN11 PIC18F
CN11.1 +5V
CN11.2 NC
CN11.3 NC
CN11.4 +3.3V
CN11.5 RB0
CN11.6 RB1
CN11.7 RB2
CN11.8 RB3
CN11.9 RB4
CN11.10 RB5
CN11.11 RB6
CN11.12 RB7
CN11.13 NC
CN11.14 GND
CN12 PIC18F
CN12.1 +5V
CN12.2 NC
CN12.3 NC
CN12.4 +3.3V
CN12.5 NC
CN12.6 NC
CN12.7 NC
CN12.8 NC
CN12.9 RB0
CN12.10 RB1
CN12.11 RC6
CN12.12 RC7
CN12.13 NC
CN12.14 GND
Note: Make sure not to select Config Bits and EEPROM Settings as these can damage the
bootloader.