ВУЗ: Не указан

Категория: Не указан

Дисциплина: Не указана

Добавлен: 23.07.2024

Просмотров: 30

Скачиваний: 0

ВНИМАНИЕ! Если данный файл нарушает Ваши авторские права, то обязательно сообщите нам.

m i k r o E l e k t r o n i k a d e v e l o p m e n t s y s t e m s

 

8051easy

 

 

 

 

 

 

 

 

 

 

 

 

 

development system

 

 

The mark above every button represents the name of the pin which the button is connected to. In order to use a button, appropriate pin of ports 0, 1 i 3 must be designated the input one. Jumper in the lower left corner of the development system is used to define if the active value of a pin is 0 or 5 V. If the jumper is set to “up”, then activating a certain button will bring logical one to the pin, while “down” position will bring logical zero.

ButtonsTasteri canmogube biti connectedpovezani tona::

5V 0V

Picture 16.

LCD DISPLAY

Standard LCD display (2x16 characters) is supplied. However, it is not a limitation, because any display having the same type of communication with the microcontroller can be used. Display contrast can be adjusted using the potentiometer in the lower left corner of the development system. LCD display can be connected to the port 1 or the port 2. Following picture shows how to connect the LCD to port 1 and the picture 18. how to connect LCD to port 2 of the ATS908515 microcontroller.

 

 

 

 

+5V

 

 

 

 

 

 

 

RS

P1.0

 

VCC

 

 

 

 

Picture 17.

 

P1.1

 

P0.0

 

 

 

 

 

 

 

 

 

 

 

 

E

P1.2

 

P0.1

 

 

 

 

 

 

 

P1.3

 

P0.2

 

 

 

 

 

 

 

D4

 

 

 

 

 

 

 

 

P1.4

 

P0.3

 

 

 

 

 

 

 

D5

 

 

 

 

 

 

 

 

P1.5

 

P0.4

 

 

 

 

 

 

 

D6

 

 

 

 

 

 

 

 

P1.6

 

P0.5

 

 

 

 

 

 

 

D7

 

 

 

 

 

 

 

 

P1.7

 

P0.6

 

 

 

 

 

 

+5V

 

AT89S8252

 

 

 

 

 

 

 

RESET

P0.7

 

 

 

 

 

 

 

 

 

 

 

 

 

 

10K

 

P3.0

ICP

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

P3.1

ALE

 

 

 

 

 

 

 

 

P3.2

PSEN

 

 

 

 

 

 

Reset

 

P3.3

P2.7

 

 

 

 

 

 

 

P3.4

P2.6

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

P3.5

 

P2.5

 

 

 

 

 

 

 

 

P3.6

 

P2.4

 

 

 

 

 

 

4MHz

 

P3.7

 

P2.3

 

 

m i K r o e l e k t r o n i

k a

+

 

 

OSC2/CLKIN

 

P2.2

 

 

 

 

 

 

 

 

OSC1/CLKIN

 

P2.1

 

 

 

 

 

 

 

 

GND

 

P2.0

 

 

 

 

 

 

 

 

 

 

D7

D6

D5

D4 D3 D2 D1 D0

E R/W RS Vee Vdd Vss

 

 

 

 

 

 

 

 

 

 

1

 

 

 

 

 

 

 

 

 

 

+5V

 

 

 

 

 

 

 

 

 

 

KontrastLCD contrastLCD-a

 

PIC, AVR, MC68HC11, i8051, PSoC development systems www.mikroelektronika.co.yu

9



m i k r o E l e k t r o n i k a d e v e l o p m e n t s y s t e m s

 

8051easy

 

 

 

 

 

 

 

 

 

 

 

 

 

development system

 

 

 

 

 

 

+5V

 

 

 

 

 

 

 

 

Picture 18.

 

P1.0

 

VCC

 

 

 

 

 

 

 

 

 

 

P1.1

 

P0.0

 

 

 

 

 

 

 

 

 

 

 

 

P1.2

 

P0.1

 

 

 

 

 

 

 

 

 

 

 

+5V

P1.3

 

P0.2

 

 

 

 

 

 

 

 

 

 

 

P1.4

 

P0.3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

P1.5

 

P0.4

 

 

 

 

 

 

 

 

 

 

 

10K

P1.6

 

P0.5

 

 

 

 

 

 

 

 

 

 

 

 

P1.7

AT89S8252

P0.6

 

 

 

 

 

 

 

 

 

 

 

 

RESET

P0.7

 

 

 

 

 

 

 

 

 

 

 

 

P3.0

ICP

 

 

 

 

 

 

 

 

 

 

 

Reset

P3.1

ALE

 

 

 

 

 

 

 

 

 

 

 

P3.2

PSEN

D7

 

 

 

m i K r o e l e k t r o n i k a

+

 

P3.3

 

P2.7

 

 

 

 

 

D6

 

 

 

 

 

 

 

 

 

 

 

P3.4

 

P2.6

 

 

 

 

 

 

 

 

 

 

 

 

D5

 

 

 

 

 

 

 

 

 

 

 

P3.5

 

P2.5

 

 

 

 

 

 

 

 

 

 

 

 

D4

 

 

 

 

 

 

 

 

 

 

 

P3.6

 

P2.4

 

 

 

 

 

 

 

 

 

 

 

 

E

 

 

 

 

 

 

 

 

 

 

4MHz

P3.7

 

P2.3

 

 

 

 

 

 

 

 

 

 

 

RS

 

 

 

 

 

 

 

 

 

 

 

OSC2/CLKIN

 

P2.2

D7

D6

D5

D4

D3

D2

D1

D0

E R/W RS Vee Vdd Vss

 

 

 

 

 

 

 

 

 

 

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OSC1/CLKIN

 

P2.1

 

 

 

 

 

 

 

 

 

+5V

 

 

GND

 

P2.0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

KontrastLCD contrastLCD-a

 

 

1

 

 

 

 

 

 

 

 

1

 

 

 

 

 

 

 

 

8051

 

 

 

 

 

 

 

 

8051

 

 

 

 

 

Picture 19.

 

 

 

 

 

 

 

 

 

Picture 20.

LCD display connected to port 1.

LCD display connected to port 2.

PIC, AVR, MC68HC11, i8051, PSoC development systems www.mikroelektronika.co.yu

10


m i k r o E l e k t r o n i k a d e v e l o p m e n t s y s t e m s

 

8051easy

 

 

 

 

 

 

 

 

 

 

 

 

 

development system

 

 

SEVEN-SEGMENT DISPLAYS

Seven-segment display consists of four digits which are refreshed and displayed using port 1 in combination with port 3. Using the DIP switch SW2, you can include or exclude the digits in use. For example, let’s say that we need to enable display of the first digit on the left. By turning the fourth switch (SW2) to (ON), digit of the seven-segment display (DIS1, leftmost digit) will be showing value defined by values of port 1 pins (picture 21.). Procedure is similar with digits DIS2, DIS3 and DIS4. The following picture shows how to connect the seven-segment display to the microcontroller.

Turn on switch Sw2 if you want to use displays

Picture 21.

P3.2

P3.3

P3.4

P3.5

SW2

 

 

 

10ΚΩ

 

TR4

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

10ΚΩ

TR3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

10ΚΩ

 

 

 

 

 

 

 

 

 

 

 

TR2

 

 

 

 

 

 

ON

 

 

 

 

10ΚΩ

 

 

 

 

 

 

SW2

 

 

 

 

TR1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

2

3

 

4

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

g f K a b

g f K a b

g f K a b

g f K a b

 

 

 

 

 

 

 

 

8 8 8 8

 

 

 

 

 

 

 

 

e d K c dp

e d K c dp

e d K c dp

e d K c dp

 

 

 

 

 

330Ω

h

 

 

 

 

 

 

 

 

 

 

330Ω

g

 

 

 

 

 

 

 

 

 

 

330Ω

f

 

 

 

 

 

 

 

 

 

 

330Ω

e

 

 

 

 

 

 

 

 

 

 

330Ω

d

 

 

 

 

 

 

 

 

 

 

330Ω

c

 

 

 

 

 

 

 

 

 

 

330Ω

b

 

 

 

 

 

 

 

 

 

 

330Ω

a

 

 

 

 

 

 

 

 

 

 

 

 

 

+5V

 

 

 

 

 

 

 

 

 

P1.0

 

VCC

 

 

 

 

 

 

 

 

 

P1.1

 

P0.0

 

 

 

 

 

 

 

 

 

P1.2

 

P0.1

 

 

 

+5V

 

 

 

 

 

P1.3

 

P0.2

 

 

 

 

 

 

 

 

P1.4

 

P0.3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

P1.5

 

P0.4

 

 

 

10K

 

 

 

 

 

P1.6

 

P0.5

 

 

 

 

 

 

 

 

 

P1.7

AT89S8252

P0.6

 

 

 

 

 

 

 

 

 

RESET

P0.7

 

 

 

 

 

 

 

 

 

P3.0

ICP

 

 

 

Reset

 

 

 

 

 

P3.1

ALE

 

 

 

 

 

 

 

 

P3.2

PSEN

 

 

 

 

 

 

 

 

 

P3.3

 

P2.7

 

 

 

 

 

 

 

 

 

P3.4

 

P2.6

 

 

 

 

 

 

 

 

 

P3.5

 

P2.5

 

 

 

 

 

 

 

 

 

P3.6

 

P2.4

 

 

 

 

 

 

 

 

4MHz

P3.7

 

P2.3

 

 

 

 

 

 

 

 

 

OSC2/CLKIN

 

P2.2

 

 

 

 

 

 

 

 

 

OSC1/CLKIN

 

P2.1

 

 

 

 

 

 

 

 

 

GND

 

P2.0

 

 

Picture 22.

 

 

 

 

 

 

 

 

 

 

 

PIC, AVR, MC68HC11, i8051, PSoC development systems www.mikroelektronika.co.yu

11


m i k r o E l e k t r o n i k a d e v e l o p m e n t s y s t e m s

8051easy

 

ANALOG-DIGITAL CONVERTER

Microcontroller AT89C8252, that can be used in the development system, doesn’t have implemented 10bit A/D coverter. That is why a 12-bit A/D converter LTC1290 is added to the system.

development system

It is possible to read values of

Moguæe je oèitavati

Picture 23. 8 analog inputs vrednosti 8 analognih ulaza

+

+

P1.4

P1.5

P1.6

If you want to read values of AD0, ..., AD7 inputs, it is neccessary to set the DIP switch SW4 in the position shown on the picture 23. Picture 24. shows how to connect A/D converter and the microcontroller.

 

 

 

 

+5V

 

 

 

 

 

OE

Vdd

 

 

 

 

22μF

+

NC

NC

10ΚΩ

10ΚΩ

10ΚΩ

10ΚΩ

 

NC

NC

 

 

GND

OUT

 

 

 

 

 

4 MHZ

 

 

 

1ΚΩ

CH0

Vcc

 

 

 

 

 

 

 

 

CH1

ACLK

 

 

 

+5V

CH2

SCLK

 

 

 

CH3

Din

 

 

 

 

 

 

 

 

CH4

Dout

 

 

 

 

CH5

CS

 

 

 

 

CH6

REF+

 

 

 

 

CH7

REF-

 

 

 

 

COM

V-

 

 

 

A/DUlaziconverterA/D

DGND

AGND

 

 

 

 

 

 

 

 

konvertorainputs

LTC1290

 

 

 

+12V

NC

NC

 

 

 

 

 

 

 

 

Vin

NC

 

 

 

 

NC

Vref

 

 

 

 

GND

NC

4.7μF

+

+5V

 

 

 

 

REF02

 

 

 

 

 

 

 

 

 

 

 

10K

Reset

4MHz

 

 

 

 

 

 

 

 

Picture 24.

 

These switches have to be set to

 

 

Ovi prekidaèi moraju biti u položaju

 

 

 

in order to communicate with

 

 

 

 

 

 

ON kako bi se moglo komunicirati sa

 

 

 

A/D converter

 

 

 

 

 

AD konvertorom

 

 

 

 

 

 

 

 

 

 

 

CS_AD 4

 

 

ON

 

MOSI

3

 

 

 

 

 

 

 

 

 

 

MISO

2

 

 

 

 

 

 

 

 

 

 

SCK

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

+5V

 

 

 

 

 

 

 

P1.0

 

 

VCC

 

 

 

 

 

 

 

 

P1.1

 

 

P0.0

 

 

 

 

 

 

 

 

P1.2

 

 

P0.1

 

 

 

 

 

 

 

 

P1.3

 

 

P0.2

 

 

 

K A n a l :

5

+

P1.4

 

 

P0.3

 

 

 

 

 

 

 

 

 

 

c o n V :

 

P1.5

 

 

P0.4

 

 

 

A / d

 

4 0 9 5

P1.6

 

 

P0.5

 

 

 

 

 

 

 

 

P1.7

 

AT89S8252

P0.6

 

 

 

 

 

 

 

 

RESET

P0.7

D7

D6

D5

D4 D3 D2 D1

D0

E R/W RS Vee Vdd Vss

 

P3.0

 

ICP

 

 

 

 

 

 

1

 

P3.1

 

ALE

 

 

 

 

 

 

+5V

 

P3.2

 

PSEN

D7

 

 

 

 

 

 

 

P3.3

 

P2.7

 

 

 

 

 

 

KontrastLCD contrastLCD-a

 

 

 

 

 

 

 

 

 

 

D6

 

 

 

 

 

 

P3.4

 

 

P2.6

 

 

 

 

 

 

 

 

 

D5

 

 

 

 

 

 

 

P3.5

 

 

P2.5

 

 

 

 

 

 

 

 

 

D4

 

 

 

 

 

 

 

P3.6

 

 

P2.4

 

 

 

 

 

 

 

 

 

E

 

 

 

 

 

 

 

P3.7

 

 

P2.3

 

 

 

 

 

 

 

 

 

RS

 

 

 

 

 

 

 

OSC2/CLKIN

 

P2.2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OSC1/CLKIN

 

P2.1

 

 

 

 

 

 

 

 

GND

 

 

P2.0

 

 

 

 

 

 

 

 

PIC, AVR, MC68HC11, i8051, PSoC development systems www.mikroelektronika.co.yu

12