attiny2313 en final - PROPOX
Transcript of attiny2313 en final - PROPOX
rter K
its E
mbedd
ed W
eb S
erve
PIC m
icroc
ontro
llers
Sta-
s for
‘51,
AVR, S
T,
ation
Boa
rdEva
lu
rs Pro
totyp
ing B
oard
s Mini
mod-
Microp
roce
sor
syste
ms, PCB
AVR, P
IC, S
T micr
ocon
trolle
rs
ed In
Sys
tem pr
ogra
mmers f
or
net c
ontro
llers,
RFID
High
Spe
-
ules f
or m
icroc
ontro
llers,
ethe
r-
desig
ning E
valua
tion B
oard
s for
ethern
et co
ntroll
ers,
RFID H
igh
nimod
ules f
or m
icroc
ontro
llers,
Serve
rs Pro
totyp
ing B
oard
s mi-
lers S
tarter
Kits
Embe
dded
Web
‘51, A
VR, ST,
PIC m
icroc
ontro
l-
Speed
In S
ystem
s prog
ramme-
roco
ntroll
ers S
tarter
Kits
Embe
-
ards
for
5̀1, A
VR, ST,
PIC m
ic-
PCB desig
ning E
valua
tion B
o-
oller
s Micr
opro
ceso
r sys
tems,
rs for
AVR, P
IC, S
T micr
ocon
trl-
dded
Web
Ser
wers P
rotot
yping
mers f
or AVR, P
IC, S
T micr
oco-
High S
peed
In S
ystem
prog
ram-
contr
ollers
, ethe
rnet
contr
oller
s,
Board
s Mini
module
s for
micr
o-
co
ntroll
ers M
icrop
roce
sor
Boa
rds
nin
g Eva
luatio
n
Sys
tems,
PCB Des
ig-
R
Many ideas one solution
EVBavr02 evaluation board for AVR microcontrollers
ATtiny2313 i AT90S1200/2313
User`s manual
REV 1.0
2
1. Introduction
EVBavr02 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) 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 EVBavr02.
3
2. Board layout.
1. Prototype area. 2. Additional components connector. 3. LED s̀ and micro-switches 4. Potentiometr 5. RESET switch 6. Accumulator 3V6. 7. Speaker 8. Programmer header. 9. Power ON/OFF switch. 10. Input power jack (AC/DC). 11. Relay header. 12. 1-wire port. 13. RS 232 port 14. Dual header – port A, port B. 15. Real Time Clock DS1307. 16. LM317 voltage regulator. 17. LCD display (optional). 18. 7-segment LED.
4
3. Supported processors
AT90S1200 AT90S2313 ATtiny2313/V
FLASH 1k 2k 2k
SRAM - 128b 128b
EEPROM 64b 128b 128b
Pheripherals
• 8-bit Timer/Counter,
• Analog comparator,
• SPI, • Programmable
timer Watchdog with integrated oscillator.
• 8-bit Timer/Counter,
• 16-bit Timer/Counter,
• Analog komparator,
• Programmable timer Watchdog,
• SPI, • Full Duplex
UART
• 8-bit Tirem/Counter, • 16-bit licznik, • Analog komparator • programmable
Watchdog, • SPI, • USI • Full Duplex UART
Supply voltage 2.7-6.0V ver.4
4.0-6.0V ver.12
2.7-6.0V ver.4
4.0-6.0V ver.10
1.8 - 5.5V (ATtiny2313V)
2.7 - 5.5V (ATtiny2313)
Clock frequency 0-4 MHz ver.4
0-12 MHz ver.12
0-4 MHz ver.4
0-10 MHz ver.10
ATtiny2313V:
0 - 4 MHz @ 1.8 - 5.5V,
0 - 10 MHz @ 2.7 - 5.5V
ATtiny2313:
0 - 10 MHz @ 2.7 - 5.5V, 0 - 20 MHz @ 4.5 - 5.5V
Temperature range -40° ÷ + 85°C
Cases 20-pin PDIP, SOI, SSOP
20-pin PDIP i SOIC 20-pin PDIP i SOIC
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 VTG becomes 3.3 VDC. The SUPPLY header allows for direct access to the power jack input. Placing a jumper bypasses the bridge and voltage regulator.
5
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 one potentiometer, allowing for simulation of the analog circuit outputs. The potentiometer enables the adjustmet of voltage in the range 0-VTG. The potentiometer output is accessible on ADJ pin of the MISC connector.
7
Figure 5. Potentiometer
5.6.Siedmiosegmentowe wy�wietlacze LED 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.
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. 1-WIRE Interface. There is a 1-wire connector on the board, which allow to connect i.e. DS1820 thermometer. In this way we can measure temperature. 5.9. 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.
8
5.10. 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:
• 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.11. 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.12. 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). 6.Header and connectors
6.1.Procesor and pheripherals connectors
Procesor 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 PB0...PB7 – procesor port B PD0...PD6 – procesor port D
Figure 7. Procesor connector
7-segment LED pins A0...A3 – anodes supply A,B,C,D,E,F,DP – segments supply (description on the board)
Figure 8.7-segment LED connector
9
RS232 pins RxD, TPD – RS232 signals
Figure 9. RS232 connector
Real Time Clock pins VBAT – accumulator FT – real time clock operation correction line SDA – I2C real time clock interface data line SCL – I2C real time clock interface clock line
Figure 10. RTC connector
MISC pins
SPK – speaker ADJ – potentiometer REL – relay control pin WIRE – 1-WIRE signal
Figure 11. MISC connector
LED diodes pins LD0...7 – diodes Switches pins SW0...7 – micro-switches
Figure 12.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 13. LCD connector
10
6.3.Relay connector
NO – normally open NC – normally closed CON – common
Figure 14. 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 is lighting. PB5 – programator s̀ output data line MOSI
Figure 15. ISP programmer`s connector
7. 7. Jumpers, supply LED and reset.
Jumper name Function
Jumper SUPPLY shorted regulated voltage 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 S1 shorted causes that all board is supplied from accumulator 3V6 (except processor).
Jumper S2 when is closed, the processor is supplied from accumulator.
ISP LED is lighting during the prorammator work.
11
POWER led power LED indicator.
RESET pressing this button causes hardware reset.
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.
9. Available versions. The set EVBavr02 is sold in three versions: Basic, Standard and Advance. Custom orders are also available. The set System EVBavr02 Basic includes:
• EVBavr02 board, which includes: processor, all connectors, four 7-segment LEDs, diodes, switches, transmitter,relay, buzzer.
• Cables to connect peripheral devices • CD-ROM with manuals and software
The set System EVBavr02 Standard includes:
• EVBavr02 board, which includes: processor, all connectors, four 7-segment LEDs,diodes, switches, transmitter, relay, buzzer, potentiometer, DS1820 thermometer, RTC with 3.6V accumulator.
• Cables to connect peripheral devices • CD-ROM with manuals and software
The set System EVBavr02 Advance includes:
• EVBavr02 board, which includes: processor, all connectors, four 7-segment LEDs,diodes, switches, transmitter, relay, buzzer, potentiometer, DS1820 thermometer, RTC with 3.6V accumulator, LCD 2x16.
• Cables to connect peripheral devices • CD-ROM with manuals and software
12
10. Schematic
RESET1
XTAL24
XTAL15
GND10
VCC 20
PD02
PD13
PD2/INT06
PD37
PD4/T08
PD59
PD6 11PB0/AIN0 12PB1/AIN1 13PB2 14PB3 15PB4 16PB5/MOSI 17PB6/MISO 18PB7/SCK 19
U1
AT90S1200/2313/ATtiny2313
Vproc
PB3
PB0
PB2
PB4
PB1
RESET
PD6
PD2
PD5
PD3PD4
PD0PD1 PB6
PB5
PB7
D2LED
D3LED
R91k
R101k
VTGVTG
D4LED
R111k
VTG
D5LED
R121k
VTG
L0
L1
L2
L3
D6LED
L0
D7LED
L1
R131k
L2
R141k
L3
VTG
1 23 45 67 8
JP2
LED
VTG
L7
D8LED
L6
R151k
L5
VTG
L4
D9LED
R161k
RESET
VTG
RESETSW-PB
L4
GND
L5
C1100n
L6
L7
GND
GND
VTG
R2
4k7SPK
Q1BC 557
SPK
R4ADJ
GND
VTG
AD
J1
OUT2 IN 3
REG1LM317
R171k3
R83k9
+ C5100u
+ C6470u/16V
GNDGND
C2100n
SWH_2
3V3
SWH_1
SUPPLY
GND
GNDSW10
SW SPST
GND
123
JP_S1VCC_IN
R71k
VTG
GND
C3100n
GND 4
1
3
2
B1
BRIDGE1
+
C9330n
+C12330n
+
C13330n
+
C10330n
+
C11100n
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
JP15
RS 232C
GND
VTG
GND
GND
TxDRxD
12
JP1
RS232
RxDTxD
VTG
GND
R3
4k7REL1
RE
L2
RE
L3
REL4
Q2BC 857
RL1RELAY
D1
ADJSP K REL1
1 23 45 67 89 10
JP6
ISP
PB5
RESET
PB7
PB6
GND
SW1SW-PB
SW2SW-PB
SW0SW-PB
R2410k
R2310k
R2510k
VTG VTG VTG
GND GND GND
SW3SW-PB
R2610k
VTG
GND
SW0
SW1
SW2
SW3
1 23 45 67 89 1011 1213 1415 1617 1819 20
JP8
PROC
RESETPD0PD1
XTAL1PD2PD3PD4PD5
VprocPB7PB6PB5PB4PB3PB2PB1PB0PD6
D714 D613 D512 D411 D310 D29 D18 D07 E6 R/W5 R/S4 KONTR3 Vcc2 GND1
16 15
JP4
LCD 2X16
GNDVTG
GND
(optional)
R471k
GND
VTG
Vss4 Vbat3 OSCO2 OSCI1 Vcc 8
FT/OUT 7
SCL 6
SDA 5
U2
DS1307
Y132.768kHz
GND
R194.7k
R204.7k
R214.7k
VTG
BT1AKU3V6
FTSCLSDA
GND
VTG
C4100n
GND
1 23 4
JP14
RTC
SDAFT
SCL
R6510
VTG
C822p
C722p
GNDGND
JP10 JP11
X18MHz
XTAL1XTAL2
XTAL2XTAL1
R14k7
VTG
R28100R
R272k2
VTG
GND
123
JP9
1-WIRE
VTG
WIR
E
WIRE
XTAL2
D11ISP
D10POWER
REL3REL4
REL2 123
JP21
REL1
SW4SW-PB
R3010k
VTG
GND
SW4
SW5SW-PB
R3110k
VTG
GND
SW5
SW6SW-PB
R3210k
VTG
GND
SW6
SW7SW-PB
R3310k
VTG
GND
SW7
SW3SW1
SW2SW0 1 2
3 45 67 8
JP7
SW
SW7SW6SW5SW4
Vpr
oc VTG
R22
75
D13
SM5819
D12
SM5819
Load
VTG
11
22
44
55
66
77
99
1010
33
88
LED_7SEG
D17LED3
11
22
44
55
66
77
99
1010
33
88
LED_7SEG
D16LED2
11
22
44
55
66
77
99
1010
33
88
LED_7SEG
D15LED1
11
22
44
55
66
77
99
1010
33
88
LED_7SEG
D14LED0
VTG
Q6BC 327
VTG
Q5BC 327
VTG
Q4BC 327
VTG
Q3BC 327
R42
2k2
R36
2k2
R35
2k2
R34
2k2
A0
A1
A2
A3
GFABEDC
DP
GFABEDC
DP
GFABEDC
DP
GFABEDC
DP
A0A2
A1A3
G F
A B
E D
C DP
R37
330
R38
330
R39
330
R40
330
R41
330
R43
330
R44
330
R45
330
R183V3POT
GND
VTG
Q7BC 817
GND
R46
1k
1 23 45 67 89 10
JP5
LCD
R57k5
C16100n
VTG
1 23 45 67 89 1011 12
JP13
7SEG
R49360
1 23 4
JP3
MISC
VB
AT
VBAT
VTG
Vproc
S1SW SPDT
SWH_3JRST
R53 100
R50 100
R51 100
R52 100
R54
100
R55
100
R56
100
R57
100
R58
100
R59
100
R61
100
R60
100
GND
GND
C14100n
GND
R29
100 R6210k
VTG
R63
10kVTG
LEDS
SWITCH
1 WIRE
OSCILATOR
MCU RESET SPEAKER RES.ADJ. RELAY LCD CONNECTORS
POWER LED7-SEGMENT LED
RTC RS232
REGLM317
VTG
SWH_4
GND
SWH_5
VTGGND GND VTG VTG
ADJ
1 of 1 1.00
http://www.propox.comemail: [email protected]
Size: File : Rev:
Date : 06-01-2006
Title: EVBAVR-02-XXX (AVR Evaluation Borard)