You are on page 1of 20

XK-EPM1001A

PIC SINGLE CHIP MICROCOMPUTER


EXPERIMENT SET

INSTRUCTION BOOK

CONTENT

0
Chapter 1 Product Introduction........................................................................................................2
1. Product overview...................................................................................................................2
2. Technical parameter..............................................................................................................2
3. Product Structure..................................................................................................................2
4. MPLAB® X Integrated Development Environment (IDE).......................................................3
5. MPLAB® XC Compilers........................................................................................................3
Chapter 2 Experiment Items.............................................................................................................4
Experiment 1 Flow water light experiment................................................................................4
Experiment 2 Nixie tube dynamic display experiment..............................................................5
Experiment 3 Independent key input experiment......................................................................7
Experiment 4 Relay drive Experiment.......................................................................................8
Experiment 5 Matrix keyboard input experiment.......................................................................9
Experiment 6 LCD Experiment................................................................................................11
Attachment.....................................................................................................................................13
Attachment 1 K150 PIC Programmer User Manual................................................................13

1
Chapter 1 Product Introduction
1. Product overview

The PIC experimental set suitcase adopts modular design. The


experiment panel integrates the power source module,
PIC16F877A minimum system, PIC16F876A minimum
system,PIC16F628A minimum system, PIC programmer and LED,
Nixie tube, logic buttons, matrix buttons and relay.

2. Technical parameter

1) Power source: AC220V±10%,50HZ,≤10W


2) 405mm×320mm×130mm (L*W*H)
3) Working temperature: 0~+50℃
4) Storage temperature: -20℃~+80℃
5) Humidity: 40~90%RH

6) Experiment power:DC5V, 2A,

3. Product Structure

Figure 1.1.2

No. Function Module No. Function module


1 Power Supply 7 PIC16F876A Microcontroller Min system
2 Breakboard 8 4x4 Matrix Keypad
3 Seven Segment Digital Tube Display 9 Relay
4 PIC16F877A Microcontroller Min system 10 LED
5 PIC16F628A Microcontroller Min system 11 button

2
6 PIC Programmer 12

4. MPLAB® X Integrated Development Environment (IDE)

MPLAB X IDE is a software program that runs on a PC (Windows ®, Mac OS®, Linux®) to
develop applications for Microchip microcontrollers and digital signal controllers. It is called an
Integrated Development Environment (IDE), because it provides a single integrated
"environment" to develop code for embedded microcontrollers.
MPLAB X Integrated Development Environment brings many changes to the
PIC® microcontroller development tool chain. Unlike previous versions of the MPLAB IDE which
were developed completely in-house, MPLAB X IDE is based on the open source NetBeans IDE
from Oracle. Taking this path has allowed us to add many frequently requested features very
quickly and easily, while also providing us with a much more extensible architecture to bring you
even more new features in the future.
MPLAB X IDE download address:
http://www.microchip.com/mplab/mplab-x-ide

5. MPLAB® XC Compilers

MPLAB® XC Compilers produce highly optimized code. The PRO edition has the most features
and produces the best code optimization. A low-cost option of the compiler is also available as
the Standard Edition. MPLAB® XC Compiler licenses are also available as Free editions and have
the option of a 60-day PRO evaluation trial.
MPLAB® XC Compiler Solutions for Any PIC® MCU and Any Project
The MPLAB XC Compiler, provides a comprehensive solution for your project’s development
software needs and replaces all MPLAB C and HI-TECH compilers. The MPLAB XC compiler:
Supports all 8-, 16- and 32- bit PIC MCUs and dsPIC® DSCs
Integrates with MPLAB X IDE to provide a full graphical front end:
Editing errors and breakpoints match the corresponding lines in source code
Single step through C and C++ source code to inspect variables and structures at critical points
Data structures with defined data types, including floating point, display in watch windows
Runs on Windows, Linux and Mac OS X
Offers different optimization levels to suit your needs with FREE downloads available
MPLAB® XC Compilers download address:
http://www.microchip.com/mplab/compilers

3
Chapter 2 Experiment Items
Experiment 1 Flow water light experiment

1. Experiment Purpose
1.1 Familiar with PIC16F628A SCM
1.2 Master I/O port using method of PIC16F628A
1.3 Master working principle and using method of LED
1.4 Familiar with MPLAB X IDE software and PIC programmer using method

2. Experiment Appliance
No. Name Quantity
1 PIC SCM EXPERIMENT BOX 1
2 K2 JUMPER WIRES Some
3 The computer with MPLAB X IDE and programmer
1
software

3. Experiment Content
SCM control LED to realize the flow water light
4. Experiment Steps
4.1 Experiment wiring according to Figure 2.1.1

Figure 2.1.1 Flow water light principle diagram


(1) VCC2 of PIC16F628A SCM minimum system connects the VCC of power module, VSS2 port
connects the GND of power module;
(2) GND of LED Unit connects GND of power module, D1~D8 ports separately connects
RC0~RC7 and RD0~RD3 ports of SCM minimum system, D1~D8 ports separately connects
RB0~RB3 ports of PIC16F628A SCM minimum system

4
4.2 Download hex program
According to “K150 PIC Programmer User Manual” open the programmer software, load the
“hex” file of “\Programmer\led\led.hex” that under the disc directory, press power key S6, the
toggle switch is turned to “PROGRAM”, programming for SCM PIC16F877A, after successfully
programming, turn the toggle switch to “RUN”, finish experiment, disconnect the wirings related
the ICSP socket.

4.3 Operation demo


(1) Plug in the power line, successively open AC and DC power switch
(2) LED is on/off, to realize the flow water function
(3) Experiment finish, successively disconnect DC switch, AC switch

Experiment 2 Nixie tube dynamic display experiment

1. Experiment Purpose
1.1 Familiar with PIC16F877A SCM
1.2 Master working principle and using method of common cathode Nixie tube
1.3 Master the principle and using method of BCD code Nixie tube dynamic display
1.4 Master working principle and using method of chip CD4511
1.5 Familiar with MPLAB X IDE software and PIC programmer using method

2. Experiment Appliance
No. Name Quantity
1 PIC SCM EXPERIMENT BOX 1
2 K2 JUMPER WIRES Some
3 The computer with MPLAB X IDE and programmer software 1

3. Experiment Content
SCM control Nixie tube to realize 60s counting down display

4. Experiment Steps
4.1 Experiment wiring according to Figure 2.2.1
(1) VCC1 of PIC16F877A SCM minimum system connects the VCC of power module, VSS1 port
connects the GND of power module;
(2) VCC of 4 Digit Display Unit connects VCC of power module, GND of 4 Digit Display Unit
connects the GND of power module, A、B、C、D and DP separately connects RA0~RA4 ports of
SCM minimum system, BR1~BR4 separately connects RB0~RB3 port of SCM min system.

5
Figure 2.2.1 Nixie tube dynamic display principle diagram

4.2 Download hex program


According to “K150 PIC Programmer User Manual” open the programmer software, load the
“hex” file of “\Programmer\digital\digital.hex” that under the disc directory, press power key S2,
the toggle switch is turned to “PROGRAM”, programming for SCM PIC16F877A, after
successfully programming, turn the toggle switch to “RUN”, finish experiment, disconnect the
wirings related the ICSP socket.

4.3 Operation demo


(1) Plug in the power line, successively open AC and DC power switch
(2) Observe the nixie tube 60 seconds count down
(3) Experiment finish, successively disconnect DC switch, AC switch

5. Note
Pin DP of dynamic nixie tube impending is up pull (high level)

6
Experiment 3 Independent key input experiment

1. Experiment Purpose
1.1 Familiar with PIC16F628A SCM;
1.2 Master the working principle and method of independent button high & low level change
1.3 Familiar with MPLAB X IDE software and PIC programmer using method

2. Experiment Appliance
No. Name Quantity
1 PIC SCM EXPERIMENT BOX 1
2 K2 JUMPER WIRES Some
3 The computer with MPLAB X IDE and programmer software 1

3. Experiment Content
Control the on/off of LED by the toggle switch

4. Experiment Steps
4.1 Experiment wiring according to Figure 2.3.1

Figure 2.3.1 independent button input principle


(1) VCC2 of PIC16F628A SCM minimum system connects the VCC of power module, VSS2 port
connects the GND of power module;
(2) GND of LED Unit connects GND of power module, D4~D4 ports separately connects
RC0~RC7 and RD0~RD3 ports of SCM minimum system, D1~D4 ports separately connects
R40~R43 ports of PIC16F628A SCM minimum system
(3) VCC of Button Unit connects VCC of power module, GND of Button Unit connects GND of
power module, S1~S4 separately connects RB0~RB3 ports of PIC16F628A SCM minimum
system.

7
4.2 Download hex program
According to “K150 PIC Programmer User Manual” open the programmer software, load the
“hex” file of “\Programmer\key\key.hex” that under the disc directory, press power key S6, the
toggle switch is turned to “PROGRAM”, programming for SCM PIC16F877A, after successfully
programming, turn the toggle switch to “RUN”, finish experiment, disconnect the wirings related
the ICSP socket.

4.3 Operation demo


(1) Plug in the power line, successively open AC and DC power switch
(2) Observe the on/off situation of LED through dial the toggle switch
(3) Experiment finish, successively disconnect DC switch, AC switch

Experiment 4 Relay drive Experiment

1. Experiment Purpose
1.1 Familiar with PIC16F628A SCM
1.2 Familiar with relay drives circuit
1.3 Familiar with MPLAB X IDE software and PIC programmer using method

2. Experiment Appliance
No. Name Quantity
1 PIC SCM EXPERIMENT BOX 1
2 K2 JUMPER WIRES Some
3 The computer with MPLAB X IDE and programmer software 1

3. Experiment Content
Control relay On/off by keys

4. Experiment Steps
4.1 Experiment wiring according to Figure 2.4.1
(1) VCC2 of PIC16F628A SCM minimum system connects the VCC of power module, VSS2
port connects the GND of power module;
(2) VCC of Relay Unit connects VCC of power module, GND of Relay Unit and LED Unit
connects GND of power module, KA1 port connects RA0 ports of SCM minimum system, NO1
port connects D1 ports of LED Unit,
(3) VCC of Button Unit connects VCC of power module, GND of Button Unit connects GND of
power module,S1 port connects RB0 ports of PIC16F628A SCM minimum system.
4.2 Download hex program
According to “K150 PIC Programmer User Manual” open the programmer software, load the
“hex” file of “\Programmer\relay\relay.hex” that under the disc directory, press power key S6, the
toggle switch is turned to “PROGRAM”, programming for SCM PIC16F877A, after successfully

8
programming, turn the toggle switch to “RUN”, finish experiment, disconnect the wirings related
the ICSP socket.

Figure 2.4.1 Relay drive principle diagram


4.3 Operation demo
(1) Plug in the power line, successively open AC and DC power switch
(2) Through the key to control ON/OFF of the relay, observe the ON/OFF of LED
(3) Experiment finish, successively disconnect DC switch, AC switch

Experiment 5 Matrix keyboard input experiment

1. Experiment Purpose
1.1 Familiar with PIC16F876A SCM;
1.2 Learn 4×4 matrix keyboard working principle and using method
1.3 Familiar with MPLAB X IDE software and PIC programmer using method

2. Experiment Appliance
No. Name Quantity
1 PIC SCM EXPERIMENT BOX 1
2 K2 JUMPER WIRES Some
3 The computer with MPLAB X IDE and programmer software 1

3. Experiment Content
Press the keys 1~16 on the matrix keyboard, Nixie tube displays the corresponding number
1~16.
4. Experiment Steps
4.1 Experiment wiring according to Figure 2.5.1

9
Figure 2.5.1 Matrix keyboard principle diagram
(1) VCC3 of PIC16F876A SCM minimum system connects the VCC of power module, VSS3 port
connects the GND of power module;
(2) VCC of 4 Digit Display Unit connects VCC of power module, GND of 4 Digit Display Unit
connects the GND of power module, A、B、C、D and DP separately connects RA0~RA4 ports of
PIC16F876A SCM minimum system, BR1~BR2 separately connects RB0~RB1 port of
PIC16F876A SCM min system
(3) VCC of matrix keyboard connects VCC of power module, L1~L4 separately connects
RC0~RC3 ports of PIC16F876A SCM minimum system, H1~H4 separately connects RC4~RC7
port of PIC16F876A SCM min system.

4.2 Download hex program


According to “K150 PIC Programmer User Manual” open the programmer software, load the
“hex” file of “\Programmer\16keypad\16keypad.hex” that under the disc directory, press power
key S3, the toggle switch is turned to “PROGRAM”, programming for SCM PIC16F877A, after
successfully programming, turn the toggle switch to “RUN”, finish experiment, disconnect the
wirings related the ICSP socket.

4.3 Operation demo


(1) Plug in the power line, successively open AC and DC power switch
(2) Successively press key “1~16”, the nixie tube corresponding display “1~16”

10
(3) Experiment finish, successively disconnect DC switch, AC switch

Experiment 6 LCD Experiment

1. Experiment Purpose
1.1 Familiar with PIC16F877A SCM;
1.2 Learn the work principle and using method of LCD1602
1.3 Familiar with MPLAB X IDE software and PIC programmer using method

2. Experiment Appliance
No. Name Quantity
1 PIC SCM EXPERIMENT BOX 1
2 K2 JUMPER WIRES Some
3 The computer with MPLAB X IDE and programmer software 1

3. Experiment Content
Through the LCD to display ”Welcome to China!”

4. Experiment Steps
4.1 Experiment wiring according to Figure 2.6.1
(1) VCC1 of PIC16F876A SCM minimum system connects the VCC of power module, VSS1
port connects the GND of power module;
(2) VCC of LCD1602Unit connects VCC of power module, GND of LCD1602 Unit connects the
GND of power module, RS、RW、E separately connects RA0~RA3 ports of PIC16F877A SCM
minimum system, DB0~DB7 separately connects RC0~RC7 port of PIC16F877A SCM min
system

4.2 Download hex program


According to “K150 PIC Programmer User Manual” open the programmer software, load the
“hex” file of “\Programmer\LCD1602\LCD1602.hex” that under the disc directory, press power key
S2, the toggle switch is turned to “PROGRAM”, programming for SCM PIC16F877A, after
successfully programming, turn the toggle switch to “RUN”, finish experiment, disconnect the
wirings related the ICSP socket.
4.3 Operation demo
(1) Plug in the power line, successively open AC and DC power switch
(2) Successively press key “1~16”, the nixie tube corresponding display “1~16”
(3) Experiment finish, successively disconnect DC switch, AC switch

11
Figure 2.6.1 LCD1602 principle diagram

12
Attachment
Attachment 1 K150 PIC Programmer User Manual

1. Production Overview
K150 is one kind of PIC programmer with high performance. It supports the normal PIC chip
programming 、 readout 、 encryption etc. K150 using high speed USB communication mode,
programming speed is fast, programming quality is steady and reliable, full automatic
programming and checking. K150 equips with DIP programming seat with 40pin, it will directly
program for DIP chip of 8pin~10pin; the chip of 8pin~40pin and chip except 8pin~40pin will be
online download by onboard ICSP interface. Software compatible with
Windows98 、Windows2000/NT、Windows XP、Windows7 etc. The whole programmer system
running steady, it’s not big easy for production、research、project site and PIC single chip using
and learning.

2. USB Driver installation


Using the USB wire to connect the PC and
programmer, then can do programming, the first time
to do programming required to install USB equipment
drive program as the presentation
1 ) The minimum requirement of computer system
configuration:
To install USB_Driver driving program, must be meet
the requirement of the hardware and software, as following:
Pentium、Pentium-II or PC compatible with processor;
 Windows95、Windows98、WindowsNT4.0、Windows2000、Windows XP、Win7;
 At least 16MRAM;
 At least 20MB hardware.

2.1 USB drive installation


PL2303 Driver in disc directory.. \software\K150 PIC Programmer;
PL2303 newest download address:
http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=225&pcid=41

1). Open your computer and enter into interface, running or double-click the PL-2303 Windows
Driver Installer program.

2). The Installation guide will inform that the PL-2303(USB-to-Serial driver) will be installed on
your computer. Click Next continue.

13
3). The PL-2303 Driver Installer program will then start to install the drivers needed.
4). Click the “Finish“ button to completely the Installation program. If user connect the USB wire
which with programmer to the PC while running the setup installation, then it required unplug and
then re-plug the cable for the system to detect the device.

5). Using USB wire connects the serial port adaptor to computer USB port, system required to
inquiry the driver, and take this USB port as “Profile USB-to-Serial Comm” Port. Go to Device
Manager and check for the “Prolific USB-to-Serial Comm Port” device and the COM port number
assigned by Windows.

6).You can also right-clicking on the “Prolific USB-to-Serial Comm Port”device and select
“Properties” and “Driver“ tab.

14
3. K150 PIC programmer using method

3.1 User click the “microbrn.exe” in the file of “K150 PIC programmer” :
the interface show as following:

3.2 Setting of K150 PIC programmer


1).One port of USB data cable inserted into USB port of PC, the other port inserted into USB port
of programmer,
Now, the red light on programmer is bright. Start programming software, software automatic to
identify the serial port (as above pic. COM3), if cannot auto identify, it will required manual to set.
2).Manual setting method: click: File—Port, change the virtual serial port to the displayed value
when installing the USB driver, for example: COM6, then fill “6”, then click “OK” .

15
3).click : File--Programmer , select the version of programmer K150 to finish the setting of
programmer.

4.Operation of K150 PIC programmer directly to programming.


Basic operation:
(Read),(Blank),(Program),(Verify) ,(Callb),(Blank),(Fuses) etc.
4.1 select chip model of programming,

4.2 Put the chip which required to programming on the K150 programmer, note that the first pin
position of chip.
Click:”File--Load” or click “Load” button on software interface, selects the hex file which need to
be written.

16
4.3 Click: programming button, then do written operation on chip, see following diagram. The blue
light on programmer is bright during programming.

4.4 When programming popup the window of picture 1, click “yes” go on programming, it will
show the progress bar of programming, finish programming, popup picture 2, that’s mean
programming successfully, if not there will show the relative error prompting.

Picture1 Picture 2
4.5、For (Read),(Blank),(Verify) and other senior function of programmer configuration, user
can operation according to actual status.

5.Operation of ICSP programmer


Based on the following line sequence, user can directly connect the Pin of PIC SCM with
ICSP interface of K150 programmer, finish the serial line programming.
Details ICSP wiring order is (namely the pins corresponding function)
1.VPP; 2.VCC; 3.GND; 4.DATA (PGD); 5. CLK (PGC); 6.null (NC)
During the initial design phase of the application circuit, certain considerations have to be taken
into account. Figure 1 shows and typical circuit that addresses the details to be considered during
design. In order to implement ICSP on your application board you have to put the following issues
into consideration:
1. Isolation of the GP3/MCLR/VPP pin from the rest of the circuit.

17
2. Isolation of pins GP1 and GP0 from the rest of the circuit.
3. Capacitance on each of the VDD, GP3/MCLR/VPP, GP1, and GP0 pins.
4. Interface to the programmer.
5. Minimum and maximum operating voltage for VDD.

Typical application circuit

Note:details show in: In-Circuit Serial Programming™(ICSP™) Guide.pdf


Attachment:The single chip which K150 PIC programmer can support.
10 series: PIC10F200 PIC10F202 PIC10F204
PIC10F206 PIC10F220 PIC10F222 12C series: PIC12C508 PIC12C508A PIC12C509
PIC12C509A PIC12C671 PIC12C672 PIC12CE518 PIC12CE519 PIC12CE673 PIC12CE674 12F
series:
PIC12F629 PIC12F675 PIC12F683 16C series: PIC16C505 PIC16C554 PIC16C558 PIC16C61
PIC16C62 PIC16C62A PIC16C62B PIC16C63 PIC16C63A PIC 16C64 PIC16C64A PIC16C65
PIC16C65A PIC16C65B PIC16C66 PIC16C67
PIC16C620 PIC16C620A PIC16C621 PIC16C621A
PIC16C622 PIC16C622A PIC16C71 PIC16C71A
PIC16C72 PIC16C72A PIC16C73 PIC16C73A
PIC16C73B PIC16C74 PIC16C74A PIC16C74B
PIC16C76 PIC16C77 PIC16C710 PIC16C711 PIC16C712 PIC16C716 PIC16C745 PIC16C765
PIC16C773 PIC16C774 PIC16C84 16F series: PIC16F54 PIC16F57 PIC16F59 PIC16F627
PIC16LF627A PIC16F628 PIC16F628A PIC16F630
PIC16F631 PIC16F648A PIC16F676 PIC16F677
PIC16F684 PIC16F685 PIC16F687 PIC16F688 PIC16F689 PIC16F689 PIC16F690 PIC16F72
PIC16F73 PIC16F74 PIC16F76 PIC16F77
PIC16F737 PIC16F747 PIC16F767 PIC16F777
PIC16F83 PIC16F84 PIC16F84A PIC16F87
PIC16F88 PIC16F818 PIC16F819 PIC16F870
PIC16F871 PIC16F872 PIC16F873 PIC16F873A
PIC16F874 PIC16F874A PIC16F876 PIC16F876A

18
PIC16F877 PIC16F877A PIC16F913 PIC16F914
PIC16F916 PIC16F917
18 series: PIC18F242 PIC18F248 PIC18F252 PIC18F258
PIC18F442 PIC18F448 PIC18F452 PIC18F458
PIC18F1220 PIC18F1320 PIC18F2220 PIC18F2221
PIC18F2320 PIC18F2321 PIC18F2331 PIC18F2410
PIC18F2420 PIC18F2431 PIC18F2450 PIC18F2455
PIC18F2480 PIC18F2510 PIC18F2520 PIC18F2550
PIC18F2580 PIC18F2585 PIC18F2610 PIC18F2620
PIC18F2680 PIC18F4220 PIC18F4221 PIC18F4320 PIC18F4321 PIC18F4331 PIC18F4410
PIC18F4320 PIC18F4331 PIC18F4450 PIC18F4455 PIC18F4480
PIC18F4510 PIC18F4520 PIC18F4550 PIC18F4580
PIC18F6520 PIC18F6525 PIC18F6621 PIC18F8520
PIC18F8525 PIC18F8621 ……

19

You might also like