AVT 3500 - Serwis AVT

Transcription

AVT 3500 - Serwis AVT
BASCOM AVR
demonstration board
AVT
3500
The kit is ideal for
anyone starting
"experimenting" with
microcontrollers and for
participants of the
BASCOM programming
course.
Recommendations: the
kit is recommended to
those wanting to learn to
program AVR
microcontrollers.
Q2 to Q6 additional outputs
LCD display socket
LED displays
Drivers
LCD contrast
potentiometer
Power supply
terminal block
J3 wire
link
D port
(D2...D6)
J1, J2
wire jumpers
LED
check
Programming
cable
connector
Microcontroller
Jumpers
J4, J5
Emergency
reset pins
Voltage
reference
Quartz
resonator
ADC and DAC
converters
2
I C terminal
block
RS232
connector
D port
(D0...D1)
VREF - voltage
reference output
The test board allows the user to assemble and test a series of devices using the AVR
AT90(L)S2313 (ATMEGA2313) microcontroller. Basically, all the necessary peripheral
components are included in the kit for example, the LED displays, the LCD alphanumeric display or
the ADC and DAC converters. All the connections are made by means of cables soldered to pads
with gold pins or wire jumpers are used for this purpose (the 90S2313 microcontroller).
Electrical characteristics
• microcontroller 90S2313
• circuit-assembling by (with the test firmware already downloaded) connecting the existing
components to solder pads
• results displayed: LED diodes, LCD 2*16 alphanumeric display
• RS 232 interface buffer, ADC and DAC converter, voltage reference
• programming cable enclosed
2
• I C bus output
• PCB dimensions: 105x78mm
• 5V DC power supply
Description
The schematic of the demonstration board is shown in figure 1. The assembled prototype
accompanied by a description of circuits is shown in the photo. The circuit is intended for
experiments and will allow the user to make a lot of intriguing devices. The U1 AVR AT90(L)S2313
microcontroller is the "heart" of the circuit. The microcontroller is driven by the X1 (4 MHz) quartz
AVT3500 BASCOM AVR demonstration board
1
oscillator and the 33pF C3 and C4 capacitors. The circuit is powered by the 4,5 V…5,5V voltage
range. The voltage is delivered to the "POWER" labelled terminal block connector. In case of
reversely connecting the supply voltage leading in turn, to incorrect polarity, the D1 parallel
connected diode (non-typical) is used to protect the circuit from failure. Actually, it is the 3-ampere
Schottky diode. On reverse polarity, it reduces the supply voltage to a safe value of about -0,5V. The
Figure 1. Schematic diagram
2
AVT3500 BASCOM AVR demonstration board
6,2V Zener diode or similar may be used. Typically, the device is powered by the 4,5V or 5V plugtype mains power supply. The green light displayed by the D2 diode shows the circuit is turned on
and the polarity is correct. The C1 and C2 capacitors filter the supply voltage. The 90S2313
microcontroller is equipped with 15 universal IO pins that can be put to various uses. This is
possible thanks to the additional pads marked as B0…B7, D0…D6 and 1…3. Actually, they
constitute two rows of gold pin connectors and J6 connector pins mounted on pads I1…I3 on the
PCB. The microcontroller can control either the 4-digit LED display or the typical LCD
alphanumeric display with a built-in controller. The LCD display is connected to several B port
lines. The PR 1 potentiometer helps to set optimal contrast. As the PB1 and PB3 lines can operate in
different modes the J3 jumper is included in the kit to simplify all the necessary connections made
by the user. The LED display contains four multiplexed segments with a common anode. The LED
segment cathodes are driven by port B. The a…g segments are driven by the B0…B6 port lines
while the DP segment is driven by the PB7 line. The common anodes of the displays are connected
to the positive rail supply by means of transistors T2…T5 (standard or PNP Darlington transistors).
To switch on one of the T1…T5 transistors, low voltage level (commonly referred to as logic zero)
has to occur at one of the PD2…PD6 pins. In spite of driving the displays, the T2…T5 transistors
including the T1 transistor too can be used for other purposes. This is possible thanks to the Q1…Q5
pads used as the terminal block connectors. Additionally, the PD5 and PD6 lines can be used for
communication with the I2C bus devices. Four terminals make it possible to connect any number of
devices controlled by the I2C bus to the PCB. The J1 and J2 wire jumpers make it possible to
disconnect the T5, T6 transistors and theW2 display while the PD5 and PD6 lines are used for other
purposes. Short circuits occurring at points B-C will connect the pull-up resistors which cooperate
with the I2C bus. There is only one IC on the PCB using the I2C communication - the PCF8591. It
contains the 4-channel 8-bit ADC converter and the 8-bit DAC converter. The U3 IC (TL431) is a
voltage reference source to the converters. Thanks to the PR2 precision potentiometer the voltage
reference can be set at exactly 2,56V. Using the 8-bit ADC converter, the LSB value of 10mV can be
obtained. The I0…I3 terminal blocks will allow the user to deliver voltage to the 4 ADC converter
inputs. The OUT pin is actually the DAC converter output. Three additional connection (J6) points
are included in the kit too. They make it possible to use the I1, I2 and I3 pins for other purposes. The
PD.0 and PD1 microcontroller inputs cooperate with the S2 and S1 pushbuttons and they are
available at a terminal block enabling the user to put them to various uses. Additionally, they can be
connected to the T1 and T7 transistor inverters by means of the J4 and J5 jumpers thus, leading to the
simplest RS232 solution. The RS232 3-wire cable is to be connected to the GND, RxD and TxD
pins. If need be, the microcontroller can be easily reset using the additional R and G pads.
The R5…R18 resistors connected in series with the microcontroller programming lines are
intended for safety purposes. They are not indispensable so wire jumpers can be used instead, on
condition that the voltage powering the module does not drop below 4,5V while programming the
microcontroller. At lower supply voltages, there is the possibility of current sinking from the port
lines to the PCB positive supply rail via the internal (CMOS) microcontroller circuits (inputs
PB.5…PB.7 except the RESET input due to its different shape). Five wires of the programming
cable are connected to the CLK, MISO, MOSI, RST and GND solder pads. The goldpin angle type
block is soldered to one end of the programming cable from the PCB side while the DB25F male
connector cooperating with the PC printer port (LPT1, Centronics) is soldered to the other end of the
programming cable. In case of reversely plugging in the programming connector, the non-typical
use of the 8-pin programming port prevents failure. In practice the programming cable consists of
six wires. The sixth wire is used when programming the universal module processor. Should this be
the case, the power energy will sink from the PC.
AVT3500 BASCOM AVR demonstration board
3
Assembly and test
Assembling the 2-side PCB (see figure 2) is easy and it should not cause trouble for even
inexperienced users. There are no wire jumpers to be found on the PCB, just the components to
be soldered in. Directly soldering the W1…W3 displays and the U1 and U2 integrated
circuits to the PCB regardless of the sockets, is a serious error making it impossible to use
the PCB to its full potential. According to the schematic diagram all the listed components
should be soldered in successively. The best way to do this is to start with the smallest (resistors)
and to end off with the largest devices. Both the ICs and the displays are last to be inserted in the
sockets. All the other components should have the priority. The included photos showing the
model assembly of goldpins and terminal connectors may come in useful. It is advised to insert
the LED W2 display in its place on the left first. While inserting the displays, it should be notified
that the end pins of the 40-pin socket from the T1…T5 transistor side are not to be used. Nor are
the two middle socket pins (see photo1). If incorrectly inserted the displays do not operate.
Photo 1
The J1…J3 PCB switches should be set appropriately. A-B J1, J2 and 2-3 of the J3 switch should
be covered with jumpers. The J4 and J5 jumpers should be left open. Once properly assembled,
the circuit will work instantly. The only slight adjustment to be made is setting the exact 2,56V
voltage at the VREF point on both the schematic and the PCB. In the basic version, the block type
connector is included. Normally, the LCD display is connected to it. To connect the LCD display,
the LED W1 and W2 should be disconnected from their sockets. Prior to this, a row of goldpin
connectors (male part down as shown in photo 3) should be soldered in the LCD display pads on
the PCB. Now the display, being fully operational, can be inserted in the test board. The test
board should be powered from the mains plug-type power supply with the 4.5…5V voltage and
the output current not lower than 200mA. More experienced users can do without it by powering
the test board with the 5V voltage sinking from the PC joystick port. The sixth wire of the
programming cable is used then. The mains plug-type power supply must be disconnected. The
+5V voltage occurs at pins 1 and 9 as well as at joystick port pins 8 and 15. The PC Game Port
connector with the marked 5V voltage pins is shown in photo 1.
4
AVT3500 BASCOM AVR demonstration board
Figure 2. Components layout
Photo 2
AVT3500 BASCOM AVR demonstration board
5
Photo 3 The view of the display
Photo 4 PC GAME PORT connector
with the marked +5V voltage pins.
Attention:
Due to the possibility of
damaging the PC printer port by
electrostatic discharge, the practices of
connecting the test board to the computer and
reconnecting the printer at a later time can be
carried out only when both the computer and
the test board power supply are turned off.
!
Figure 2 The schematic of the programming cable
The kit can be checked whether it works properly just after assembly without having to connect the
test board to the computer. The microprocessor which is included in the kit contains a test program.
After delivering (4,5…5,5V) voltage to the POWER connector the D2 LED is turned on and the LED
test sequence is displayed. Once S2 is pressed, the module is switched over to the fast reactions meter
mode. The meter works as follows: After the display is turned on the S1 pushbutton should be
pressed as quickly as possible. Soon after that, delay time given in a hundredth fraction of a second is
displayed. Additionally, a piezo buzzer can be connected to Q0 and GND not only to check how fast
the user reacts to a visual signal but to an audible signal as well (the satisfactory results are below
twenty hundredths of a second).
6
AVT3500 BASCOM AVR demonstration board
Programming
To be able to use the test board the microcontroller should be programmed first using, for example,
the free of charge BASCOM AVR DEMO program. The user should not be misled by the trade name
of the program into believing it is only a demonstration version. Conversely, it is fully functional
except that the output machine code is limited to 2kB. The latest version of the program can be
downloaded from the Internet (www.mcselec.com/download/avr/). Loading the program should
cause no trouble at all. Only those not having their computers sufficiently modernized might need to
load the Windows system library version which is quite modern comctl32.dll (use the 40comupd.exe
from the Microsoft or MCS websites). Any kind of printer must be installed in the computer
Windows system too. To make the program fully functional and to adjust it to our needs a proper
programmer type should be selected (Sample programmer).
To do this, after clicking "Options", "Programmer" the user's window should be exactly like the
screen below. That is the recommended configuration. Now the test board can be connected to the
computer printer port by means of the programming cable.
!
Attention!
Due to high risk of failure caused by electrostatic discharge all the connections should be
made while both the computer and the test board power supply are turned off. Prior to
this, it is worth while freeing the body of electric charge by touching the earth for
example, a drain. If the test board is electrically fed from the power supply the sixth wire
of the programming cable must not be connected to the computer.
AVT3500 BASCOM AVR demonstration board
7
Component list
In the order of soldering:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
R1:
680W
R2…R9:
82W
Programming cable component list:
R10…R14, R19…R23: 3,3kW
DB25M male connector
R15…R18, R24:
330W
DB25 enclosure
R25, R26, R31, R32: 10kW
6-wire
1,5mm cable
R27…R30:
1MW
The disassembled DB25 connector goldPR1:
miniature 10kW PR
platted pin 8-pin angle-type goldpin block
PR2
precision 1kW PR
connector
C2:
ceramic 100nF
C3, C4:
33pF
C1:
220µF/16V
D1:
1N5822
D2:
green 3mm LED
T1…T6:
BC516
T7:
BC548
U1 AT90S2313 20-pin socket
U2 PCF8591 16-pin socket
U3:
TL431
W1 and W2 display 40-pin socket
5 jumper caps
45-pin male type goldpin block
32-pin female type goldpin block
K1, K4…K9:
2-pin terminal block
K2, K10…K12:
3-pin terminal block
S1, S2:
2…4mm TACT switch
W3:
16 character LCD display module
X1:
2-row 4MHz quartz resonator
insert U1 90S2313 in the socket
insert U2 PCF8591 in the socket
insert the W1, W2 DA56-11EWA displays in the socket.
12V piezo buzzer with a built-in oscillator.
The kit was made on the basis of a project bearing the same trade name published in "Elektronika dla Wszystkich" 12/02.
www.elportal.pl
The sale offer of our "do-it-yourself" sets is available on our website www.sklep.avt.pl
Producer:
AVT-Korporacja, Sp. z o.o.
Leszczynowa 11
03-197 Warsaw
fax: (+48 22) 257-84-55
phone.: (+48 22) 257-84-50 Poland
8
Technical Assistance Dept.
Phone: (48 22) 257-84-58
serwis@avt.pl
AVT3500 BASCOM AVR demonstration board