EVBavr04 en final - · PDF filerelay, buzzer, RTC (real time clock), ... External circuits...

12
rter Kits Embedded W e b S er ve PIC m i crocontrollers Sta- s for ‘ 51 , A V R, S T , at ion B oard E va l u r s Prototyping Boards Mini m od- M icr opr oc es or s y stem s , PC B A V R, P I C , S T microcontrollers ed In S y stem programmers fo r net con trol l ers, RFID H igh S p e- ules for microc on tro l ler s , et her - d e signing Eva l ua t ion B oard s f or et her net c ont r oll er s, R F ID H igh nimodule s for mic r ocontrollers , Servers Protot y ping B oard s mi- lers Star t er Kits Embedded Web ‘51, AVR, ST, PIC mi c r oc o ntr ol- S peed I n S ys t em s pr og ram m e- rocontrolle r s Start er K its E m b e- ards fo r `51, AVR , S T , P I C m ic- P CB d esigning E valuat ion B o - oll er s M icr opr oces o r s ystems, rs for A VR , PIC, S T m ic roc ont rl- dded Web Serwers Pro t otyping m er s for AVR, P I C, S T m ic r oco- High S pee d I n S y s tem pr ogram- c on tr oll er s , et h ernet c o ntro l lers, B o ards Mi ni modules for m i cro- controllers M ic ropr oc eso r B oar ds ning Ev aluat ion S y s t em s , PCB Des i g - R Many ideas one solution EVBavr04 evaluation board for AVR microcontrollers ATmega8 and ATmega48/88/168. User`s manual REV 1.0

Transcript of EVBavr04 en final - · PDF filerelay, buzzer, RTC (real time clock), ... External circuits...

rter K

its E

mbedd

ed W

eb S

erve

PIC m

icroc

ontro

llers

Sta-

s for

‘51, A

VR, ST,

ation

Boa

rdEva

lu

rs Prot

otypin

g Boa

rds M

inimod

-

Microp

roces

or sy

stems,

PCB

AVR, P

IC, S

T micr

ocon

trolle

rs

ed In

Sys

tem pr

ogram

mers fo

r

net c

ontro

llers,

RFID

High

Spe

-

ules f

or micr

ocon

trolle

rs, et

her-

desig

ning E

valua

tion B

oards

for

ethern

et co

ntroll

ers, R

FID H

igh

nimod

ules f

or micr

ocon

trolle

rs,

Servers

Prot

otypin

g Boa

rds m

i-

lers S

tarter

Kits

Embe

dded

Web

‘51, A

VR, ST,

PIC m

icroc

ontro

l-

Speed

In S

ystem

s prog

ramme-

rocon

trolle

rs Star

ter K

its E

mbe-

ards f

or `51

, AVR, S

T, PIC

mic-

PCB desig

ning E

valua

tion B

o-

ollers

Micr

oproc

esor

syste

ms,

rs for

AVR, P

IC, S

T micr

ocon

trl-

dded

Web

Serw

ers P

rototy

ping

mers fo

r AVR, P

IC, S

T micr

oco-

High S

peed

In S

ystem

prog

ram-

contr

ollers

, ethe

rnet c

ontro

llers,

Boards

Mini

module

s for

micro-

contr

ollers

Micr

oproc

esor

Boards

ning E

valua

tion

Sys

tems,

PCB Des

ig-

R

Many ideas one solution

EVBavr04 evaluation board for AVR microcontrollers

ATmega8 and ATmega48/88/168.

User`s manual

REV 1.0

2

3. Introduction

EVBavr04 is a development board designer for the hobbyist and engineers who want to quickly prototype their system based on AVR microcontrollers from Atmel. Developer has access to all pins of the micro, which are brought to the header (pin connectors) and labeled accordingly. Depending upon the board`s configuration (listed versions) some or all of the following components are found on the board: thermometer, potentiometer, relay, buzzer, RTC (real time clock), four seven-segment LED and LCD display (2x16). The pin headers provided allow easy access to all these components. In addition, there are eight micro-switches and eight diodes which could be connected to any of the pin connectors or additional components, which may be placed on the large, adjacent prototype area. The power circuitry on board (bridge, voltage regulator) eliminates the need for an external regulated power supply. This board comes with the several examples of the C code routines (source from), to facilitate testing and quick development in using the board`s resources.

We wish great success and full satisfaction while designing and constructing appliances based on EVBavr04.

3

2. �ard layout.

1. Prototype area. 2. Additional components connector. 3. LED`s and micro-switches 4. Potentiometers 5. Thermometer LM35 6. RESET switch 7. Accumulator 3V6. 8. Buzzer 9. Programmer header. 10. Power ON/OFF switch. 11. Input power jack (AC/DC). 12. Relay`s header. 13. RS232 port 14. I2C interface port 15. 1-Wire port 16. Processor, led out and doubled processor ports . 17. Real Time Clock DS1307. 18. LM317 voltage regulator. 19. LCD display (optional). 20. 7-segment LED.

4

3. Supported processors

ATmega8 ATmega48/88/168

FLASH 8 KB 4/8/16 KB

SRAM 1 KB 512/1K/1K B

EEPROM 512 B 256/512/512 B

Periphery

• Two 8-bit Timer/Counters with Separate Prescaler, one Compare Mode • One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture Mode • Real Time Counter with Separate Oscillator • Three PWM Channels • 6-channel ADC in PDIP package Eight Channels 10-bit Accuracy• Byte-oriented Two-wire Serial Interface • Programmable Serial USART • Master/Slave SPI Serial Interface • Programmable Watchdog Timer with Separate On-chip Oscillator • On-chip Analog Comparator

• Two 8-bit Timer/Counters with Separate Prescaler, one Compare Mode • One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture Mode • Real Time Counter with Separate Oscillator • six PWM Channels • 6-channel ADC in PDIP package Eight Channels 10-bit Accuracy • Byte-oriented Two-wire Serial Interface • Programmable Serial USART • Master/Slave SPI Serial Interface • Programmable Watchdog Timer with Separate On-chip Oscillator • On-chip Analog Komparator • Five sleep modes

Supply voltage 2.7V – 5.5V ver.8L 4.5V – 5.5V ver. 8

1.8 - 5.5V @ATmega48V/88V/168V,

2.7 - 5.5V @Atmega48/88/168

Clock frequency 0-8 MHz ver.8L 0-16 MHz ver.8

ATmega48/88/168

0 - 10 MHz @ 2.7-5.5V

0 - 20 MHz @ 4.5-5.5 V

ATmega48V/88V/168V

0 - 4 MHz @ 1.8-5.5V

0-10 MHz @ 2.7-5.5 V

Temperature range -40° ÷ + 85°C

Cases 28-pin PDIP

5

4. Power supply for board Recommended external power supply voltage is 7-12V AC, or 9-15V DC. A standard power jack (bolt diameter 2.1mm - negative) is provided at the edge of the board. Stabilized voltage VTG is available on the double header and on the prototype area of the board. The selection of the VTG is provided through a 3V3 header. The default voltage VTG is 5V DC (no jumper on 3V3 header). By placing a jumper 3V3, VTG becomes 3.3 V DC and can be regulated from 3.3V to 1.6V by 3V3POT. The SUPPLY header allows for direct access to the power jack input. Placing a jumper by passes the bridge and voltage regulator. 5. Peripheral circuits 5.1. LEDs The board has 8 LED diodes, which make the simplest interface between the system and the user. This is especially useful for the beginners, who want to manipulate or debug their program with different hardware configurations. The diode turns on after grounding of the associated Ldn (n = 0 – 8) pin.

Figure 1. LED diodes

5.2. Switches The board is equipped with 8 micro-switches. Pressing one of them causes grounding of the corresponding pin on the SW header.

Figure 2. Switches

6

5.3. Relay Acces to the relay circuitry consist of the REL pin of the MISC header and pins: NC,NO,COM of the relay header. REL pin is indirectly connected to the base of the transistor. Logic level 1 (5 or 3.3V DC) applied to the REL pin, will activate the relay. External circuits can be controlled via NC, NO, COM I/O pins.

Figure 3. Relay schematic

5.4. Acoustics indicator (speaker) The board has an acoustic indicator turned on and off by the transistor. The base of the transistor is connected to the SPK pin of the MISC header. Logic level `1` (5 or 3.3V DC) applied to the SPK pin, will activate the speaker.

Figure 4. Implementation of acoustic indicator

5.5.Potentiometer The board is equipped with two potentiometers, allowing for simulation of the analog circuit outputs. The potentiometer enables the adjustmet of voltage in the range 0-VTG. The potentiometer`s outputs are accessible on ADJ1 and ADJ2 pin of the MISC connector.

7

Figure 5. Potentiometer

5.6.Sevensegment LED display The board is equipped with four 7-segment led display. They make an interface bettwen the system and the user, allowed to display up to four chars. Each led display has two anodes, seven segments and DP (digital point), which become active after applied to their pin logic level ‘0’.

Figure 6. Implementation of 7-segment LED

5.7.RS232 Interface There is a DB-9 connector on the board, connected with the ST3232 state converter. On the other side of the converter there are pin connectors with converter circuit terminals, allowing to plug in to the processor. 5.8. Real Time Clock DS1307 The board has one real time clock with accumulator 3V6 9teh board ca be also supply form accumulator). The clock communicates with the micro through the I2C interface. All the connections needed for controlling the DS1307 circuit are brought out to the Rtc pin header. The accumulator pin is also placed on the header. 5.9. LCD display The board has one LCD display interface. The LCD connector has four data lines and two control lines: strobe line E and control line R/S. The dispaly R/W line is permanently connected to ground; all other lines are available at the pin header. The adjustmet of contrast id done by two way:

8

• by potentiometr ADJ CONT which output pin ADJC must be then connected with LCD`s pin CONT.

• programmable,then LCD`s pin CONT must be connected to the processor. 5.10. Potentiometer ADJ CONT There is a ADJ CONT potentiometer, which allows to control the contrast on LCD. Then output pin ADJC must be connected with LCD`s pin CONT. 5.11. 3V3 potentiometer. The board is equipped with one potentiometer, alowing to regulate voltage VTG between 3.3 – 1,25 V ( even if 3V3 jumper is closed). 5.12. 1-Wire connector Allows to connect an external devices using an 1-wire interface. 5.13. I2C connector Allows to connect an external devices using an I2C interface. 5.14. Thermometer LM35. Allows to measure environment`s temperature and show it i.e. on seven-segment`s LED or LCD`s display 6.Header and connectors 6.1.Procesor and pheripherals connectors

Procesor`s pins description Vproc- procesor voltage supply GND – ground RST – reset XT1- clock input XT2- clock output RST,XT1,XT2 – when not connected, may be used as signal pins PA0...PA7 – procesor`s port A PB0...PB7 – procesor`s port B PC0...PC7 – procesor`s port C PD0...PD7 – procesor`s port D PE0...PE2 – procesor`s port E

Figure 7. Procesor connector

9

7-segment LED pins A0...A3 – anodes supply A,B,C,D,E,F,DP – segments supply (description on the board)

Figure 8.Sevensegment LED`s connector

MISC pins RxD, TxD – RS232 signals SPK – speaker ADJ0 – potentiometer`s pin ADJ1 – potentiometer`s pin REL – relay control pin VBAT – accumulator`s pin FT – real time clock operation correction line SDA – I2C real time clock interface data line

SCL – I2C real time clock interface clock line Figure 9. MISC connector

LED diodes pins LD0...7 – diodes Switches pins SW0...7 – micro-switches

Figure 90.Diodes and switches

6.2.LCD display connector

LCD ADJC – ADJ CONT potentiometer pin CONT – contrast line LCD R/S – control line LCD data/order E – strobe line LCD D4,D5,D6,D7 – LCD data lines

Figure 101. LCD connector

10

6.3.Relay connector

NO – normally open NC – normally closed CON – common

Figure 11. Relay connector.

6.4. Programmer`s connector

GND – ground VTG – voltage supply PB6 – data input line MISO PB7 – programmator`s clock line SCK RESET – reset LED – line connected with diode LED. During proggraming the diode islighting.

PB5 – programator`s output data line MOSI

Figure 12. ISP programmer`s connector

7. 7. Jumpers, supply LED and reset. Jumper name Function

Jumper SUPPLY Shorted, regulated voltage (5V) is provided from local power circuitry, open voltage comes from the external power supply.

Jumper 3V3 jumper shorted power is 3.3V, open 5V.

Jumper RESET when is closed, allowed to causes hardware reset

Jumpers XT1 i XT2 allow to choose the source of the processor`s clock signal. When it is quartz-controlled, both jumpers should be disconnected. Shorted allowes for the external clock to the processor..

Jumper LOAD shorted causes loading an accumulator 3V6.

Jumper BACKUP shorted causes that all board is supplied from accumulator 3V6

ISP LED is lighting during the prorammator work.

POWER led power LED indicator.

RESET pressing this button causes hardware reset.

11

8. Demo programs.

• LCD.c demo of LCD display, there is a moving sign on the display saying "EVBavr02"

• TERMOMETR.c temperature measurement in [C], the result is displayed on LCD • RTC.c demo of real time clock, the program displays the current date in the form:

hour : min : day : month : year. The update of the clock settings using the keyboard. Microcontroller's port lines should be connected with the appropriate lines SDL and SCL in circuit DS1307 led to pin connectors.

• LED.c demo of LEDs, four functions chosen from the keyboard, each one causes a different light effect on the diodes.

• 7SEGLED.c demo of 7-segment LED displays

9. Available version. The EVBavr04 evaluation board includes:

• ATmega8 processor (can be change) • All connectors • four 7-segment LEDs • leds and switches • two potentiometers • relay • speaker • LM35 thermometer • Real time clock DS1307 and 3.6V accumulator

There are also additionally accesories:

• LCD display (blue, green (with lighting or without)) • 10 cables (to connect the pins) • External clock • ISPcableI or ISPcableII programmator

12

10. Schematic

1 2 3 4 5 6

A

B

C

D

654321

D

C

B

A

ADC0

ADC2

ADC4ADC5

ADC1

ADC3

AREFVproc

PD7

PD0PD1PD2

PD6PD5

PD3PD4

PB0PB2PB1

XTAL1AVCC

MISOMOSI

CLK

RESET1

XTAL210 XTAL19

GND8

AVCC 20

AGND 22

AREF 21VCC7

PD0/RXD2

PD1/TXD3

PD2/INT04

PD3/INT15

PD4/T06

PD5/T111

PD6/AIN012

PD7/AIN113

PB0/ICP14 PB1/OC1 15PB2/SS 16PB3/MOSI 17PB4/MISO 18PB5/SCK 19

PC0/ADC0 23PC1/ADC1 24PC2/ADC2 25PC3/ADC3 26PC4/ADC4 27PC5/ADC5 28U1

ATmega8

XTAL2

RESET

GN

D3

Vou

t2

VC

C1

U2LM35

VTG GND

R8ADJ0

GND

VTG

R19

75C121u

GND

TEM

ADJ1

AD

J1

OUT2 IN 3

REG1LM317

R33300

+ C1047u

+ C11470u/16V

GNDGND

C3100n

SWH_2

SUPPLY

GNDSW9

SW SPST

GND

123

JP_S1VCC_IN

POWER

LED

R20

1kVTG GND

C4100n

GND 4

1

3

2

B1

BRIDGE1

+

C16330n

+C14330n

+

C15330n

+

C17330n

+

C13100n

GND

GND

C1+1

V+2

C1-3

C2+4

C2-5

V-6

T2out7

R2in8 R2out 9T2in 10T1in 11R1out 12R1in 13T1out 14GND 15VCC 16U3

ST3232594837261

JP16

RS 232C

GND

VTG

GND

GND

TxDRxD

RxD TxD

VTG

GND

R6

4k7REL

REL

2

REL

3

REL4

Q3BC 857

RL1RELAY

D9

ADJ1TEMSPK REL

1 23 45 67 89 1011 1213 1415 1617 1819 2021 2223 2425 2627 28

JP13

uP

ADC5ADC4ADC3ADC2ADC1ADC0

AREFAVCCCLKMISOMOSIPB2PB1

RESETPD0PD1PD2PD3PD4

Vproc

XTAL1XTAL2

PD5PD6PD7PB0

VBATSDAFTSCL

GND

C922p

C822p

C7100n

R3210k

VTG

GNDGND

JP2 JP3X1

8MHz

JP4XTAL1

XTAL2

REL3REL4

REL2 123

JP15

REL

Vpr

oc

L0 L1L2 L3

1 23 45 67 8

JP7

LEDx

L7L6L5L4

D714 D613 D512 D411 D310 D29 D18 D07 E6 R/W5 R/S4 KONTR3 Vcc2 GND1

16 15

JP6

LCD 2X16

GNDVTG

GND

(optional)

ADJC5k

GND

VTG

VTG

Q2BC 817

GND

R21

1k

1 23 45 67 89 10

JP5

LCD

R317k5

C5100n

VTG

JP1AREF

R7ADJREF

GND VTG

ADJ2WIRE

R9ADJ1

GND

VTG

ADJ2

R36910

SWH_33V3

GND

R343V3POT

GND

R3575

GND

VTG

R3

4k7SPKQ1

BC 557

SPK

R1010k

VTG

SPEAKERRESET

RESET RESETSW-PB

GND

C2100n

GND

R24k7

VTG

SWH_1JRST

R1

100

Vss4 Vbat3 OSCO2 OSCI1 Vcc 8

FT/OUT 7

SCL 6

SDA 5

U4

DS1307

Y132.768kHz

GND

R554.7k

R564.7k

R574.7k

VTG

BT1AKU3V6

FTSCLSDA

GND

VTG

C6100n GND

R54

200

D12

SM5819

D13

SM5819

JP17

VTG

VB

AT

SW1SW-PB

SW2SW-PB

SW0SW-PB

R1210k

R1110k

R1310k

VTG VTG VTG

GND GND GND

SW3SW-PB

R1410k

VTG

GND

SW0

SW1

SW2

SW3

SW4SW-PB

R1510k

VTG

GND

SW4

SW5SW-PB

R1610k

VTG

GND

SW5

SW6SW-PB

R1710k

VTG

GND

SW6

SW7SW-PB

R1810k

VTG

GND

SW7

R42

100

R43

100

R44

100

R45

100

R46

100

R47

100

R49

100

R48

100

LEDS

LD0LED

LD1LED

R221k

R231k

VTGVTG

LD2LED

R241k

VTG

LD3LED

R251k

VTG

L0

L1

L2

L3

LD4LED

LD5LED

R261k

R271k

VTGVTG

LD6LED

R281k

VTG

LD7LED

R291k

VTG

L4

L5

L6

L7

SWITCH

11

22

44

55

66

77

99

1010

33

88

LED_7SEG

D16LED3

11

22

44

55

66

77

99

1010

33

88

LED_7SEG

D15LED2

11

22

44

55

66

77

99

1010

33

88

LED_7SEG

D14LED1

11

22

44

55

66

77

99

1010

33

88

LED_7SEG

D11LED0

VTG

Q7BC 327

VTG

Q6BC 327

VTG

Q5BC 327

VTG

Q4BC 327

R53

2k2

R52

2k2

R51

2k2

R50

2k2

A0

A1

A2

A3

GFABEDC

DP

GFABEDC

DP

GFABEDC

DP

GFABEDC

DP

7-SEGMENT LED

1 23 45 67 89 10

JP12

ISP

MOSI

RESET

CLK

MISO

GND

R37510

VTG

D10ISP

R41 100

R38 100

R39 100

R40 100

VTG

SW3SW1

SW2SW0 1 2

3 45 67 8

JP11

SWx

SW7SW6SW5SW4

A0A2

A1A3

G F

A B

E D

C DP

R58

330R59

330R60

330R61

330

R62

330R63

330R64

330R65

330

1 23 45 67 89 1011 12

JP18

7SEG

C1

100n

GND

VTGBackup1

ADC4ADC5

VTGGND

R44k7

R54k7

VTGVTG

R66

10kVTG

1234

JP9

I2C

R67100R

R302k2

VTG

GND

123

JP19

1-WIRE

VTG

WIRE

VTG

JSDA

GND

GND

JSCL

1 23 45 67 89 1011 12

JP8

MISC

C18

100n

GNDL1

10uVproc

AV

CC

GND

GND

RS232 RTC

THERMOMETER

LCDPROCESSOR

LM 317 ADJ0 ADJ1 RELAY

CONNECTORS

OSCILLATOR

1 - WIRE

1 of 1 1.00

http://www.propox.comemail: [email protected]

Size: File: Rev:

Date: 15-03-2006

Title: EVBavr04 (AVR Evaluation Borard)Error : LogoFINAL_many2.bmp file not found.