Anda di halaman 1dari 21

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 Projectadc ....................................................................................................................17
5.2 ProjectDS18B20 ..........................................................................................................17
5.3 ProjectAT24C0X.........................................................................................................17
5.4 ProjectDS1302 .............................................................................................................18
5.5 Projectbuzzer...............................................................................................................18
5.6 Projectstepmotor .........................................................................................................18
5.7 Projectsmgandsmg_all............................................................................................19
5.8 Projectled_oneandled_run .....................................................................................19
5.9 Project44key ................................................................................................................19
5.10 Projectkey ..................................................................................................................19
5.11 Projectlcd1602 ...........................................................................................................20
5.12 Projectlcd12864 .........................................................................................................20
5.13 Projectuart.................................................................................................................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 doesnt 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 experimenters 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
Microchips PIC16F877A microcontrollers. The board provides a platform to highlight this new
familys benchmark for lower power consumption and high-performance operation. It includes the
development board, the Users 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


J1PIC16F877As pin out
J2PIC16F877As pin out
JP1Input jumper of ULN2003A
JP2jumper of DS18b20, DS1302, 24C0X(eeprom),and ADC6 input.
JP3Enabling jumper of LED and 6bit 7-seg display
VCCInput/Output of powers VCC.
GNDInput/Output of powers 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

C8
104

C9

VCC

J1

KEY4

KEY7

KEY8

KEY9

KEY10

KEY11

KEY12

KEY13

KEY14

KEY15

KEY16

20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1

RB7
RB6
RB5
RB4
RB3
RB2
RB1
RB0

MCLR

1 2
3 4
5 6
7 8
9 10

MCLR
RA0
RA1
RA2
RA3
RA4
RA5
RE0
RE1
RE2

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

1
2
3
4
5
6
7

R9
10K

IN1
IN2
IN3
IN4
IN5
IN6
IN7
GND

OUT1
OUT2
OUT3
OUT4
OUT5
OUT6
OUT7
VCC

ULN2003A

104

VCC
VCC
OSC1
OSC2
RC0
RC1
RC2
RC3
RD0
RD1

C1

22p

RB7/PGD
RB6/PGC
RB5
RB4
RB3/PGM
RB2
RB1
RB0/INT
VDD
VSS
RD7/PSP7
RD6/PSP6
RD5/PSP5
RD4/PSP4
RC7/RX/DT
RC6/TX/CK
RC5/SDO
RC4/SDI/SDA
RD3/PSP3
RD2/PSP2

RB7
RB6
RB5
RB4
RB3
RB2
RB1
RB0

40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21

VCC
VCC
RD7
RD6
RD5
RD4
RC7
RC6
RC5
RC4
RD3
RD2

22p

OSC2

LED_EN
SEG_EN

1
3

1
3

VCC

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

R10

10K

ULN2003A
2

1
2
3
4
5

RB6
RB7
VCC

g
dp
a
f
d
e
c
b
10
9
1
4
3
6
5
2
ds1

a
b
c
d
e
f
g
dp
DS0

ds2

ds1

ds2
8

R1
1K

R2
1K

DS0

DS1

R3
1K

R4
1K

R5
1K

R6
1K

VCC

C
LED8

R7
1K

R8
1K

VCC
1
2
3

ADC_INPUT
VCC

8
4

A0
A1
A2
VCC
GND

WP

SCL
SDA

R15 R14
1K 1K

24CX_SCL
24CX_SDA

6
5

24C04

Eeprom

ADC_INPUT

MCLR

1
2

Y2
32.768K 3
4

CON6

VCC2

VCC1

X1

SLCK

X2

I/O

GND

RST

RC1
1
RC4
3
RC3
5
RC2
7
RC5
9
RC3
11
ADC1 13

VCC

1302_RST

1302_IO

1302_SCLK

2
18B20_DQ
4
24CX_SDA
6
24CX_SCL
1302_RST
8
1302_IO
10
12 1302_SCLK
14 ADC_INPUT

1 2
3 4
5 6
7 8
9 10
11 12
13 14

DS18B20
VCC
DQ
GND

VCC
18B20_DQ

2
1

VCC
R11 4.7K

DS18B20

VCC
OUT2
OUT3
OUT4
OUT5

Title

Stepmotor
3

LED7

ADC1

Size

LED6

JP2

stepmotor

VCC

RESET

LED4 LED5

LED
RE1

DS1302

6
5
4
3
2
1

Bell
VCC
A
B
C
D

LED3

2
4

2
4

J2

16F877A

ICSP

VCC

VCC

LED2

JP3

CON20

OSC1

LED1

RD7

104

C3

Y1
4MHz

Q1
9015

RC6
C6

RS232

MCLRVPP/THV
RA0/AN0
RA1/AN1
RA2/AN2/VREFRA3/AN3/VREF+
RA4/T0CKI
RA5/AN4/SS
RE0/RD/AN5
RE1/WR/AN6
RE2/CS/AN7
VDD
VSS
OSC1/CLKIN
OSC2/CLKOUT
RC0/T1OSO/T1CKI
RC1/T1OSI/CCP2
RC2/CCP1
RC3/SCK/SCL
RD0/PSP0
RD1/PSP1

C2

16 OUT1
15 OUT2
14 OUT3
13 OUT4
12 OUT5
11
10

Q2
9015

RD6

5
4
3
1

16F877A

CON20

2003
2
4
6
8
10

R12 SEG_EN
10K

Q3
9015

RC7

10
11

OUT1
JP1
1
3
5
7
9

Q4
9015

RD4

C2C2+
C1C1+

15
9
12

BELL

RE0
RC0
RC1
RC2
RC3

ds1

Q3
9015

DS2

T2in
T1in

KEY

RESET

10
9
1
4
3
6
5
2

10
9
1
4
3
6
5
2
a
b
c
d
e
f
g
dp
ds2
8
Q4
9015

DS3

GND
R2out
R1out

T2out
T1out

VV+

RB3

KEY3

RA0

RD5

6
2

VCC
R2in
R1in

MAX232
C5
104

KEY6

R13 SEG_EN
10K

DS5

MAX232

7
14

S4

KEY2

RA1

R14 SEG_EN
10K

RD3

RB2

RA2

R15 SEG_EN
10K

RD2

RA3

R16 SEG_EN
10K

RD0

RB1

DS1

C4
104

16
8
13

5
9
4
8
3
7
2
6
1

S2

RA4

R17 SEG_EN
10K

8. 8.

POWER

1K

UART

KEY5

POWERSWITCH

104

RA5

7-seg display

LED_EN

R20

VCC

RB0

KEY1

3
2
1

DS2

VCC

DS4

RA4

S1

8. 8.

+5V
GND

C7
1000u
POWERLED

VCC

S3

Vin

DS3

DS1

8. 8.

DS2

D1

a
b
c
d
e
f
g
dp

DS3

VCC

0
3
2
1
0

7805
TL780-05C

GND

R22
R23
R24
R25
R26
R27
R28
R29

DS5

POWER

VCC
GND
1
2
3
4

USB-POWER

RA0
RA1
RA2
RD0
RD1
RD2
RD3
RD4
RD5
RD6
RD7
RA3

5
1
2
3
4
6

5
VCC
DATADATA+
GND
6

ADC_INPUTA

VCC

VCC

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

RD0
RD1
RD2
RD3
RD4
RD5
RD6
RD7

VCC

LCD12864

RA0
RA1
RA2
RD0
RD1
RD2
RD3
RD4
RD5
RD6
RD7

1
2
3
4

LCD12864

VCC

VCC

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

LCD1602 CONTRAST

LCD1602

LCD12864 CONTRAST

LCD1602

7
g
dp
a
f
d
e
c
b

6
VCC

a
b
c
d
e
f
g
dp

DS4

RD1

g
dp
a
f
d
e
c
b

DS1302

ICSP
4

Number

Revision

A3
Date:
File:
6

6-Dec-2010
Sheet of
C:\Documents and Settings\Administrator\\2010.11.10
Drawn By: \2010.11.10\2
7

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 Microchips website: www.microchip.com and download from:
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocNa
me=en019469&part=SW007002
After 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 StartAll application
MicrochipMPLAB IDE V.xxMPLAB (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 Filenew, 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 FileSave 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 ProjectProject 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 ProjectBuild 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 theres an error, and at the margin of most left of this line theres 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 theres 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 ViewWatch 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

POWER
2

GND

D1

1
1

VCC

Vin

+5V

C8
104

0
3
2
1
0

3
VCC
C9

3
2
1
POWERSWITCH

104

POWERLED

C7
1000u

7805
TL780-05C

GND

5
VCC
DATADATA+
GND
6

USB-POWER

VCC

1
2
3
4

1
2
3
4

GND
5
1
2
3
4
6

VCC

R20

1K

Figure 4-1:power supply


4.2 PIC16F877A small system
J1

J2

16F877A/877
MCLR
RA0
RA1
RA2
RA3
RA4
RA5
RE0
RE1
RE2
VCC
VCC
OSC1
OSC2
RC0
RC1
RC2
RC3
RD0
RD1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

MCLRVPP/THV
RA0/AN0
RA1/AN1
RA2/AN2/VREFRA3/AN3/VREF+
RA4/T0CKI
RA5/AN4/SS
RE0/RD/AN5
RE1/WR/AN6
RE2/CS/AN7
VDD
VSS
OSC1/CLKIN
OSC2/CLKOUT
RC0/T1OSO/T1CKI
RC1/T1OSI/CCP2
RC2/CCP1
RC3/SCK/SCL
RD0/PSP0
RD1/PSP1

MCLR

20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
CON20

RB7/PGD
RB6/PGC
RB5
RB4
RB3/PGM
RB2
RB1
RB0/INT
VDD
VSS
RD7/PSP7
RD6/PSP6
RD5/PSP5
RD4/PSP4
RC7/RX/DT
RC6/TX/CK
RC5/SDO
RC4/SDI/SDA
RD3/PSP3
RD2/PSP2
C1

40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21

RB7
RB6
RB5
RB4
RB3
RB2
RB1
RB0
VCC
VCC
RD7
RD6
RD5
RD4
RC7
RC6
RC5
RC4
RD3
RD2
OSC1

22p

Y1
4MHz
R9
RESET

10K

VCC

C2

22p

Figure 4-2: PIC16F877A small system

OSC2

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
CON20

EasyMCU Series

PIC16F877A Starter Development Board

RD7
R29

RD6

R28
dp

RD5

R27

seg3

a
b
c
d
e
f
g
dp

RD4

R26

RD3

R25
e

RD2

R24
d

RD1

R23
c

a
b
c
d
e
f
g
dp

a
b
c
d
e
f
g
dp

R22

RD0

4.3 6 bits 7-seg Display Module

seg1

seg2

RA5

RA3

RA4
R17
10K

RA2

R16
10K

RA1

R15
10K

RA0

R14
10K

R13
10K

R12
10K

Q4

Q3

Q4

Q3

Q2

Q1

9015

9015

9015

9015

9015

9015

VCC

1
3

1
3

2
4

2
4

JP3

Figure 4-3: 6 bits 7-seg display

R1
1K

R2
1K

R3
1K

RD7

LED3

RD6

RD3

LED2

RD5

RD2

LED1

RD4

RD1

RD0

4.4 LEDs Module

LED4 LED5

LED6

LED7

R4
1K

R5
1K

R6
1K

R7
1K

LED8

R8
1K

JP3
VCC

1
3

1
3

2
4

2
4

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
RB7
RB6
RB5
RB4
RB3
RB2
RB1
RB0

Figure 4-5: 4X4 Keys Board

EasyMCU Series

PIC16F877A Starter Development Board

4.6 4X1 Key Board Module


S1
RB0
S2

RB1

S3
RB2
S4

RB3

Figure 4-6: 4X1 Keys


4.7 Step motor Module driven by ULN2003A
JP1

1
3
5
7
9

RC0
RC1
RC2
RC3

1 2
3 4
5 6
7 8
9 10

2
4
6
8
10

1
2
3
4
5
6
7

2003
IN1
IN2
IN3
IN4
IN5
IN6
IN7

16
15
14
13
12
11
10

OUT1
OUT2
OUT3
OUT4
OUT5
OUT6
OUT7

GND

VCC

1
2
3
4
5

Stepmotor

VCC

VCC
A
B
C
D

VCC

ULN2003A

Figure 4-7: Step motor Module driven by ULN2003A


4.8 Buzzer Module driven by ULN2003A
RE0

JP1

1
3
5
7
9

2
4
6
8
10

1 2
3 4
5 6
7 8
9 10

1
2
3
4
5
6
7
8

ULN2003A
IN1
IN2
IN3
IN4
IN5
IN6
IN7
GND

OUT1
OUT2
OUT3
OUT4
OUT5
OUT6
OUT7
VCC

ULN2003A

BELL
16
15
14
13
12
11
10

VCC

Bell

9
VCC

Figure 4-8: Buzzer Module driven by ULN2003A


4.9: DS18B20 Module

RC1

1
3
5
7
9
11
13

JP2
1 2
3 4
5 6
7 8
9 10
11 12
13 14

2
4
6
8
10
12
14

VCC

DS18B20
VCC
DQ
GND

3
2
1

Figure 4-9:DS18B20 Module

R11 4.7K

VCC

EasyMCU Series

PIC16F877A Starter Development Board

4.10: 24CX(EEPROM) Module


VCC

R14
1K
JP2
RC4
RC3

1
3
5
7
9
11
13

2
4
6
8
10
12
14

1 2
3 4
5 6
7 8
9 10
11 12
13 14

WP

6
5

R15
1K

1
2
3

A0
A1
A2

SCL
SDA

8
4

VCC
GND

VCC

24CX

VCC

Figure 4-10: 24CX(EEPROM) Module


4.11: DS1302 Module
DS1302
JP2

RC2
RC5
RC3

1
3
5
7
9
11
13

2
4
6
8
10
12
14

1 2
3 4
5 6
7 8
9 10
11 12
13 14

VCC

VCC1

7
6
5

VCC2

SLCK

X1

I/O

X2

RST

2
3
4

GND

Figure 4-11: DS1302 Module


4.12: ADC6 INPUT Module

RE1

R10 10K

1
3
5
7
9
11
13

JP2

2
4
6
8
10
12
14

1 2
3 4
5 6
7 8
9 10
11 12
13 14

VCC

ADC_INPUTA

Figure 4-12: ADC6 INPUT Module


4.13: RS232 communication Module
C4
104

VCC
MAX232
UART
5
9
4
8
3
7
2
6
1

16
8
13
7
14

6
2

VCC
R2in
R1in

GND
R2out
R1out

T2out
T1out

T2in
T1in

VV+
MAX232
C5
104

C2C2+
C1C1+

15
9
12

RC7

10
11
5
4
3
1

RC6
C6

104

C3

104

Y2
32.768K

EasyMCU Series

PIC16F877A Starter Development Board

Figure 4-13:RS232 communication Module


4.14: LCD1602 display Module
LCD1602 CONTRAST

VCC

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

VCC

RA0
RA1
RA2
RD0
RD1
RD2
RD3
RD4
RD5
RD6
RD7

VCC

LCD1602

Figure 4-14: LCD1602 display Module


4.15: LCD12864 display Module

VCC

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

VCC

RA4

LCD12864 CONTRAST

RA0
RA1
RA2
RD0
RD1
RD2
RD3
RD4
RD5
RD6
RD7
RA3

VCC

LCD12864

Figure 4-15: LCD12864 display Module


4.16: ICSP Programming Port

ICSP
6
5
4
3
2
1

RB6
RB7
VCC

MCLR

Figure 4-16:ICSP Programming Port

EasyMCU Series

PIC16F877A Starter Development Board

Chapter 5: Functional example programs Introduction


5.1 Projectadc
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 ProjectDS18B20
This code mainly experiments the use of temperature sensors DS18B20,displaying its temperature
value on 6 bits 7-seg. DS18B20s 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 ProjectAT24C0X
This code mainly experiments the use of eeprom AT24CX(X=1,2.16).pressing S1 key to write
012345into 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 ProjectDS1302
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 Projectbuzzer
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 Projectstepmotor
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 Projectsmgandsmg_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 Projectled_oneandled_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 Project44key
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 Projectkey
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 Projectlcd1602
This code is mainly about using MCU to control LCD1602 module to display some characters on
it.
5.12 Projectlcd12864
This code is mainly about using MCU to control LCD12864 module to display some characters on
it.
5.13 Projectuart
This code is mainly about using MCU to send some characters to PCs RS232 port. When using this
project you need to a software named comdebug.exeincluded 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 doesnt 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 experimenters 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 experimenters board?
Two supply options exist: USB power Cables and external 612VDC 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:wxl07297662156@163.com
QQ: 634503119

Anda mungkin juga menyukai