PIC16F877A Starter Development Board
Transcript of PIC16F877A Starter Development Board
EasyMCU Series PIC16F877A Starter Development Board
PIC16F877A starter development board
Users Manual
Version 1.0
All boards produced by SINTECH STUDIO
Rev.A, Jully 2010
Copyright 2010, SINTECH STUDIO, All rights reserved
EasyMCU Series PIC16F877A Starter Development Board
CONTENT
Chapter 1: Introduction .................................................................................................................4 1.1 Product Overview..............................................................................................................4 1.2 Layout ................................................................................................................................4 1.3 Board Resource .................................................................................................................4 1.4 Schematic ...........................................................................................................................5
Chapter 2: MPLAB IDE Integrated Development Environment ...............................................5 2.1 The installation of MPLAB ..............................................................................................5 2.2 MPLAB Simple Application.............................................................................................6
2.2.1 Create a Simple Project .........................................................................................6 2.2.2 Debugging the program .........................................................................................9
Chapter 3: Use of On-line Debugger ICD2/KIT2/KIT3 ............................................................12 Chapter 4: Functional Modules Details ......................................................................................12
4.1 Power supply Module .....................................................................................................12 4.2 PIC16F877A small system ..............................................................................................12 4.3 6 bits 7-seg Display Module ............................................................................................13 4.4 LEDs Module...................................................................................................................13 4.5 4X4 keys board ................................................................................................................13 4.6 4X1 Key Board Module ..................................................................................................14 4.7 Step motor Module driven by ULN2003A ....................................................................14 4.8 Buzzer Module driven by ULN2003A ...........................................................................14 4.9: DS18B20 Module ...........................................................................................................14 4.10: 24CX(EEPROM) Module ...........................................................................................15 4.11: DS1302 Module ............................................................................................................15 4.12: ADC6 INPUT Module .................................................................................................15 4.13: RS232 communication Module ...................................................................................15 4.14: LCD1602 display Module............................................................................................16 4.15: LCD12864 display Module..........................................................................................16 4.16: ICSP Programming Port.............................................................................................16
Chapter 5: Functional example programs Introduction ...........................................................17 5.1 Project“adc” ....................................................................................................................17 5.2 Project“DS18B20” ..........................................................................................................17 5.3 Project“AT24C0X” .........................................................................................................17 5.4 Project“DS1302” .............................................................................................................18 5.5 Project“buzzer”...............................................................................................................18 5.6 Project“stepmotor” .........................................................................................................18 5.7 Project“smg”and“smg_all” ............................................................................................19 5.8 Project“led_one”and“led_run” .....................................................................................19 5.9 Project“44key” ................................................................................................................19 5.10 Project“key” ..................................................................................................................19 5.11 Project“lcd1602” ...........................................................................................................20 5.12 Project“lcd12864” .........................................................................................................20 5.13 Project“uart” .................................................................................................................20
EasyMCU Series PIC16F877A Starter Development Board
Chapter 6. Frequently Asked Questions .....................................................................................20 6.1 The board does not power up,what is wrong with the board?. ...................................20 6.2 I have loaded the PIC16F877A sample code, but It doesn’t seem to be working, what is wrong? ................................................................................................................................20 6.3 What devices can be programmed with this board? ....................................................20 6.4 How is power supplied to the experimenter’s board?..................................................20 6.5 What type programmer/debugger can be used on this board? ...................................20
Appendix A. Packing List.............................................................................................................21 Appendix B. Contact Us ...............................................................................................................21
EasyMCU Series PIC16F877A Starter Development Board
Chapter 1: Introduction 1.1 Product Overview The PIC16F877A Starter Development Board is a demonstration and development platform for Microchip’s PIC16F877A microcontrollers. The board provides a platform to highlight this new family’s benchmark for lower power consumption and high-performance operation. It includes the development board, the User’s guide and demos. The PIC16F877A Starter Development Board together with online debugger ICD2/KIT2/ KIT3 produced by Microchip, can bring you a multiplier benefit. 1.2 Layout
Figure1-1 PIC16F877A Starter Kit Layout
J1◆ ,PIC16F877A’s pin out J2◆ ,PIC16F877A’s pin out JP◆ 1,Input jumper of ULN2003A JP◆ 2,jumper of DS18b20, DS1302, 24C0X(eeprom),and ADC6 input. JP◆ 3,Enabling jumper of LED and 6bit 7-seg display
◆VCC,Input/Output of power’s VCC. ◆GND,Input/Output of power’s GND. 1.3 Board Resource 1.128x64 LCD Display 2.16x02 LCD Display 3.4x4 key board 4.4 push buttons for user interfacing 5. 1 MCLR switch for resetting 6. 8 LEDs mapped to PORTD 7. Potentiometer for ADC6
EasyMCU Series PIC16F877A Starter Development Board
8.24Cx EEPROM 9.DS18B20 control unit 10.DS1302 control unit 11.RS232 Communication 12. 6 bits 7-seg display 13.Buzzer control unit 14. ICSP programming/debugging port 15.Power interface 16.Step motor interface driven by ULN2003A 1.4 Schematic
1 2 3 4 5 6 7 8
A
B
C
D
87654321
D
C
B
A
Title
Number RevisionSize
A3
Date: 6-Dec-2010 Sheet of File: C:\Documents and Settings\Administrator\桌面\2010.11.10要做的工作\2010.11.10要做的工作\2Drawn By:
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 10
11 11
12 12
13 13
14 14
15 15
16 16
17 17
18 18
19 19
20 20
LCD12864
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 10
11 11
12 12
13 13
14 14
15 15
16 16
LCD1602
VCC VCC
VCC
VCC
VCC
VCC
VCC
VCC
LED1 LED2 LED3 LED4 LED5 LED6 LED7 LED8
POWERLED
R11K
R21K
R31K
R41K
R51K
R61K
R71K
R81K
R910K
R201K
R10 10K
Y14MHz
C122p
C222p
C4104
C5104
C6 104
C3 104
C8104
C9
104
VCC21
X12
X23
GND4 RST 5
I/O 6
SLCK 7
VCC1 8
DS1302
Y232.768K
RC3RC5RC2RESET
KEY1 KEY2 KEY3 KEY4
KEY5 KEY6 KEY7 KEY8
KEY9 KEY10 KEY11 KEY12
KEY13 KEY14 KEY15 KEY16
MCLR
C1+ 1C1- 3C2+ 4C2- 5
T2in 10
T1in 11
V+2 V-6
VCC16
T2out7
T1out14
R1in13 R2in8
R1out 12R2out 9GND 15MAX232
MAX232
162738495
UART
RC6
RC7
AD
C_I
NPU
TA
LC
D12
864
CO
NTR
AST
Vin1
GN
D2
+5V 3
7805TL780-05CD1
GND 2
VCC 1
POWER1
12
2
+C7
1000u
VCC 3
GND 1
DQ 2
DS18B20
R11 4.7K
R1510K
R1410K
R1310K
VCC
VCC
VCC
RC1
5 5
6 6
VCC 1
DATA- 2
DATA+ 3
GND 4U
SB-P
OW
ER
Q49015
Q39015
Q29015
Q19015
R1210K
ICSP
16F877A
DS18B20
ADC_INPUTKEY
RESET DS1302
LCD12864LCD1602
RS232
7-seg display
POWER
VCC
11 22 33
0
0
POWERSWITCH
VCC
A01
A12
A23
GND4 VCC8
SDA 5SCL 6
WP 7
24C04
VCC
R151K
R141K
VCC
RC3RC4
1 2 3 4
VCC
1 2 3 4
GNDVCC
MCLRVPP/THV1
RA0/AN02
RA1/AN13
RA2/AN2/VREF-4
RA3/AN3/VREF+5
RA4/T0CKI6
RA5/AN4/SS7
RE0/RD/AN58
RE1/WR/AN69
RE2/CS/AN710
VDD11
VSS12
OSC1/CLKIN13
OSC2/CLKOUT14
RC0/T1OSO/T1CKI15
RC1/T1OSI/CCP216
RC2/CCP117
RC3/SCK/SCL18
RD0/PSP019
RD1/PSP120 RD2/PSP2 21RD3/PSP3 22RC4/SDI/SDA 23RC5/SDO 24RC6/TX/CK 25RC7/RX/DT 26RD4/PSP4 27RD5/PSP5 28RD6/PSP6 29RD7/PSP7 30VSS 31VDD 32RB0/INT 33RB1 34RB2 35RB3/PGM 36RB4 37RB5 38RB6/PGC 39RB7/PGD 4016F877A
VCC
VCC
VCC
VCCVCC
VCC
123456789
1011121314151617181920
J1
CON20
1234567891011121314151617181920
J2
CON20
MCLRRA0RA1RA2RA3RA4RA5RE0RE1RE2
OSC1OSC2RC0RC1RC2RC3 RC4
RC5RC6RC7
RD0RD1 RD2
RD3
RD4RD5RD6RD7
RB0RB1RB2RB3RB4RB5RB6RB7
OSC1
OSC2
RD0
RD1
RD2
RD3
RD4
RD5
RD6
RD7
RA0RA1RA2RA3
RD0RD1RD2RD3RD4RD5RD6RD7
abcdefgdp
123456
ICSP
CON6
RB6RB7
MCLR
RD0RD1RD2RD3RD4RD5RD6RD7
RA0RA1RA2
RA0RA1RA2RD0RD1RD2RD3RD4RD5RD6RD7
LCD
1602
CO
NT
RA
ST
RB0RB1RB2RB3RB4RB5RB6RB7
RE1
11 2 2
33 4 4
JP3
LE
D_E
N
LED_EN
SEG_EN SEG_ENSEG_EN SEG_EN
SEG_EN
VCC
R22R23R24R25R26R27R28R29
IN11
IN22
IN33
IN44
IN55
IN66
IN77
GND8 VCC 9
OUT7 10OUT6 11OUT5 12OUT4 13OUT3 14OUT2 15OUT1
200316
VCC
VCC
OUT1OUT2OUT3OUT4OUT5
OUT2OUT3OUT4
BELL
VCC
OUT1
ULN2003A
RC0RC1RC2RC3
RE0
VCC 1
A 2
B 3
C 4
D 5
stepmotor
g5
dp2
a10
f6
ds1
7
d4
e3
c1
b9
ds2
8
8. 8.DS2g
5
dp2
a10
f6
ds1
7
d4
e3
c1
b9
ds2
8
8. 8.DS3 g
5
dp2
a10
f6
ds1
7
d4
e3
c1
b9
ds2
8
8. 8.DS1
R1710K
R1610K
Q49015
Q39015
RA4RA5
SEG_EN SEG_EN
a bcd efg dp a bcd efg dp a bcd efg dp
DS0
DS1
DS2
DS3
DS4
DS5
DS0DS1
DS2
DS3DS4
DS5
11 2 2
33 4 4
55 6 6
77 8 8
99 10 10
JP1
OUT5
S1
S2
S3
S4
RB0
RB1
RB2
RB3
RA3
RA4
11 2 2
33 4 4
55 6 6
77 8 8
99 10 10
1111 12 12
1313 14 14
JP2
1302_RST
1302_RST
1302_IO
1302_SCLK
1302_SCLK1302_IO
24CX_SDA
24CX_SDA
24CX_SCL
24CX_SCL 18B20_DQ
18B20_DQ
ADC1
ADC1 ADC_INPUT
ADC_INPUT
ULN2003A
Bell
Stepmotor
Eeprom
LED
Figure1-2 The PIC16F4877A Starter Board Schematic
Chapter 2: MPLAB IDE Integrated Development Environment MPLAB IDE (hereinafter referred as MPLAB) is the powerful software integrated development environment provided by Microchip for its PIC microcontroller. It allows users to create, record, edit and comply programs of microcontrollers of PIC series on their own computer systems, and it even can achieves dynamic simulation and debugging and run like virtual exercises. 2.1 The installation of MPLAB MPLAB is completely free software offered by Microchip. You can obtain the latest installation files through visiting Microchip’s website: www.microchip.com and download from: http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en019469&part=SW007002After downloading the files, you only need to use compression/decompression software tools such as WINZIP to depress and release the files in your computer, and then run SETUP.EXE (or
EasyMCU Series PIC16F877A Starter Development Board
Install.exe) program, and follow a step-by-step installation guide (You may also do not need changes any of the settings, just click "Next") until finishing the installation. 2.2 MPLAB Simple Application 2.2.1 Create a Simple Project Edit source codes Click the MPLAB icon at your WINDOWS desktop, or choose Start→All application →Microchip→MPLAB IDE V.xx→MPLAB (Vx.x for MPLAB version) to start running MPLAB integrated environment. Shown as Figure 2-1.
Figure 2-1 MPLAB main window
Choose menu command File→ new, MPLAB will automatically call MPLAB Editor (source editor), and the work area will have a text editor window, and you can complete input of source code. As shown in Figure 2-2.
Figure 2-2 text editor window
Edit the source codes in "Text editor window", then select the menu command File→Save to save to the source file to the specified directory, as shown in Figure 2-3.
EasyMCU Series PIC16F877A Starter Development Board
Figure 2-3 Save source codes
Use the wizard to create project files step 1, Chose menu command Project→Project Wizard to come to the Welcome interface shown as Figure 2-4.
Figure 2-4 Project wizard welcome interface
Step 2, directly click "Next", and select chip model, as shown in Figure 2-5.
Figure 2-5 Choose chip
EasyMCU Series PIC16F877A Starter Development Board
Step 3, click "Next", select the appropriate compiler tools according to the source language and chip to be used, as shown in Figure 2-6.
Figure 2-6 Choose compiler tools Step 4, click "Next", choose the directory where the project is saved and complete the project name, as shown in Figure 2-7.
Figure 2-7 Choose directory to save project
Step 5 click "Next", the add source codes to the project, as shown in Figure 2-8.
EasyMCU Series PIC16F877A Starter Development Board
Figure 2-8 source selection
Step 6, click "Next", as shown in Figure 2-9 to come to tips interface.
Figure 2-9 Tip interface
Step 7, directly click "Done", and exit the wizard. So far, we have completed establishing a project the source. For more details, please refer to MPLAB Operation Manual. 2.2.2 Debugging the program Based on the source code edited and project created in above, this section will show you a brief introduction about complying and debugging a program. Compile Implement menu command Project→Build All and MPLAB will automatically call the tools mentioned in above Step 3 of establishment of project for you to compile this source code. When completing compile, the interface will be shown as Figure 2-10.
EasyMCU Series PIC16F877A Starter Development Board
Figure 2-10 Source compiled results
Figure 2-11 Compiling succeeds From the output window of Figure 2-11, we can see the results that the program compiling failed because of a wrong source, double-click the message, and the cursor will automatically stay at the line where there’s an error, and at the margin of most left of this line there’s a "Green Arrow". It is obvious that the type of "MOVLW" has been wronged as "MOVW". Now correct the typo and compile it again, the results are shown in Figure 2-11. Message [302] information tips draws your attention to BANK selection, even if BANK is set up correctly, the messages will still appear, but it does not affect the results of the implementation of program. If there is an error in the program, it will not generate the target HEX file, to get HEX file you need to correct all errors in the source codes. Debugging Debugging program is to test whether the program you deigned is operational, whether it produces
EasyMCU Series PIC16F877A Starter Development Board
correct result as wanted, whether there’s any defects in your design, whether the algorithm design is reasonable, and whether it can accurately control the various hardware resources, and whether it can obtain desired results. Choose debugging tools Select menu command Debugger Select Tool, to select the simulator connected to the PC as the
debugging tool, or you may select the software debugger which comes with the MPLAB software as the debugger for the target program. After choice, it will open the corresponding toolbar. Observe debugging results The internal storage area of PIC microcontroller can be divided into several sections: program memory, hardware stack, file registers, special function registers and EEPROM data memory. In the course of the operation of program, it will repeatedly read, write or modify the contents in the storage area. Therefore, we can observe the changes of content in storage area corresponding to the operation of program so as to understand the operation of program, and achieve the purpose of debugging. To open storage area we can choose the View menu commands, as shown in Figure 2-12. Apart from the use of these storage area to observe the debugging process, we can also add the concerned specific modules to the observation window to monitor the results. Implementation the menu command View→Watch and the observation window will open, as shown in Figure 2-13.
Figure 2-12 Menu command to open storage area
Figure 2-13 Observation window
EasyMCU Series PIC16F877A Starter Development Board
Thus, we have introduced a simple use of MPLAB, and through the learning in this chapter, we should be able to complete the source code edit, compile and debug. Note: For more information on the MPLAB please visit the website of MICROCHIP and download "MPLAB User Manual".
Chapter 3: Use of On-line Debugger ICD2/KIT2/KIT3 Refer to the pdf file included in CD/DVD rom named as follows: ICD2 Users Guide.pdf KIT2 Users Guide.pdf KIT3 Users Guide.pdf You can also visit the website of MICROCHIP and download above On-line Debuggers Users Guide.
Chapter 4: Functional Modules Details 4.1 Power supply Module
VCC
POWERLED
R201K
C8104
C9
104
Vin1
GN
D2
+5V 3
7805TL780-05CD1
GND 2
VCC 1
POWER
11
22
+C7
1000u
5 5
6 6
VCC 1
DATA- 2
DATA+ 3
GND 4
USB
-PO
WER
11 22 33
0
0
POWERSWITCH
VCC
1 2 3 4
VCC
1 2 3 4
GND
VCC
Figure 4-1:power supply
4.2 PIC16F877A small system
Y14MHz
C122p
C222p
MCLRVPP/THV1
RA0/AN02
RA1/AN13
RA2/AN2/VREF-4
RA3/AN3/VREF+5
RA4/T0CKI6
RA5/AN4/SS7
RE0/RD/AN58
RE1/WR/AN69
RE2/CS/AN710
VDD11
VSS12
OSC1/CLKIN13
OSC2/CLKOUT14
RC0/T1OSO/T1CKI15
RC1/T1OSI/CCP216
RC2/CCP117
RC3/SCK/SCL18
RD0/PSP019
RD1/PSP120 RD2/PSP2 21RD3/PSP3 22RC4/SDI/SDA 23RC5/SDO 24RC6/TX/CK 25RC7/RX/DT 26RD4/PSP4 27RD5/PSP5 28RD6/PSP6 29RD7/PSP7 30VSS 31VDD 32RB0/INT 33RB1 34RB2 35RB3/PGM 36RB4 37RB5 38RB6/PGC 39RB7/PGD 4016F877A/877
VCCVCC
VCCVCC
123456789
1011121314151617181920
J1
CON20
1234567891011121314151617181920
J2
CON20
MCLRRA0RA1RA2RA3RA4RA5RE0RE1RE2
OSC1OSC2RC0RC1RC2RC3 RC4
RC5RC6RC7
RD0RD1 RD2
RD3
RD4RD5RD6RD7
RB0RB1RB2RB3RB4RB5RB6RB7
OSC1
OSC2VCC
MC
LR
R9
10KRESET
Figure 4-2: PIC16F877A small system
EasyMCU Series PIC16F877A Starter Development Board
4.3 6 bits 7-seg Display Module
R1510K
R1410K
R1310K
Q4
9015
Q3
9015
Q2
9015
Q1
9015
R1210K
RA0RA1RA2RA3
RD
0
RD
1
RD
2
RD
3
RD
4
RD
5
RD
6
RD
7
11 2 2
33 4 4
JP3
VCC
R22 R23
R24
R25
R26
R27
R28 R29
R1710K
R1610K
Q4
9015
Q3
9015
RA4RA5
a b c d e f g dp
a b c d e f g dp
seg3
a b c d e f g dp
seg2
a b c d e f g dp
seg1
Figure 4-3: 6 bits 7-seg display 4.4 LEDs Module
LED1 LED2 LED3 LED4 LED5 LED6 LED7 LED8
R11K
R21K
R31K
R41K
R51K
R61K
R71K
R81K
RD
0
RD
1
RD
2
RD
3
RD
4
RD
5
RD
6
RD
7
11 2 2
33 4 4
JP3
VCC
Figure 4-4: LEDs Module 4.5 4X4 keys board
KEY1 KEY2 KEY3 KEY4
KEY5 KEY6 KEY7 KEY8
KEY9 KEY10 KEY11 KEY12
KEY13 KEY14 KEY15 KEY16
RB0RB1RB2RB3RB4RB5RB6RB7
Figure 4-5: 4X4 Keys Board
EasyMCU Series PIC16F877A Starter Development Board
4.6 4X1 Key Board Module
S1
S2
S3
S4
RB0
RB1
RB2
RB3
Figure 4-6: 4X1 Keys 4.7 Step motor Module driven by ULN2003A
IN11
IN22
IN33
IN44
IN55
IN66
IN77
GND8 VCC 9
OUT7 10OUT6 11OUT5 12OUT4 13OUT3 14OUT2 15OUT1 162003
VCC
VCC
ULN2003A
RC0RC1RC2RC3
VCC1
A2
B3
C4
D5
11 2 2
33 4 4
55 6 6
77 8 8
99 10 10
JP1
Stepmotor
Figure 4-7: Step motor Module driven by ULN2003A
4.8 Buzzer Module driven by ULN2003A
IN11
IN22
IN33
IN44
IN55
IN66
IN77
GND8 VCC 9
OUT7 10OUT6 11OUT5 12OUT4 13OUT3 14OUT2 15OUT1 16ULN2003A
VCC
BELL
VCC
ULN2003A
RE0 11 2 2
33 4 4
55 6 6
77 8 8
99 10 10
JP1
Bell
Figure 4-8: Buzzer Module driven by ULN2003A
4.9: DS18B20 Module
VCC 3
GND 1
DQ 2
DS18B20
R11 4.7K
VCC
VCC
RC1 11 2 2
33 4 4
55 6 6
77 8 8
99 10 10
1111 12 12
1313 14 14
JP2
Figure 4-9:DS18B20 Module
EasyMCU Series PIC16F877A Starter Development Board
4.10: 24CX(EEPROM) Module
A0 1
A1 2
A2 3
GND 4VCC 8
SDA5 SCL6
WP7
24CX
R141K
VCC
VCC
RC4RC3
R151K
11 2 2
33 4 4
55 6 6
77 8 8
99 10 10
1111 12 12
1313 14 14
JP2
VCC
Figure 4-10: 24CX(EEPROM) Module 4.11: DS1302 Module
VCC2 1
X1 2
X2 3
GND 4RST5
I/O6
SLCK7
VCC18
DS1302
Y232.768K
VCC
RC3RC5RC2
11 2 2
33 4 4
55 6 6
77 8 8
99 10 10
1111 12 12
1313 14 14
JP2
Figure 4-11: DS1302 Module 4.12: ADC6 INPUT Module
ADC_INPUTA
VCC11 2 2
R10 10KRE1
33 4 4
55 6 6
77 8 8
99 10 10
1111 12 12
1313 14 14
JP2
Figure 4-12: ADC6 INPUT Module
4.13: RS232 communication Module
VCCC4104
C5104
C6 104
C3 104C1+ 1C1- 3C2+ 4C2- 5
T2in 10
T1in 11
V+2 V-6
VCC16
T2out7
T1out14
R1in13 R2in8
R1out 12R2out 9GND 15MAX232
MAX232
162738495
UART
RC6
RC7
EasyMCU Series PIC16F877A Starter Development Board
Figure 4-13:RS232 communication Module 4.14: LCD1602 display Module
11
22
33
44
55
66
77
88
99
1010
1111
1212
1313
1414
1515
1616
LCD1602
VCCVCC
VCC
RA
0R
A1
RA
2R
D0
RD
1R
D2
RD
3R
D4
RD
5R
D6
RD
7
LCD1602 CONTRAST
Figure 4-14: LCD1602 display Module
4.15: LCD12864 display Module
11
22
33
44
55
66
77
88
99
1010
1111
1212
1313
1414
1515
1616
1717
1818
1919
2020
LCD12864
VCCVCC
LCD12864 CONTRASTVCC
RD
0R
D1
RD
2R
D3
RD
4R
D5
RD
6R
D7
RA
0R
A1
RA
2
RA
3
RA
4
Figure 4-15: LCD12864 display Module
4.16: ICSP Programming Port
VCC123456
ICSP
RB6RB7
MCLR
Figure 4-16:ICSP Programming Port
EasyMCU Series PIC16F877A Starter Development Board
Chapter 5: Functional example programs Introduction 5.1 Project“adc” This code mainly executes the conversion from analog signal to digital signal using ADC6,and display its sample value on 6 bits 7-seg. A potentiometer named ADC_INPUT are connected to RA1 port respectively.When the A/D converting function RA1 is in use, please make sure that ADC6 INPUT JUMPER is connected. As shown in Figure 5-1.
Figure 5-1: ADC_INPUT connection
5.2 Project“DS18B20” This code mainly experiments the use of temperature sensors DS18B20,displaying its temperature value on 6 bits 7-seg. DS18B20’s IO is connected to the RC1 port of MCU through DS18B20 JUMPER as shown in Figure 5-2. When using DS18b20 project please make sure that the DS18B20 JUMPER and the 7-seg display JUMPER (shown in Figure 5-7)is connected.
Figure 5-2: DS18B20 connection
5.3 Project“AT24C0X” This code mainly experiments the use of eeprom AT24CX(X=1,2….16).pressing S1 key to write “012345”into AT24CX , pressing S2 key to read the value from AT24CX and display its value on 6 bits 7-seg. The signal pin SCL and SDA of AT24CX are connected to the RC3 port and RC4 port of MCU through 24C0X JUMPER(as shown in Figure 5-3). When using 24C0X project please make sure that the 24C0X JUMPER and the 7-seg display JUMPER (shown in Figure 5-7)is connected.
EasyMCU Series PIC16F877A Starter Development Board
Figure 5-3: 24C0X connection
5.4 Project“DS1302” This code mainly experiments the use of DS1302. displaying its real-time value on 6 bits 7-seg. The signal pin RST, IO and SCLK of DS1302 are connected to the RC2 , RC5and RC3 port of MCU through DS1302 JUMPER(as shown in Figure 5-4). When using DS1302 project please make sure that the DS1302 JUMPER and the 7-seg display JUMPER (shown in Figure 5-7)is connected.
Figure 5-4: DS1302 connection
5.5 Project“buzzer” This code is mainly about using MCU to control buzzer. When using buzzer project please make sure that the Buzzer JUMPER (shown in Figure 5-5)is connected.
Figure 5-5: buzzer connection 5.6 Project“stepmotor” This code is mainly about using MCU to control stepmotor. When using stepmotor project please make sure that the stepmotor JUMPER (shown in Figure 5-6)is connected.
EasyMCU Series PIC16F877A Starter Development Board
Figure 5-6: Stepmotor connection 5.7 Project“smg”and“smg_all” This code is mainly about using MCU to control 7-seg display. When using their project please make sure that the 7-seg display enable JUMPER (shown in Figure 5-7)is connected.
Figure 5-7: 7-seg display connection 5.8 Project“led_one”and“led_run” This code is mainly about using MCU to control leds. When using their project please make sure that the LEDs enabl JUMPER (shown in Figure 5-8)is connected.
Figure 5-8: LEDs enable connection
5.9 Project“44key” This code is mainly about using MCU to read value of 4X4 array keys and display its value on 6 bits 7-seg. When using this project please make sure that the 7-seg display enable JUMPER (shown in Figure 5-7)is connected. 5.10 Project“key” This code is mainly about using MCU to read value of 1X4 keys and display its value on 6 bits 7-seg. When using this project please make sure that the 7-seg display enable JUMPER (shown in
EasyMCU Series PIC16F877A Starter Development Board
Figure 5-7)is connected. 5.11 Project“lcd1602” This code is mainly about using MCU to control LCD1602 module to display some characters on it. 5.12 Project“lcd12864” This code is mainly about using MCU to control LCD12864 module to display some characters on it. 5.13 Project“uart” This code is mainly about using MCU to send some characters to PC’s RS232 port. When using this project you need to a software named “comdebug.exe”included in the CD Rom to observe the characters.
Chapter 6. Frequently Asked Questions This chapter describes common problems when using the PIC16F877A Starter Kit Board and their solutions. 6.1 The board does not power up,what is wrong with the board?. Make sure that the POWER LED has turned on. If the LED is not on, check to see that the +6-12V power supply or the USB power is properly connected.It is necessary to note that the +6-12V power supply and the USB power can not be connected simultaneously. 6.2 I have loaded the PIC16F877A sample code, but It doesn’t seem to be working, what is wrong? Verify that the correct jumper settings are used for JP1,JP2 or JP3. 6.3 What devices can be programmed with this board? The experimenter’s board is designed to develop applications using the PIC16F877A. The device can be replaced by PIC16F877 device derivatives, respectively. 6.4 How is power supplied to the experimenter’s board? Two supply options exist: USB power Cables and external 6—12VDC power supplies are supported. 6.5 What type programmer/debugger can be used on this board? The PIC16F877A supports the programmer/debugger ICD2/KIT2/KIT3 produced by MP. Certainly, the common PIC programmer/debugger in the market (such as K150,K128 and JDM etc.)can also be used on this board.
EasyMCU Series PIC16F877A Starter Development Board
Appendix A. Packing List
When you receive the products, please check the box to see if all accessories are complete. This product should include the following components: PIC16F877A Starter Development Board (not include DS18B20), 1 pcs; PIC16F877A MCU, 1 pcs; USB power supply cable, 1 pcs; CD-ROM, 1 pcs;
Appendix B. Contact Us
e-mail:[email protected] QQ: 634503119