com353 microprocessors laboratory - arzum...

11
COM353 Microprocessors Laboratory LAB8: Introduction to UNI-DS6 Education Board and 8051 40-PIN AT89S8253

Upload: others

Post on 13-Mar-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: COM353 Microprocessors Laboratory - Arzum Karatasarzumkaratas.weebly.com/uploads/2/4/5/7/24575139/lab8_labsheet.pdfpiezo buzzer and the microcontroller, it is necessary to place jumper

1

COM353 Microprocessors Laboratory

LAB8:

Introduction to UNI-DS6 Education Board and 8051 40-PIN AT89S8253

Page 2: COM353 Microprocessors Laboratory - Arzum Karatasarzumkaratas.weebly.com/uploads/2/4/5/7/24575139/lab8_labsheet.pdfpiezo buzzer and the microcontroller, it is necessary to place jumper

Gediz University

COM353 Microprocessors Laboratory

2

NAME: __________________ STUDENT ID: ____________ DATE: __________

Time : 2 lab hours

Objective :

To be familiar with main components of the development system

To be able to program a 8051 microcontroller with sample codes.

Lab Outcomes :

Practice with Uni-Ds6 Development System

Installing drivers needed to programming the microcontroller

Loading a sample program to the microcontroller

Running the sample code given.

A . THEORETICAL PART

In this lab, you will learn about Uni-DS6 Develeopment Systems.

1- INTRODUCTION :

The UNI-DS6 development system provides a development environment for

programming and experimenting with various microcontrollers from different

manufacturers. Numerous modules, such as 128x64 graphic LCD display, 2x16

alphanumeric LCD display, piezo buzzer, USB-UART, etc.are provided on the board and

allow you to easily simulate the operation of your target device.[1]

You can see the system

from Figure1.

Page 3: COM353 Microprocessors Laboratory - Arzum Karatasarzumkaratas.weebly.com/uploads/2/4/5/7/24575139/lab8_labsheet.pdfpiezo buzzer and the microcontroller, it is necessary to place jumper

Gediz University

COM353 Microprocessors Laboratory

3

Figure 1: UNI-DS6 Development System

2- COMPONENTS on the DEVELOPMENT SYSTEM

The development system contains some components. Those are the followings.

1. Power supply module

2. ADC input

3.USB UART1 module

4.USB UART2 module

5.USB communication connector

6.LCD2x16 display contrast potentiometer

7.mikroBoard socket

8.Jumpers used to select

pull-up/pull-down resistors

9.DIP switches for enabling

pull-up/pull-down resistors

10.I/O ports

11.GLCD contrast potentiometer

12.Touch panel controller

13.GLCD display connector

14.Touch panel connector

15.DIP switches for enabling

on-board modules

16.Push buttons

Page 4: COM353 Microprocessors Laboratory - Arzum Karatasarzumkaratas.weebly.com/uploads/2/4/5/7/24575139/lab8_labsheet.pdfpiezo buzzer and the microcontroller, it is necessary to place jumper

Gediz University

COM353 Microprocessors Laboratory

4

17.Jumper used to shorten protective resistor

18.Jumpers used to select push buttons’

logic state

19.MMC/SD card connector

20.Socket for DS1820 temperature sensor

21.Piezo buzzer

22.LEDs

23.Serial EEPROM module

24.LCD display connector[1]

You can see this parts from Figure2.

Figure 2: Main components of the Development System

Page 5: COM353 Microprocessors Laboratory - Arzum Karatasarzumkaratas.weebly.com/uploads/2/4/5/7/24575139/lab8_labsheet.pdfpiezo buzzer and the microcontroller, it is necessary to place jumper

Gediz University

COM353 Microprocessors Laboratory

5

3- Key Components will be used for this lab

a) Mikroboard : mikroBoard is designed for placing

microcontroller on a development system. Every mikroBoard

features an integrated programmer that is used for MCU

programming. For connection with a development system, the

mikroBoard uses two 2x40 male headers. In addition, the

mikroBoard can be used as a standalone device. [1] Mikroboard

module is illustrated on the figure at the right. We will use a

Mikroboard for 8051 40-PIN AT89S8253.

b) Piezzo Buzzer : Due to a built-in piezo buzzer, the

UNI-DS6 development system is capable of emitting

audio signals.To establish connection between the

piezo buzzer and the microcontroller, it is necessary

to place jumper J14 in adequate position. You are

informed by your TA about this adequate position. [1]

Piezo Buzzer is illustrated on the figure at the right.

c) LEDs : There are 72 LEDs on the UNI-DS6 development system used to visually

indicate the state of each microcontroller I/O pin. An active LED indicates that a logic

one (1) is present on the pin. In order to enable LEDs to illuminate, it is necessary to

select the appropriate port (PORTA, PORTB, PORTC, PORTD, PORTE or PORTF/G)

by using DIP switch SW12. Ports PORTH and PORTJ are not connected to LEDs. [1]

LEDs is shown in the figure following.

Page 6: COM353 Microprocessors Laboratory - Arzum Karatasarzumkaratas.weebly.com/uploads/2/4/5/7/24575139/lab8_labsheet.pdfpiezo buzzer and the microcontroller, it is necessary to place jumper

Gediz University

COM353 Microprocessors Laboratory

6

Programming Microcontroller

The mikroBoard on the development system uses a built-in programmer for MCU

programming. All you need to do is to connect the mikroBoard to a PC via a USB cable (Figure 3),

and to install the appropriate software on your PC.[1]

a) Installing Drivers

Please, install flash drivers for 8051 given by your TA in the lab. These drivers are needed to

do programming microcontroller, otherwise you cannot load any .hex program to the

microcontroller.

b) Software as Development Environment

MicroC Pro for 8051 will be used as a development environment. How this software is used

will be shown in the lab by your T.A.

c) Programming the microcontroller

Figure 3: Connecting the microboard to your PC or laptop via USB cable

[1]

Page 7: COM353 Microprocessors Laboratory - Arzum Karatasarzumkaratas.weebly.com/uploads/2/4/5/7/24575139/lab8_labsheet.pdfpiezo buzzer and the microcontroller, it is necessary to place jumper

Gediz University

COM353 Microprocessors Laboratory

7

In Figure 3, you can see how a microboard is connected to your laptop/PC by using USB

cable provided by the development system.

On the whole, whole logic about programmig a microcontroller on the UNI-DS6 is shown

in the Figure 4 .

Figure 4: MicroC for 8051 and 8051Flash User Interface

However, for this lab, you do not have to write a source code. You are supposed to load and

run the sample codes given by your T.A. by using this environment.

Page 8: COM353 Microprocessors Laboratory - Arzum Karatasarzumkaratas.weebly.com/uploads/2/4/5/7/24575139/lab8_labsheet.pdfpiezo buzzer and the microcontroller, it is necessary to place jumper

Gediz University

COM353 Microprocessors Laboratory

8

To summarize , please look at the Figure 5.

Figure 5: 8051Flash Programmer User Interface

Example 1 : Blinking Leds

Procedure :

1. Open MicroC Pro for 8051

2. Open “LED_Blinking.c”

3. Click the button shown in the Figure 6.

Figure 6 : MicroC Pro for 8051 User Interface

4. A new program interface will be open seen in the Figure 4

Page 9: COM353 Microprocessors Laboratory - Arzum Karatasarzumkaratas.weebly.com/uploads/2/4/5/7/24575139/lab8_labsheet.pdfpiezo buzzer and the microcontroller, it is necessary to place jumper

Gediz University

COM353 Microprocessors Laboratory

9

5. Then load and write the code into the controller.

6. Observe the results.

Example 2 : Piezzo Buzzer

Procedure :

1. Open MicroC Pro for 8051

2. Open “Sound.c”

3. Click the button shown in the Figure 6.

4. A new program interface will be open seen in the Figure 4

5. Then load and write the code into the controller.

Page 10: COM353 Microprocessors Laboratory - Arzum Karatasarzumkaratas.weebly.com/uploads/2/4/5/7/24575139/lab8_labsheet.pdfpiezo buzzer and the microcontroller, it is necessary to place jumper

Gediz University

COM353 Microprocessors Laboratory

10

B . EXPERIMENTAL PART

Exercise 1 : Leds Curtain

Procedure :

1. Follow the same procedure described in Example1 for Led_Blink.c , if you need

some special adjustment on the board, please perform it!

Exercise 2 : Light off Button

Procedure :

2. Follow the same procedure described in Example1 for Led_Blink.c,

if you need some special adjustment on the board, please perform it!

C : Conclusion

Please express what you learn with this laboratory work with at most one paragraph.

……………………………………………………………………………………………………

……………………………………………………………………………………………………

……………………………………………………………………………………………………

……………………………………………………………………………………………………

……………………………………………………………………………………………………

……………………………………………………………………………………………………

……………………………………………………………………………………………………

……………………………………………………………………………………………………

……………………………………………………………………………………………………

……………………………………………………………………………………………………

LAB EIGHT RUBRICS

Component Grade Actual points

Leds curtain 40

Light-off Button 50

Conclusion 10

Total 100

Page 11: COM353 Microprocessors Laboratory - Arzum Karatasarzumkaratas.weebly.com/uploads/2/4/5/7/24575139/lab8_labsheet.pdfpiezo buzzer and the microcontroller, it is necessary to place jumper

Gediz University

COM353 Microprocessors Laboratory

11

:EECEEEEFER

1- Uni-DS6 Development System User Manual,MikroElektronika

Digital version of it can be downloaded from

“http://www.mikroe.com/downloads/get/1631/unids6_manual_v100.pdf”

2- 8051Fash User Manual, MikroElektronika

Digital version of it can be downloaded from

“http://www.mikroe.com/downloads/get/1065/”