Board Specifications
–Microcontroller : Atmel AT89C5131A
–24MHz Crystal clock generator
–4 LEDs and 4 Switches for simple programs
–LCD (16x2) connection port–LCD (16x2) connection port
–Type B USB connector for power and
Programming
–All ports accessible
2
Board Layout : Ports
Port 1
ALE
P1.0P1.7
Port1pinshavebeenusedforswitchesandLEDs.So,whenthey
areusedforthisfunction,theycannotbeuseasgeneralpurposeI/O
pins.
ALE
AT89C5131A
3
Board Layout : Ports
Port 0
ALE
P0.7P0.0
ALE
AT89C5131A
4
Board Layout : Ports
Port 3
ALE
P3.0
P3.7
ALE
AT89C5131A
5
Board Layout : Ports
ALE
Port 2
ALE
P2.7P2.0
AT89C5131A
6
Board layout : Jumpers / Buttons
Reset
button
ALEEA
POWER SELECT
EAJumper
USB ATTACH/
DETACH SWITCH
Boot
Button
Attach
position
Detach
position
USB B type
Connector
8
Detailed Board Layout
9
Detailed Board Layout continued….
10
CAUTION!!!!!
Note that the certain port pins have been given multiple
functionalities and they can used to perform only one
function at a time.
Ports Alternate Functions
PORT 1 1)General Purpose I/OPORT 1 1)General Purpose I/O
2)LED’s (P1.4 -P1.7) and Switches (P1.0 –P1.3)
3)SPI interface
PORT 2 1)General Purpose I/O
2)Data lines for LCD(D0-D7)
PORT 0 1)General Purpose I/O
2)Control signal of LCD (RS: P0.0, R/W: P0.1, EN: P0.2)
11
Getting Started
Ensure that the you have downloaded and installed
–Keil uvision 4 : To edit , compile and generate HEX
file.file.
–Atmel Flip : To write the HEX file generated, into
the board’s flash memory.
You need:
Atmel Flip 2.4.6 for Windows XP
Atmel Flip 3.4.7 for Windows 7 or Windows
12
Operating modes
It operates in 2 modes –
•Boot loader mode : The hex file is written into the on chip
flash memory. This communication takes place through
USB port. USB port.
•Application mode : The board runs the application code
which has been programmed into the flash memory of
the microcontroller.
13
Boot loader Mode
To get into this mode, the following steps have to be done in the same
sequence as given below:
–Keep USB ATTACH/DETACH switch in “detach” position
–Press and hold the “Boot” button.
–Press and hold the “Reset” button, for a moment and release it, still
holding the Boot button pressed.holding the Boot button pressed.
–Release the Boot button.
–Keep USB ATTACH/DETACH switch in “attach” position
Note: we have to follow above steps every time if we want execute boot
loader
14
Boot loader Mode continued……
If boot loader mode execution procedure is followed
properly, PC will recognize new hardware and “Found New
Hardware Wizard ” window will appear.
Note:“FoundNewHardwareWizard”windowwillonly
appearduringfirsttimePt-51boardisconnectedtoyour
PCorDriveriscorrupted,Soignorestepsgiveninslides
no.16to19ifdriverisalreadyinstalled.
15
16
17
For newer version of flip give following driver path:
C:\Program files\ATMEL\FLIP 3.4.7\USB
18
19
Loading the program
•Connect Pt-51 board to your PC using B-type USB
cable.
•Execute boot loader mode using procedure given in
slide no.14 “Boot loader Mode”.slide no.14 “Boot loader Mode”.
20
B-Type USB Connector
Now your software is ready to communicate with the Board
Run the software Atmel Flip. You will see a window as shown above.
Note that the status of the
communication between the software and
the board is displayed here.
21
Click on this Icon to select
the microcontroller.
22
We use
AT89C5131A AT89C5131A
Microcontroller
from Atmel family.
So Select
AT89C5131
and click on OK
23
Click on this Icon….
and select “USB”
24
Click on “Open” to establish connection with the board
25
Indicates that connection has been
established
26
This procedure establish
connection between Pt-51 board
and PC over USB Port(Atmel Flip).
Note: Atmel Flip will establish
connection with Pt-51 board only
when boot loader mode is executed
successfully.
To load HEX file.
OROR
Click on
27
1
The HEX file generated, is by default, given the name of the
Project and stored in the project folderProject and stored in the project folder
28
Make sure BLJB bit is Unchecked.
1
Click on “Run”, this
programs the Flash with
the HEX file loaded.
Make sure BLJB bit is Unchecked.
If this bit is checked, MCU will execute boot loader on
RESET.
This is software bit for executing boot loader.
29
2
Programming in progress
Programming in progress
30
Green and red indicate the success and Green and red indicate the success and
failure of a process respectively.
31
To execute the code on Pt-51
•On successful programming of the Flash, to
execute the code,
–Press and release the “Reset” button.
•To program a different program on the board,
repeat the steps by first entering into the boot
loader mode.
32
Application mode
•When Pt-51 is powered up, if some code exists
in the flash memory then it directly enters the
application mode else it enters the boot
loader mode.loader mode.
•In this mode, the board will not communicate
with the PC and cannot be programmed.
33