0% found this document useful (0 votes)
98 views45 pages

Practical Course For ATMEL Microcontrollers

The document is a user manual for a PCAM board that describes: 1) The hardware version and provides an overview of the target microcontroller sections for different microcontrollers like ATmega and 89S51. 2) The interfacing sections for various components that can be connected to the board like 7-segment displays, stepper motors, analog to digital converters, LCDs, etc. 3) The schematics section shows the schematic for the 89S52 target section on the board.

Uploaded by

Subhash Suman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
98 views45 pages

Practical Course For ATMEL Microcontrollers

The document is a user manual for a PCAM board that describes: 1) The hardware version and provides an overview of the target microcontroller sections for different microcontrollers like ATmega and 89S51. 2) The interfacing sections for various components that can be connected to the board like 7-segment displays, stepper motors, analog to digital converters, LCDs, etc. 3) The schematics section shows the schematic for the 89S52 target section on the board.

Uploaded by

Subhash Suman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 45

www.deccanrobots.

com
User manual for PCAM

Practical Course For ATMEL


Microcontrollers

Hardware Version
EEDT4.0-LF-2.0
www.DeccanRobots.com

DeccanRobots 1
www.deccanrobots.com
User manual for PCAM

Know your Hardware

DeccanRobots 2
www.deccanrobots.com
User manual for PCAM

89S51/89S52/ATmega8515
Target Section

DeccanRobots 3
www.deccanrobots.com
User manual for PCAM

ATmega16 / ATmega32 /
ATmega8535 Target Section

JTAG
Connector for
ATmega32

DeccanRobots 4
www.deccanrobots.com
User manual for PCAM

ATmega8 Target Section

DeccanRobots 5
www.deccanrobots.com
User manual for PCAM

Provision to add External Crystal for


AVR target sections

DeccanRobots 6
www.deccanrobots.com
User manual for PCAM

Dual ISP Programming Header

DeccanRobots 7
www.deccanrobots.com
User manual for PCAM

5x2 pin ISP Programming Header


GND 10 9 MISO

GND 8 7 SCK

GND 6 5 Reset
GND 4 3
+5V 2 1 MOSI

DeccanRobots 8
www.deccanrobots.com
User manual for PCAM

6 Pin ISP Programming Header


6 RST

5 SCK
MISO
4
3 MOSI

2 GND

1 VCC

ISP

DeccanRobots 9
www.deccanrobots.com
User manual for PCAM

7-segment Interfacing Section

DeccanRobots 10
www.deccanrobots.com
User manual for PCAM

Stepper Motor Driver


Interfacing Section

DeccanRobots 11
www.deccanrobots.com
User manual for PCAM

8 Bit Analog to Digital Converter


Interfacing Section

DeccanRobots 12
www.deccanrobots.com
User manual for PCAM

RS232 Interfacing Section

DeccanRobots 13
www.deccanrobots.com
User manual for PCAM

LED Interfacing Section

DeccanRobots 14
www.deccanrobots.com
User manual for PCAM

Switch Interfacing Section


SW1 to SW4 are pulled up
SW5 & SW6 are pulled down
Ref Schematics for details

DeccanRobots 15
www.deccanrobots.com
User manual for PCAM

TWI / I2C Interfacing Section

RTC using DS1307

EEPROM using 24C256

DeccanRobots 16
www.deccanrobots.com
User manual for PCAM

DC Motor Driver Interfacing Section

DeccanRobots 17
www.deccanrobots.com
User manual for PCAM

4x4 Keypad Interfacing Section

DeccanRobots 18
www.deccanrobots.com
User manual for PCAM

16x2 LCD Interfacing Section

DeccanRobots 19
www.deccanrobots.com
User manual for PCAM

93C46 SPI EEPROM


Interfacing Section

DeccanRobots 20
www.deccanrobots.com
User manual for PCAM

IR, Temperature & Preset


Interfacing Section

Temperature Sensor& Preset

DeccanRobots 21
IR LED, TSOP1738, IR Receiver
www.deccanrobots.com
User manual for PCAM

Power Supply Section

Connect 9-12V DC Power here

7805 Voltage Regulator

5V Output point.

Power ON Indicator
DeccanRobots 22
www.deccanrobots.com
User manual for PCAM

Schematics – 89S52
Target Section

MOSI
MISO
SCK
RST
VCC

VCC
JP2
U1
1
2 1 40 JP9
P1.0/T2 VDD
3 2 39
P1.1/T2EX P0.0/AD0 1
4 3 38
P1.2/ECI P0.1/AD1 2
5 4 37
P1.3/CEX0 P0.2/AD2 3
6 5 36
P1.4/SS/CEX1 P0.3/AD3 4
7 6 35
P1.5/MOSI/CEX2 P0.4/AD4 5
8 7 34
P1.6/MISO/CEX3 P0.5/AD5 6
8 33
P1.7/SCK/CEX4 P0.6/AD6 7
JP1 9 32 VCC
RESET P0.7/AD7 8
10 31
1 P3.0/RXD EN
11 30
2 P3.1/TXD ALE/PROG
12 29
3 P3.2/INT0 PSEN
13 28
4 P3.3/INT1 P2.7/A15 1
14 27
5 P3.4/TO P2.6/A14 2
15 26
6 P3.5/T1 P2.5/A13 3
16 25
7 P3.6/WR P2.4/A12 4
17 24
8 P3.7/RD P2.3/A11 5
18 23
XTL2 P2.2/A10 6
19 22
XTL1 P2.1/A9 7
20 21
VSS P2.0/A8 8
C2
Y1 89S51/52 JP8

C1

DeccanRobots 23
www.deccanrobots.com
User manual for PCAM

Schematics – ATmega32
Target Section

MISO
MOSI

SCK
RST
VCC

ATMEGA_40_PIN
JP13 JP22
1 40
1 (XCK/TO)PB0 PA0(ADC0) 1
2 39
2 (T1)PB1 PA1(ADC1) 2
3 38 VCC
3 (INT2/AIN0)PB2 PA2(ADC2) 3
4 37
4 (OC0/AIN1)PB3 PA3(ADC3) 4
5 36
5 (SS)PB4 PA4(ADC4) 5
6 35
6 (MOSI)PB5 PA5(ADC5) 6
7 34
7 (MISO)PB6 PA6(ADC6) 7 L1
8 33 JP21
8 (SCK)PB7 PA7(ADC7) 8 10uH
9 32
RESET AREF 1
10 U3 31
VCC GND 2
11 30
GND AVCC
12 29
JP10 XTAL2 PC7(TOSC2) 8 C3
13 28
XTAL1 PC6(TOSC1) 7
JP12 14 27
1 (RXD)PD0 PC5(TDI) 6 100nF
15 26
2 (TXD)PD1 PC4(TDO) 5
16 25
3 (INT0)PD2 PC3(TMS) 4
17 24
1
2
3

4 (INT1)PD3 PC2(TCK) 3
18 23
5 (OC1B)PD4 PC1(SDA) 2
19 22
6 (OC1A)PD5 PC0(SCK) 1
20 21
7 (ICP1)PD6 PD7(OC2)
8 JP20
TDI
JP11 TDO
TMS
TCK
1
2
3

VCC
JP17
VCC
TCK 1 2
TDO 3 4
TMS 5 6 RST
C4
7 8 100nF
TDI 9 10
HEADER 5X2

DeccanRobots 24
www.deccanrobots.com
User manual for PCAM

Schematics – ATmega8
Target Section
RST
JP25
1 JP33
2 U7
7
3 1 28
VCC (RESET)PC6 PC5(ADC5) 6
4 2 27
5 (RXD)PD0 PC4(ADC4) 5
3 26
(TXD)PD1 PC3(ADC3) 4
6 4 25
(INT0)PD2 PC2(ADC2) 3
7 5 24
8 (INT1)PD3 PC1(ADC1) 2
6 23
(XCK_T0)PD4 PC0(ADC0) 1 VCC
7 22
VCC GND
8 21
GND AREF
9 20
(XTAL1/TOSC1)PB6 AVCC JP32
10 19
(XTAL2/TOSC2)PB7 PB5(SCK)
11 18 1 L2
(T1)PD5 PB4(MISO)
12 17 2 10uH
(AIN0)PD6 PB3(MOSI)
13 16
(AIN1)PD7 PCB2(SS/OC1B)
14 15
(ICP1)PB0 PB1(OC1A)

C5

ATMEGA_8 100nF
JP26 JP27

3 3
2 2
1 1

MOSI
MISO
SCK
1
2
3
4
5
6
7
8

JP28

HEADER 8

DeccanRobots 25
www.deccanrobots.com
User manual for PCAM

Schematics – 7-Segment Display JP3


4 HEADER

1
2
3
4
VCC

R2 R3 R4 R7
1K 1K 1K 1K

Q1 Q2 Q3 Q4

BC548A BC548A BC548A BC548A

JP19
1
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
2
3
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
4
5
6
7
U2 8
40_PIN_IC_BASE HEADER 8
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
10
11
12
13
14
15
16
17
18
19
20
1
2
3
4
5
6
7
8
9

DeccanRobots 26
www.deccanrobots.com
User manual for PCAM

Schematics – ULN2803
Stepper Motor Driver

JP23 U4 JP30
1 18
1 1 18 8
2 17
2 2 17 7
3 16
3 3 16 6
4 15
4 4 15 5 VCC
5 14
5 5 14 4
6 13
6 6 13 3
7 12
7 7 12 2
8 11
8 8 11 1
9 10
9 10
8 HEADER ULN2803

DeccanRobots 27
www.deccanrobots.com
User manual for PCAM

Schematics – 8 Bit ADC

VCC
R16
10K U10
1 20
. .
2 19 OUTPUT
. .
3 18
. . 8
4 17
. . 7
5 16
C6 . . 6
VCC 6 15
150 . . 5
7 14
. . 4
8 13
1

JP49 . . 3
9 12
. . 2
1 10 11
2 . . 1
R25 2
20K 3 20_PIN JP37
2

VCC
JP50
3

1 R14
2
10K
1

R15
10K

DeccanRobots 28
www.deccanrobots.com
User manual for PCAM

Schematics – RS232

DTR
JP43
U14
TX
JP48 1
13 12
R1IN R1OUT 2
1 8 9 RX
FEMALE CONNECTOR DB9

R2IN R2OUT 3
6 11 14
T1IN T1OUT
2 10 7 HEADER 3
T2IN T2OUT
7
C10 1
3 C+ VCC
8 3
C1-
4 4 15
C2+ GND
9 5
C9 C2-
5 2 16
V+ VCC
6
V-
VCC
MAX232/SO
C11
C8

DeccanRobots 29
www.deccanrobots.com
User manual for PCAM

Schematics – LED

D1
VCC RP1 JP5
D2
1 2 1
3 D3
2
4 3
D4
5 4
6 D5 5
7 6
8 D6
7
9 8
C D7
1K
D8 8 HEADER

DeccanRobots 30
www.deccanrobots.com
User manual for PCAM

Schematics – Switches
• 4 x Pulled up & 2 x pulled down switches
VCC VCC

R6 JP15 R11 JP18


1 2 1 2
1K SW1 1 SW5 1
1K
2 2
R5 1 2 R12 1 2
1K SW2 1K SW6
JP16
R10 1 2 1
1K SW3 2

R9 1 2
1K SW4

DeccanRobots 31
www.deccanrobots.com
User manual for PCAM

Schematics – Real Time Clock


DS1307

VCC
SDA_1

R181K
X1 U8
R201K CRYSTAL 1 5
X1 SDA
2
R191K X2
6 7
SCLK SQW/OUT
3
VCC VBAT
8
VCC
JP36
SCL_1

1 JP29 DS1307
2 1
3 2
EXERNAL BATTERY CONNECTION

DeccanRobots 32
www.deccanrobots.com
User manual for PCAM

Schematics – EEPROM 24C256

VCC

U9

1 8
A0 VCC
2 5
A1 SDA SDA_1
3
A2
6
SCL_1 SCLK
7 4
WP GND

AT24C256

DeccanRobots 33
www.deccanrobots.com
User manual for PCAM

Schematics – L293D
DC Motor Driver

JP5
VCC
1
2 U13
3 JP8
1 16
E1 VSS 1
2 15
JP6 I1 I4 2
3 14
O1 O4
2 4 13
GND GND
1 5 12
GND GND
6 11
O2 O3 1
JP7 7 10
I2 I3 2
8 9
2 VS E2 3
1
JP9
L293D

DeccanRobots 34
www.deccanrobots.com
User manual for PCAM

Schematics – 4x4 Keypad

SW1 SW5 SW9 SW13

SW2 SW6 SW10 SW14

SW3 SW7 SW11 SW15

VCC RP2 SW4 SW8 SW12 SW16


1 2
3
4
5
6
7
8
9
C
1K
8
7
6
5
4
3
2
1

JP42

HEADER 8

DeccanRobots 35
www.deccanrobots.com
User manual for PCAM

Schematics – 16x2 LCD


JP6 FEMALE CONNECTOR
VCC

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

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

VCC JP7

1
2
3
R8
4
47K 5
6
1

7
2 8
R1
1K
1
2
3
3

JP4

DeccanRobots 36
www.deccanrobots.com
User manual for PCAM

Schematics – 93C46 EEPROM

VCC

U6

8
3 JP31

VCC
3 DI
2
2 SK 1
1 6
1 CS 6 2
4

GND
4 DO 3

JP24 HEADER 3
93C46
5

DeccanRobots 37
www.deccanrobots.com
User manual for PCAM

Schematics – IR, Temperature &


Preset
JP38
HEADER 5 VCC

5
4
3
2
1
VCC
D9

1
IR Transmitter
R17 2 Q5
LM35
200E

3
U11 VCC
TSOP1738
VCC

1
2
3

1
R21 R22
10K 200E
1
2
C7 3 2
R24
5K

3
VCC

IR RECEIVER
U5
D2
5 8
5 8
1

6 7
6 7
R13 2 R23
10K
4

5K
LM358
4
3

DeccanRobots 38
www.deccanrobots.com
User manual for PCAM

Schematics – Power Supply

VCC

VCC

U12 R26
JP45 1K
3 1 3
VIN O/P
2

GND
1 JP44
CONN JACK
1 D11
7805 C14 LED
2
2

C12 C13
1000uF, 16V

DeccanRobots 39
www.deccanrobots.com
User manual for PCAM

For First Time Users


• Connect 9 to 12V DC power to the hardware.
• Green LED should glow with power on.
• By default, 89S52 microcontroller is mounted on the
board.
• To use AVR microcontroller with this hardware,
remove 89S52 using IC Extractor or with the help of
small tip screw driver. Place AVR microcontroller in
appropriate socket (Refer previous pages of this user
manual for AVR Sockets).

DeccanRobots 40
www.deccanrobots.com
User manual for PCAM

Programming the Microcontroller


• Use HandyProgUSB ISP programmer to program the
target microcontroller. Connect HandyProgUSB ISP
to the board as shown on page 2. Other end of the
HandyProgUSB ISP Programmer can be directly
inserted to USB Port or to the USB extension cable.
• Install & use HandyProgUSB Software to program
the target microcontroller.
• A detailed procedure for HandyProgUSB Software is
described on next page.

DeccanRobots 41
www.deccanrobots.com
User manual for PCAM

1 HandyProgUSB Software
Select Target Microcontroller

Select Actions

2
Select Flash Hex File

3
Select EEPROM Hex
File (Only for AVR)

Start Programming

4 Status messages will


appear here.

DeccanRobots 42
www.deccanrobots.com
User manual for PCAM

Interfacing Microcontroller with the


Interfacing circuits – Step 1

Use the female to


female connectors
provided with the
product to connect
microcontroller’s port
to the interface
circuits.

DeccanRobots 43
www.deccanrobots.com
User manual for PCAM

Interfacing Microcontroller with the


Interfacing circuits – Step 2
• Write the firmware program using 8051IDE for 89S52
and WinAVR for AVR microcontrollers.
• Assemble / Compile the program to generate Hex
file.
• Load the Hex file into HandyProgUSB Software.
• Connect HandyProgUSB Programmer to the kit and
Program your hex file into the target microcontroller.
• Once the programming gets over, target
microcontroller is put in Run mode automatically.

DeccanRobots 44
www.deccanrobots.com
User manual for PCAM

Information
DeccanRobots
205, Decision Tower, Next To CityPride,
Satara Road, Pune 411037 India
Ph: +91 20 24228818 (Not for support)
www.deccanrobots.com
[email protected]

Send your support query only via email.

Disclaimer:
PCAM (Practical Course For ATMEL Microcontroller) is designed only for learning and
experiments. This product is not designed for mission critical applications and industrial product
development.

DeccanRobots 45

You might also like