e01c054.PDF

(386 KB) Pobierz
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
MICRO CONTROLLER
Educational hardware and software
89S8252 Flash
Microcontroller Board
platform for the Microcontroller Basics course
Design by B. Kainka
A microcontroller board that serves as the foundation for a programming
course must be easy to use while still having all the ingredients of a mod-
ern microcontroller with its peripherals. This makes such a board inter-
esting for old microcontroller hands as well!
Anyone who wants to convert his
own ideas into circuitry will usually
achieve the desired result more
quickly with a microcontroller than
with ‘conventional’ electronics. How-
ever, in many cases the program-
ming is relatively laborious. Conse-
quently, Elektor Electronics have
developed the new Flash Board. The
flash program memory and a well-
considered system design ensure
easy and fast programming.
Our criteria for a new microcon-
troller board were based on the fol-
lowing objectives: the circuit to be
developed should meet the needs of
beginners as well as experienced
users; the system should be designed
from the start to handle various pro-
gramming languages, including
assembler, BASIC and C; and further-
more, the system should be easily
extendible and easy to program. In
addition, a program that has been
transferred to the board should be
retained when power is switched off,
in order to avoid the tedious process
of (re)programming EPROMs. This
means that the board should also
serve as a device programmer.
54
Elektor Electronics
12/2001
855734305.900.png 855734305.1011.png 855734305.1122.png 855734305.1233.png
MICRO CONTROLLER
There are many different types of
microcontrollers with internal EEP-
ROM or flash memories, which in
principle promise easy programma-
bility. What should we choose — a
PIC, a 68xxx-series microcontroller,
an AVR or an extended 8051 device?
The difficult question of which type
of microcontroller to use was decided
in favour of the 8051 family. There
were good reasons for this choice.
Most other types of microcontroller
are only made by a single company,
which in the worst case can make
them difficult to obtain. The 8051
family, by contrast, can justifiably be
regarded as an industry standard,
since many different companies pro-
duce derivatives of the standard
device originally developed by Intel.
This means that if we have devel-
oped some kind of device and then at
some point company A can no longer
supply the part, we can easily switch
to a microcontroller from company B
or company C. Furthermore, there is
an abundance of software for the
8051 family and a wealth of available
literature. Consequently, if we choose
the 8051 standard there is not very
much that can go wrong. This is still
true, even though new concepts
have since been developed.
The Atmel AT89S8252 device that
is used here (see Figure 1 ) corre-
sponds to an 8052 in the essential
areas. This means, for example, that
the well-known BASIC-52 interpreter
can be run on this IC without any
problems. There are also a few addi-
tional features to gladden the devel-
oper’s heart. For instance, there is an
internal watchdog and a data EEP-
ROM with a capacity of 2 kB. How-
ever, the decisive factor is the 8-kB
program memory using flash tech-
nology. The programming circuitry
for this memory is also contained in
the IC. It is not even necessary to
use a special programming voltage;
the normal 5-V supply voltage is suf-
ficient. Programming takes place
serially and synchronously via an SPI
interface. Only a few leads are
needed to load a program into the
internal flash memory area.
basic microcontroller. In addition,
there is a prototyping area on the
board with 130 solder pads. Other
extensions, ranging from simple
motor drivers or sensors to complete
interfaces, can thus be easily fitted
onto the board. The full address and
data bus and all of the ports are
accessible via pin headers. Conse-
quently, the system can be extended
in practically any desired manner.
The printed circuit board has two
DB9 sockets. One of these is used for
communications via the serial inter-
face. Like every other microcontroller
in the 8051 family, the 89S8252 has
an internal UART that can be con-
nected via a MAX232 interface driver
IC to a PC COM port (for example).
What the PC does with this link –
transmitting control commands to
the microcontroller, querying mea-
surement data or communicating
with the internal Basic interpreter –
depends entirely on the user and the
89S8252 Flash
Micro board
specifications
32 kB RAM
8 kB Flash program memory
2 kB EEPROM data memory
internal watchdog timer
serial interface
programming interface
supply voltage: 9–12V, on-board 5-V volt-
age regulator
LCD interface
all bus lines brought out to pin headers
all port leads brought out to pin headers
prototyping area for extension circuits
software that is employed.
The second DB9 socket (COM2) is used
exclusively for programming the microcon-
troller. A PC connected to this interface can
P0.0 - P0.7
P2.0 - P2.7
V CC
PORT 0 DRIVERS
PORT 2 DRIVERS
GND
RAM ADDR.
REGISTER
PORT 0
LATCH
PORT 2
LATCH
RAM
FLASH
EEPROM
PROGRAM
ADDRESS
REGISTER
B
REGISTER
STACK
POINTER
ACC
BUFFER
TMP2
TMP1
PC
INCREMENTER
ALU
INTERRUPT, SERIAL PORT,
AND TIMER BLOCKS
PROGRAM
COUNTER
PSW
PSEN
A LE /PROG
EA / V PP
RST
TIMING
AND
CONTROL
INSTRUCTION
REGISTER
DPTR
WATCH
DOG
PORT 3
LATCH
PORT 1
LATCH
SPI
PORT
PROGRAM
LOGIC
OSC
PORT 3 DRIVERS
PORT 1 DRIVERS
P3.0 - P3.7
P1.0 - P1.7
010208 - 12
The board
The Flash Board adds 32 kB of RAM,
an LCD interface, a serial interface
and a programming interface to the
Figure 1. Block diagram of the AT89S8252 microcontroller.
12/2001
Elektor Electronics
55
855734305.001.png 855734305.111.png 855734305.222.png 855734305.333.png 855734305.396.png 855734305.407.png 855734305.418.png 855734305.428.png 855734305.439.png 855734305.450.png 855734305.461.png 855734305.472.png 855734305.483.png 855734305.494.png 855734305.505.png 855734305.516.png 855734305.527.png 855734305.538.png 855734305.549.png 855734305.560.png 855734305.571.png 855734305.582.png 855734305.593.png 855734305.604.png 855734305.615.png 855734305.626.png 855734305.637.png 855734305.648.png 855734305.659.png 855734305.670.png 855734305.681.png 855734305.692.png 855734305.703.png 855734305.714.png 855734305.725.png 855734305.736.png 855734305.747.png 855734305.758.png 855734305.768.png 855734305.779.png 855734305.790.png 855734305.801.png 855734305.812.png 855734305.823.png 855734305.834.png 855734305.845.png 855734305.856.png 855734305.867.png 855734305.878.png 855734305.889.png 855734305.901.png 855734305.912.png 855734305.923.png 855734305.934.png 855734305.945.png 855734305.956.png 855734305.967.png 855734305.978.png 855734305.989.png 855734305.1000.png 855734305.1012.png 855734305.1023.png 855734305.1034.png 855734305.1045.png 855734305.1056.png 855734305.1067.png 855734305.1078.png 855734305.1089.png 855734305.1100.png 855734305.1111.png 855734305.1123.png 855734305.1134.png 855734305.1145.png 855734305.1156.png 855734305.1167.png 855734305.1178.png 855734305.1189.png 855734305.1200.png 855734305.1211.png 855734305.1222.png 855734305.1234.png 855734305.1245.png 855734305.1256.png 855734305.1267.png 855734305.1278.png 855734305.1289.png 855734305.1300.png 855734305.1311.png 855734305.1322.png 855734305.1333.png 855734305.002.png 855734305.013.png 855734305.024.png 855734305.035.png 855734305.046.png 855734305.057.png 855734305.068.png 855734305.078.png 855734305.089.png 855734305.100.png 855734305.112.png 855734305.123.png 855734305.134.png 855734305.145.png 855734305.156.png 855734305.167.png 855734305.178.png 855734305.189.png 855734305.200.png 855734305.211.png 855734305.223.png 855734305.234.png 855734305.245.png 855734305.256.png 855734305.267.png 855734305.278.png 855734305.289.png 855734305.300.png 855734305.311.png 855734305.322.png 855734305.334.png 855734305.345.png 855734305.356.png 855734305.367.png 855734305.378.png 855734305.389.png 855734305.392.png 855734305.393.png 855734305.394.png 855734305.395.png 855734305.397.png 855734305.398.png 855734305.399.png 855734305.400.png 855734305.401.png 855734305.402.png 855734305.403.png 855734305.404.png 855734305.405.png 855734305.406.png 855734305.408.png 855734305.409.png 855734305.410.png 855734305.411.png 855734305.412.png 855734305.413.png 855734305.414.png 855734305.415.png 855734305.416.png 855734305.417.png 855734305.419.png 855734305.420.png 855734305.421.png 855734305.422.png
 
MICRO CONTROLLER
+5V
+5V
+12V
IC7
K9
C15
+5V
7 805
+5V
D4
C4
C5
100n
RESET
(PROG)
S1
1N4001
10
µ
63V
100n
R3
40
28
C12
C13
C14
100n
IC3
IC2. A
31
39
38
37
36
35
34
33
32
AD0
AD1
AD2
AD3
AD4
AD5
AD6
AD7
AD0
AD1
AD2
AD3
AD4
AD5
AD6
AD7
2
3
4
19
A0
A1
A2
A3
A4
A5
A6
A7
A0
A1
A2
A3
A4
A5
A6
A7
A8
A9
A10
A11
A12
A13
A14
10
1000
µ
100
µ
EA/VP
P0.0
P0.1
P0.2
P0.3
P0.4
P0.5
P0.6
P0.7
1D
A0
A1
A2
A3
A4
A5
A6
A7
16V
10V
2
3
9
18
9
8
7
6
5
4
3
RESET
R4
17
EN
P3.0
P3.1
P3.2
P3.3
P3.4
P3.5
P3.6
P3.7
10
5
6
16
11
AD0
AD1
AD2
AD3
AD4
AD5
AD6
AD7
1
RXD
D0
IC4
11
15
12
TXD
D1
R1
27k
12
13
14
7
8
9
14
13
INT0
INT1
D2
13
15
RAM
D3
R6
D1
IC1
12
16
T0
D4
15
25
17
AT89S8252
T1
A8
D5
K2
DB9
I C2 .C
62256
16
21
22
23
24
25
26
27
28
A8
A9
A10
A11
A12
A13
A14
A15
24
18
4V7
WR
P2.0
P2.1
P2.2
P2.3
P2.4
P2.5
P2.6
P2.7
A9
D6
8
9
17
ALE
11
1
21
23
19
RD
C1
EN
A10
A11
A12
D7
1
EN
6
DSR
P1.0
P1.1
P1.2
P1.3
P1.4
P1.5
P1.6
P1.7
1
2
3
4
5
6
7
8
74HCT573
2
10
P1.0
2
20
R2
27k
26
P1.1
A13
A14
CS
7
RTS
RXD
CTS
DTR
IC2. D
1
P1.2
P1.3
P1.4
P1.5
P1.6
P1.7
3
R7
D2
8
12
11
P1.7
OE
WE
SCK
22
14
27
4
EN
4V7
9
13
WR
30
ALE/P
IC5.A
&
IC5.B
&
5
A15
29
2
1
4
5
PSEN
+5V
3
6
C8
10 µ
COM2
X 1
X 2
RD
20
19
18
X1
IC2.B
EN
63V
4
2
K1
DB9
V+
1
16
5
6
P1.5
C2
C1
C1+
C10
MOSI
1
IC6
22p
22p
3
K3
K8
10 µ
63V
C1–
6
14
11
MISO
P1.6
P3.1
P3.0
11.059MHz
RS1OUT
RS2OUT
T1IN
T2IN
2
AD7
14
13
AD6
A0
A1
A2
A3
A4
A5
A6
A7
34
33
AD0
AD1
AD2
AD3
AD4
AD5
AD6
+5V
TXD
RXD
7
10
7
AD5
12
11
AD4
32
31
13
12
R1IN
R1OUT
R2OUT
3
AD3
10
9
AD2
30
29
8
9
R2IN
8
AD1
8
7
AD0
28
27
4
C7
C2+
4
C11
LCDE
R/S
6
5
R/W
A0
26
25
MAX232
9
A1
4
3
24
23
10
µ
63V
5
15
K6
10
µ
63V
C2–
5
P1.0
P1.1
P1.2
P1.3
P1.4
P1.5
P1.6
P1.7
P3.0
P3.1
P3.2
P3.3
P3.4
P3.5
P3.6
P3.7
2
1
22
21
V-
K4
20
19
AD7
K5
+5V
6
C9
18
17
COM1
+5V
A8
A9
A10
A11
A12
A13
A14
A15
16
15
RD
A15
D3
BAT85
10 µ
63V
R5
14
13
WR
12
11
PSEN
+5V
10
9
ALE
P1
+5V
C6
8
7
8
11
K7
6
5
14
14
C3
IC5.C
IC2 = 74HC126
IC5 = 74HCT00
IC5.D
&
10k
4
3
IC2
IC5
&
100n
2
1
7
100n
7
9 0
12 13
010208 - 11
Figure 2. A classical, well-configured microcontroller system.
reset the microcontroller, switch it to pro-
gramming mode, download a program and
start the program. The complete board can
thus practically be used under remote control.
It could be located in an inaccessible place,
for example, and still be easily reprogrammed.
The first DB9 socket (COM1, K1) is for con-
nection to a serial interface port of a PC. On
the PC, the user writes and compiles his pro-
gram, transfers it to the microcontroller and
tests it on the Flash Board. Connector K1
only has to be used if the transferred pro-
gram needs to communicate with the PC.
Here there are two options: you can either
swap the interface cable to the other con-
nector or use two COM ports on the PC. This
is possible with many PCs if two COM ports
are present and the mouse uses a PS/2 con-
nection or works on the USB. Using two COM
interfaces in parallel often proves to be espe-
cially practical and convenient. Programming
and testing can be done interac-
tively if the necessary tools can be
used in parallel.
The circuit, which is shown in
schematic form in Figure 2, is largely
based on standard designs for 8051
systems. A 74HCT573 address latch
(IC3) provides the lower eight
address bits for the 32-KB RAM
(IC4). Since the /CS line of the RAM
is connected to address line A15,
this memory occupies only the range
0–7FFFh, leaving the upper range
(8000h and ab ove) free for exten-
sions. The WR line, which controls
write accesses, is driven directly by
the pro cess or. By contrast, the signal
for the OE line (for read accesses) is
generated as the logical AND of the
PSEN signal (for accessing program
memory) and the WR signal (for data
accesses), using two 74HCT00 gates
(IC5). 8051 microcontrollers normally
use common, parallel address ranges
for the program and data memories,
but this splitting has been abolished
here. Although in most cases the
microcontroller will use the internal
8-KB flash PROM as program mem-
ory and only store data in the RAM,
it is still possible to use program rou-
tines located in regions of the RAM
above 2000h. Since the same regions
can also be accessed as data
regions, it is possible to write self-
modifying programs, in which the
processor writes its own code in the
RAM and then executes it.
The internal EEPROM of the
microcontroller is actually a pure
data memory configured in parallel
with the external RAM. The EEP-
56
Elektor Electronics
12/2001
855734305.423.png 855734305.424.png 855734305.425.png 855734305.426.png 855734305.427.png 855734305.429.png 855734305.430.png 855734305.431.png 855734305.432.png 855734305.433.png 855734305.434.png 855734305.435.png 855734305.436.png 855734305.437.png 855734305.438.png 855734305.440.png 855734305.441.png 855734305.442.png 855734305.443.png 855734305.444.png 855734305.445.png 855734305.446.png 855734305.447.png 855734305.448.png 855734305.449.png 855734305.451.png 855734305.452.png 855734305.453.png 855734305.454.png 855734305.455.png 855734305.456.png 855734305.457.png 855734305.458.png 855734305.459.png 855734305.460.png 855734305.462.png 855734305.463.png 855734305.464.png 855734305.465.png 855734305.466.png 855734305.467.png 855734305.468.png 855734305.469.png 855734305.470.png 855734305.471.png 855734305.473.png 855734305.474.png 855734305.475.png 855734305.476.png 855734305.477.png 855734305.478.png 855734305.479.png 855734305.480.png 855734305.481.png 855734305.482.png 855734305.484.png 855734305.485.png 855734305.486.png 855734305.487.png 855734305.488.png 855734305.489.png 855734305.490.png 855734305.491.png 855734305.492.png 855734305.493.png 855734305.495.png 855734305.496.png 855734305.497.png 855734305.498.png 855734305.499.png 855734305.500.png 855734305.501.png 855734305.502.png 855734305.503.png 855734305.504.png 855734305.506.png 855734305.507.png 855734305.508.png 855734305.509.png 855734305.510.png 855734305.511.png 855734305.512.png 855734305.513.png 855734305.514.png 855734305.515.png 855734305.517.png 855734305.518.png 855734305.519.png 855734305.520.png 855734305.521.png 855734305.522.png 855734305.523.png 855734305.524.png 855734305.525.png 855734305.526.png 855734305.528.png 855734305.529.png 855734305.530.png 855734305.531.png 855734305.532.png 855734305.533.png 855734305.534.png 855734305.535.png 855734305.536.png 855734305.537.png 855734305.539.png 855734305.540.png 855734305.541.png 855734305.542.png 855734305.543.png 855734305.544.png 855734305.545.png 855734305.546.png 855734305.547.png 855734305.548.png 855734305.550.png 855734305.551.png 855734305.552.png 855734305.553.png 855734305.554.png 855734305.555.png 855734305.556.png 855734305.557.png 855734305.558.png 855734305.559.png 855734305.561.png 855734305.562.png 855734305.563.png 855734305.564.png 855734305.565.png 855734305.566.png 855734305.567.png 855734305.568.png 855734305.569.png 855734305.570.png 855734305.572.png 855734305.573.png 855734305.574.png 855734305.575.png 855734305.576.png 855734305.577.png 855734305.578.png 855734305.579.png 855734305.580.png 855734305.581.png 855734305.583.png 855734305.584.png 855734305.585.png 855734305.586.png 855734305.587.png 855734305.588.png 855734305.589.png 855734305.590.png 855734305.591.png 855734305.592.png 855734305.594.png 855734305.595.png 855734305.596.png 855734305.597.png 855734305.598.png 855734305.599.png 855734305.600.png 855734305.601.png 855734305.602.png 855734305.603.png 855734305.605.png 855734305.606.png 855734305.607.png 855734305.608.png 855734305.609.png 855734305.610.png 855734305.611.png 855734305.612.png 855734305.613.png 855734305.614.png 855734305.616.png 855734305.617.png 855734305.618.png 855734305.619.png 855734305.620.png 855734305.621.png 855734305.622.png 855734305.623.png 855734305.624.png 855734305.625.png 855734305.627.png 855734305.628.png 855734305.629.png 855734305.630.png 855734305.631.png 855734305.632.png 855734305.633.png 855734305.634.png 855734305.635.png 855734305.636.png 855734305.638.png 855734305.639.png 855734305.640.png 855734305.641.png 855734305.642.png 855734305.643.png 855734305.644.png 855734305.645.png 855734305.646.png 855734305.647.png 855734305.649.png 855734305.650.png 855734305.651.png 855734305.652.png 855734305.653.png 855734305.654.png 855734305.655.png 855734305.656.png 855734305.657.png 855734305.658.png 855734305.660.png 855734305.661.png 855734305.662.png 855734305.663.png 855734305.664.png 855734305.665.png 855734305.666.png 855734305.667.png 855734305.668.png 855734305.669.png 855734305.671.png 855734305.672.png 855734305.673.png 855734305.674.png 855734305.675.png 855734305.676.png 855734305.677.png 855734305.678.png 855734305.679.png 855734305.680.png 855734305.682.png 855734305.683.png 855734305.684.png 855734305.685.png 855734305.686.png 855734305.687.png 855734305.688.png 855734305.689.png 855734305.690.png 855734305.691.png 855734305.693.png 855734305.694.png 855734305.695.png 855734305.696.png 855734305.697.png 855734305.698.png 855734305.699.png 855734305.700.png 855734305.701.png 855734305.702.png 855734305.704.png 855734305.705.png 855734305.706.png 855734305.707.png 855734305.708.png 855734305.709.png 855734305.710.png 855734305.711.png 855734305.712.png 855734305.713.png 855734305.715.png 855734305.716.png 855734305.717.png 855734305.718.png 855734305.719.png 855734305.720.png 855734305.721.png 855734305.722.png 855734305.723.png 855734305.724.png 855734305.726.png 855734305.727.png 855734305.728.png 855734305.729.png 855734305.730.png 855734305.731.png 855734305.732.png 855734305.733.png 855734305.734.png 855734305.735.png 855734305.737.png 855734305.738.png 855734305.739.png 855734305.740.png 855734305.741.png 855734305.742.png 855734305.743.png 855734305.744.png 855734305.745.png 855734305.746.png 855734305.748.png 855734305.749.png 855734305.750.png 855734305.751.png 855734305.752.png 855734305.753.png 855734305.754.png 855734305.755.png 855734305.756.png 855734305.757.png 855734305.759.png 855734305.760.png 855734305.761.png 855734305.762.png 855734305.763.png
 
MICRO CONTROLLER
ROM must be activated by soft-
ware. Once this has been done, the
EEPROM can be used for non-
volatile data storage. In this case,
the lower 2 KB of the external RAM
are inactive.
The LC display is also connected
to the data bus and occupies a
region ab ove 8000 h. A NAND combi-
nation of RD and WR produces the
Enable signal for the display. A sim-
ple diode-logic circuit blocks this sig-
nal in the address range up to
7FFFh.
The display thus occupies the fol-
lowing addresses:
8000h: write command
8001h: read command
8002h: write data
8003h: read data
These regions are mirrored up to FFFFh, so
the region from F000h to F003h can also be
used.
As usual, the serial interface (consisting of
the TXD and RXD leads) is linked to the PC
connector via a MAX232 interface IC. No
handshaking is used. The internal intercon-
nections of the handshake lines accommo-
date the needs of certain terminal emulator
programs that expect to see signals indicat-
ing that the connected device is ready to
receive data.
Assembling the Flash Board is quite sim-
ple and should not take longer than an hour.
You should use good-quality sockets for all
ICs, which means that later you will have to
pay attention to the correct orientation of the
ICs (as with the polarisation of the elec-
trolytic capacitors and diodes). Either a dou-
ble-row 34-way boxheader or four 8-way SIL
pinheaders are fitted in position K8. The two
middle pins are not used and in the case of
the boxheader must be clipped off to allow
four 8-way single-row cable sockets to be fit-
ted side by side.
010208-1
Programming
The programming interface of the microcon-
troller employs an SPI interface using the fol-
lowing leads:
64K
I / O range
8000h ... FFFFh
32K
ext. RAM,
0000h ... 7FFFh
ext. RAM,
2000h ... 7FFFh
8K
Flash-ROM
programs
0000h ... 1FFFh
2K
EEPROM 0000h ... 7FFFh
data area
program area
010208 - 13
Figure 4. The internal and external memories of
the microcontroller board.
Figure 3a. Printed circuit board layout and …
12/2001
Elektor Electronics
57
855734305.764.png 855734305.765.png 855734305.766.png 855734305.767.png 855734305.769.png 855734305.770.png 855734305.771.png 855734305.772.png 855734305.773.png 855734305.774.png 855734305.775.png 855734305.776.png 855734305.777.png 855734305.778.png 855734305.780.png 855734305.781.png 855734305.782.png 855734305.783.png 855734305.784.png 855734305.785.png 855734305.786.png 855734305.787.png 855734305.788.png 855734305.789.png 855734305.791.png 855734305.792.png 855734305.793.png 855734305.794.png 855734305.795.png 855734305.796.png 855734305.797.png 855734305.798.png 855734305.799.png 855734305.800.png 855734305.802.png 855734305.803.png 855734305.804.png 855734305.805.png 855734305.806.png 855734305.807.png 855734305.808.png 855734305.809.png 855734305.810.png 855734305.811.png 855734305.813.png 855734305.814.png 855734305.815.png 855734305.816.png 855734305.817.png 855734305.818.png 855734305.819.png 855734305.820.png 855734305.821.png 855734305.822.png 855734305.824.png 855734305.825.png 855734305.826.png 855734305.827.png 855734305.828.png 855734305.829.png 855734305.830.png 855734305.831.png 855734305.832.png 855734305.833.png 855734305.835.png 855734305.836.png 855734305.837.png 855734305.838.png 855734305.839.png 855734305.840.png 855734305.841.png 855734305.842.png 855734305.843.png 855734305.844.png 855734305.846.png 855734305.847.png 855734305.848.png 855734305.849.png 855734305.850.png 855734305.851.png 855734305.852.png 855734305.853.png 855734305.854.png 855734305.855.png 855734305.857.png 855734305.858.png 855734305.859.png 855734305.860.png 855734305.861.png 855734305.862.png 855734305.863.png 855734305.864.png 855734305.865.png 855734305.866.png 855734305.868.png 855734305.869.png 855734305.870.png 855734305.871.png 855734305.872.png 855734305.873.png 855734305.874.png 855734305.875.png 855734305.876.png 855734305.877.png 855734305.879.png 855734305.880.png 855734305.881.png 855734305.882.png 855734305.883.png 855734305.884.png 855734305.885.png 855734305.886.png 855734305.887.png 855734305.888.png 855734305.890.png 855734305.891.png 855734305.892.png 855734305.893.png 855734305.894.png 855734305.895.png 855734305.896.png 855734305.897.png 855734305.898.png 855734305.899.png 855734305.902.png 855734305.903.png 855734305.904.png 855734305.905.png 855734305.906.png 855734305.907.png 855734305.908.png 855734305.909.png 855734305.910.png 855734305.911.png 855734305.913.png 855734305.914.png 855734305.915.png 855734305.916.png 855734305.917.png 855734305.918.png 855734305.919.png 855734305.920.png 855734305.921.png 855734305.922.png 855734305.924.png 855734305.925.png 855734305.926.png 855734305.927.png 855734305.928.png 855734305.929.png 855734305.930.png 855734305.931.png 855734305.932.png 855734305.933.png 855734305.935.png 855734305.936.png 855734305.937.png 855734305.938.png 855734305.939.png 855734305.940.png 855734305.941.png 855734305.942.png 855734305.943.png 855734305.944.png 855734305.946.png 855734305.947.png 855734305.948.png 855734305.949.png 855734305.950.png 855734305.951.png 855734305.952.png 855734305.953.png 855734305.954.png 855734305.955.png 855734305.957.png 855734305.958.png 855734305.959.png 855734305.960.png 855734305.961.png 855734305.962.png 855734305.963.png 855734305.964.png 855734305.965.png 855734305.966.png 855734305.968.png 855734305.969.png 855734305.970.png 855734305.971.png 855734305.972.png 855734305.973.png 855734305.974.png 855734305.975.png 855734305.976.png 855734305.977.png 855734305.979.png 855734305.980.png 855734305.981.png 855734305.982.png 855734305.983.png 855734305.984.png 855734305.985.png 855734305.986.png 855734305.987.png 855734305.988.png 855734305.990.png 855734305.991.png 855734305.992.png 855734305.993.png 855734305.994.png 855734305.995.png 855734305.996.png 855734305.997.png 855734305.998.png 855734305.999.png 855734305.1001.png 855734305.1002.png 855734305.1003.png 855734305.1004.png 855734305.1005.png 855734305.1006.png 855734305.1007.png 855734305.1008.png 855734305.1009.png 855734305.1010.png 855734305.1013.png 855734305.1014.png 855734305.1015.png 855734305.1016.png 855734305.1017.png 855734305.1018.png 855734305.1019.png 855734305.1020.png 855734305.1021.png 855734305.1022.png 855734305.1024.png 855734305.1025.png 855734305.1026.png 855734305.1027.png 855734305.1028.png 855734305.1029.png 855734305.1030.png 855734305.1031.png 855734305.1032.png 855734305.1033.png 855734305.1035.png 855734305.1036.png 855734305.1037.png 855734305.1038.png 855734305.1039.png 855734305.1040.png 855734305.1041.png 855734305.1042.png 855734305.1043.png 855734305.1044.png 855734305.1046.png 855734305.1047.png 855734305.1048.png 855734305.1049.png 855734305.1050.png 855734305.1051.png 855734305.1052.png 855734305.1053.png 855734305.1054.png 855734305.1055.png 855734305.1057.png 855734305.1058.png 855734305.1059.png 855734305.1060.png 855734305.1061.png 855734305.1062.png 855734305.1063.png 855734305.1064.png 855734305.1065.png 855734305.1066.png 855734305.1068.png 855734305.1069.png 855734305.1070.png 855734305.1071.png 855734305.1072.png 855734305.1073.png 855734305.1074.png 855734305.1075.png 855734305.1076.png 855734305.1077.png 855734305.1079.png 855734305.1080.png 855734305.1081.png 855734305.1082.png 855734305.1083.png 855734305.1084.png 855734305.1085.png 855734305.1086.png 855734305.1087.png 855734305.1088.png 855734305.1090.png 855734305.1091.png 855734305.1092.png 855734305.1093.png 855734305.1094.png 855734305.1095.png 855734305.1096.png 855734305.1097.png 855734305.1098.png 855734305.1099.png 855734305.1101.png 855734305.1102.png 855734305.1103.png 855734305.1104.png 855734305.1105.png 855734305.1106.png 855734305.1107.png 855734305.1108.png 855734305.1109.png 855734305.1110.png 855734305.1112.png 855734305.1113.png 855734305.1114.png 855734305.1115.png 855734305.1116.png 855734305.1117.png 855734305.1118.png 855734305.1119.png 855734305.1120.png 855734305.1121.png 855734305.1124.png 855734305.1125.png 855734305.1126.png 855734305.1127.png 855734305.1128.png 855734305.1129.png 855734305.1130.png 855734305.1131.png 855734305.1132.png 855734305.1133.png 855734305.1135.png 855734305.1136.png 855734305.1137.png 855734305.1138.png 855734305.1139.png 855734305.1140.png 855734305.1141.png 855734305.1142.png 855734305.1143.png 855734305.1144.png 855734305.1146.png 855734305.1147.png 855734305.1148.png 855734305.1149.png 855734305.1150.png 855734305.1151.png 855734305.1152.png 855734305.1153.png 855734305.1154.png 855734305.1155.png 855734305.1157.png 855734305.1158.png 855734305.1159.png 855734305.1160.png 855734305.1161.png 855734305.1162.png 855734305.1163.png 855734305.1164.png 855734305.1165.png 855734305.1166.png 855734305.1168.png 855734305.1169.png 855734305.1170.png 855734305.1171.png 855734305.1172.png 855734305.1173.png 855734305.1174.png 855734305.1175.png 855734305.1176.png 855734305.1177.png 855734305.1179.png 855734305.1180.png 855734305.1181.png 855734305.1182.png 855734305.1183.png 855734305.1184.png 855734305.1185.png 855734305.1186.png 855734305.1187.png 855734305.1188.png 855734305.1190.png 855734305.1191.png 855734305.1192.png 855734305.1193.png 855734305.1194.png 855734305.1195.png 855734305.1196.png 855734305.1197.png 855734305.1198.png 855734305.1199.png 855734305.1201.png 855734305.1202.png 855734305.1203.png 855734305.1204.png 855734305.1205.png 855734305.1206.png 855734305.1207.png 855734305.1208.png 855734305.1209.png 855734305.1210.png 855734305.1212.png 855734305.1213.png 855734305.1214.png 855734305.1215.png 855734305.1216.png 855734305.1217.png 855734305.1218.png 855734305.1219.png 855734305.1220.png 855734305.1221.png 855734305.1223.png 855734305.1224.png 855734305.1225.png 855734305.1226.png 855734305.1227.png 855734305.1228.png 855734305.1229.png 855734305.1230.png 855734305.1231.png 855734305.1232.png 855734305.1235.png 855734305.1236.png 855734305.1237.png 855734305.1238.png 855734305.1239.png 855734305.1240.png 855734305.1241.png 855734305.1242.png 855734305.1243.png 855734305.1244.png 855734305.1246.png 855734305.1247.png 855734305.1248.png 855734305.1249.png 855734305.1250.png 855734305.1251.png 855734305.1252.png 855734305.1253.png 855734305.1254.png 855734305.1255.png 855734305.1257.png 855734305.1258.png 855734305.1259.png 855734305.1260.png 855734305.1261.png 855734305.1262.png 855734305.1263.png 855734305.1264.png 855734305.1265.png 855734305.1266.png 855734305.1268.png 855734305.1269.png 855734305.1270.png 855734305.1271.png 855734305.1272.png 855734305.1273.png 855734305.1274.png 855734305.1275.png 855734305.1276.png 855734305.1277.png 855734305.1279.png 855734305.1280.png 855734305.1281.png 855734305.1282.png 855734305.1283.png 855734305.1284.png 855734305.1285.png 855734305.1286.png 855734305.1287.png 855734305.1288.png 855734305.1290.png 855734305.1291.png 855734305.1292.png 855734305.1293.png 855734305.1294.png 855734305.1295.png 855734305.1296.png 855734305.1297.png 855734305.1298.png 855734305.1299.png 855734305.1301.png 855734305.1302.png 855734305.1303.png 855734305.1304.png 855734305.1305.png 855734305.1306.png 855734305.1307.png 855734305.1308.png 855734305.1309.png 855734305.1310.png 855734305.1312.png 855734305.1313.png 855734305.1314.png 855734305.1315.png 855734305.1316.png 855734305.1317.png 855734305.1318.png 855734305.1319.png 855734305.1320.png 855734305.1321.png 855734305.1323.png 855734305.1324.png 855734305.1325.png 855734305.1326.png 855734305.1327.png 855734305.1328.png 855734305.1329.png 855734305.1330.png 855734305.1331.png 855734305.1332.png 855734305.1334.png 855734305.1335.png 855734305.1336.png 855734305.1337.png 855734305.1338.png 855734305.1339.png 855734305.1340.png 855734305.1341.png 855734305.1342.png 855734305.1343.png 855734305.003.png 855734305.004.png 855734305.005.png 855734305.006.png 855734305.007.png 855734305.008.png 855734305.009.png 855734305.010.png 855734305.011.png 855734305.012.png 855734305.014.png 855734305.015.png 855734305.016.png 855734305.017.png 855734305.018.png 855734305.019.png 855734305.020.png 855734305.021.png 855734305.022.png 855734305.023.png 855734305.025.png 855734305.026.png 855734305.027.png 855734305.028.png 855734305.029.png 855734305.030.png 855734305.031.png 855734305.032.png 855734305.033.png 855734305.034.png 855734305.036.png 855734305.037.png 855734305.038.png 855734305.039.png 855734305.040.png 855734305.041.png 855734305.042.png 855734305.043.png 855734305.044.png 855734305.045.png 855734305.047.png 855734305.048.png 855734305.049.png 855734305.050.png 855734305.051.png 855734305.052.png 855734305.053.png 855734305.054.png 855734305.055.png 855734305.056.png 855734305.058.png 855734305.059.png 855734305.060.png 855734305.061.png 855734305.062.png 855734305.063.png 855734305.064.png 855734305.065.png 855734305.066.png 855734305.067.png 855734305.069.png 855734305.070.png 855734305.071.png 855734305.072.png 855734305.073.png 855734305.074.png
 
MICRO CONTROLLER
SCK (P1.7)
clock line
(74HC126). This takes into account
the fact that the port pins in ques-
tion can naturally be used for other
functions in a user-written micro-
controller program. The program-
ming interface is therefore com-
pletely disabled if it is not needed. In
this case, the buffers are in a high-
impedance state and are thus effec-
tively not present. These buffers only
become active when a processor
reset is executed via the DTR line,
but they are not enabled when a
Reset is triggered by the pushbutton
on the circuit board. A buffer stage
in the 74HC126 operates in parallel
MISO (P1.6)
data read
MOSI (P1.5)
data write
RST
reset line
Programming takes place when the Reset line
is active. The programming tool thus estab-
lishes a Reset state and then writes the data
via the MOSI line, with each bit being trans-
ferred to a shift register inside the processor
by a clock pulse on SCK. In the same manner,
the MISO line can be used to verify successful
programming or read out a program. All sig-
nals are generated directly via RS232 lines
that provide voltage levels of ±10 V. This
means that an adaptation to the 5-V level of
the processor is necessary. The free half of the
MAX232 looks after the level conversion for
the data lines (MOSI and MOSO). The clock
and reset signals, on the other hand, are con-
ditioned using Zener diodes for voltage limit-
ing and tri-state buffers contained in IC2
010208-1
010208-1
C15
C6
K6
K4
K3
H2
P1
K8
K5
K7
S1
X1
C1
C5
Connector K8
pin functions
Pin
C2
C4
C9
C11
C10
D3
C8
R3
R4
R5
C3
IC5
IC2
IC6
Function
C13
1
GROUND
C14
C12
R1
R2
R7
D1
D2
2
A15
IC7
R6
K9
C7
comm1
3
GROUND
K2
K1
4
A14
comm2
5
+5V
H4
6
A13
7
+5V
8
A12
9
ALE
10
A11
Figure 3b. … component layout.
11
PSEN
12
A10
13
WR
14
A9
COMPONENTS LIST
15
RD
IC2 = HC126
IC3 = 74HCT573
IC4 = 62256 120 ns
IC5 = 74HCT00
IC6 = MAX232
IC7 = 7805
16
A8
Resistors:
R1,R2,R6,R7 = 27k
17
NOT CONNECTED
18
NOT CONNECTED
R3,R5 = 1k
19
AD7
R4 = 47k
20
A7
P1 = 10k
preset H
21
AD6
22
A6
Miscellaneous:
K1,K2 = 9-way Sub-D socket
(female), angled pins, PCB mount
K3 = 14-way boxheader
K4-K7 = 8-way SIL pinheader
K8 = 34-way boxheader
K9 = socket for mains adaptor
S1 = pushbutton, make contact
X1 = 11.0592 MHz quartz crystal
PCB, order code 010208-1
Disk, project software, order code
010208-11
Capacitors:
C1,C2 = 22pF
C3,C5,C6,C14,C15 = 100nF ceramic
C4,C7-C11 = 10 µ F 63V radial
C12 = 1000 µ F 16V radial
C13 = 100 µ F 10V radial
23
AD5
24
A5
25
AD4
26
A4
27
AD3
28
A3
29
AD2
Semiconductors:
D1,D2 = zener diode 4V7, 500 mW
D3 = BAT85
D4 = 1N4001
IC1 = AT89S8252 24PC
30
A2
31
AD1
32
A1
33
AD0
34
A0
58
Elektor Electronics
12/2001
855734305.075.png 855734305.076.png 855734305.077.png 855734305.079.png 855734305.080.png 855734305.081.png 855734305.082.png 855734305.083.png 855734305.084.png 855734305.085.png 855734305.086.png 855734305.087.png 855734305.088.png 855734305.090.png 855734305.091.png 855734305.092.png 855734305.093.png 855734305.094.png 855734305.095.png 855734305.096.png 855734305.097.png 855734305.098.png 855734305.099.png 855734305.101.png 855734305.102.png 855734305.103.png 855734305.104.png 855734305.105.png 855734305.106.png 855734305.107.png 855734305.108.png 855734305.109.png 855734305.110.png 855734305.113.png 855734305.114.png 855734305.115.png 855734305.116.png 855734305.117.png 855734305.118.png 855734305.119.png 855734305.120.png 855734305.121.png 855734305.122.png 855734305.124.png 855734305.125.png 855734305.126.png 855734305.127.png 855734305.128.png 855734305.129.png 855734305.130.png 855734305.131.png 855734305.132.png 855734305.133.png 855734305.135.png 855734305.136.png 855734305.137.png 855734305.138.png 855734305.139.png 855734305.140.png 855734305.141.png 855734305.142.png 855734305.143.png 855734305.144.png 855734305.146.png 855734305.147.png 855734305.148.png 855734305.149.png 855734305.150.png 855734305.151.png 855734305.152.png 855734305.153.png 855734305.154.png 855734305.155.png 855734305.157.png 855734305.158.png 855734305.159.png 855734305.160.png 855734305.161.png 855734305.162.png 855734305.163.png 855734305.164.png 855734305.165.png 855734305.166.png 855734305.168.png 855734305.169.png 855734305.170.png 855734305.171.png 855734305.172.png 855734305.173.png 855734305.174.png 855734305.175.png 855734305.176.png 855734305.177.png 855734305.179.png 855734305.180.png 855734305.181.png 855734305.182.png 855734305.183.png 855734305.184.png 855734305.185.png 855734305.186.png 855734305.187.png 855734305.188.png 855734305.190.png 855734305.191.png 855734305.192.png 855734305.193.png 855734305.194.png 855734305.195.png 855734305.196.png 855734305.197.png 855734305.198.png 855734305.199.png 855734305.201.png 855734305.202.png 855734305.203.png 855734305.204.png 855734305.205.png 855734305.206.png 855734305.207.png 855734305.208.png 855734305.209.png 855734305.210.png 855734305.212.png 855734305.213.png 855734305.214.png 855734305.215.png 855734305.216.png 855734305.217.png 855734305.218.png 855734305.219.png 855734305.220.png 855734305.221.png 855734305.224.png 855734305.225.png 855734305.226.png 855734305.227.png 855734305.228.png 855734305.229.png 855734305.230.png 855734305.231.png 855734305.232.png 855734305.233.png 855734305.235.png 855734305.236.png 855734305.237.png 855734305.238.png 855734305.239.png 855734305.240.png 855734305.241.png 855734305.242.png 855734305.243.png 855734305.244.png 855734305.246.png 855734305.247.png 855734305.248.png 855734305.249.png 855734305.250.png 855734305.251.png 855734305.252.png 855734305.253.png 855734305.254.png 855734305.255.png 855734305.257.png 855734305.258.png 855734305.259.png 855734305.260.png 855734305.261.png 855734305.262.png 855734305.263.png 855734305.264.png 855734305.265.png 855734305.266.png 855734305.268.png 855734305.269.png 855734305.270.png 855734305.271.png 855734305.272.png 855734305.273.png 855734305.274.png 855734305.275.png 855734305.276.png 855734305.277.png 855734305.279.png 855734305.280.png 855734305.281.png 855734305.282.png 855734305.283.png 855734305.284.png 855734305.285.png 855734305.286.png 855734305.287.png 855734305.288.png 855734305.290.png 855734305.291.png 855734305.292.png 855734305.293.png 855734305.294.png 855734305.295.png 855734305.296.png 855734305.297.png 855734305.298.png 855734305.299.png 855734305.301.png 855734305.302.png 855734305.303.png 855734305.304.png 855734305.305.png 855734305.306.png 855734305.307.png 855734305.308.png 855734305.309.png 855734305.310.png 855734305.312.png 855734305.313.png 855734305.314.png 855734305.315.png 855734305.316.png 855734305.317.png 855734305.318.png 855734305.319.png 855734305.320.png 855734305.321.png 855734305.323.png 855734305.324.png 855734305.325.png 855734305.326.png 855734305.327.png 855734305.328.png 855734305.329.png 855734305.330.png 855734305.331.png 855734305.332.png 855734305.335.png 855734305.336.png 855734305.337.png 855734305.338.png 855734305.339.png 855734305.340.png 855734305.341.png 855734305.342.png 855734305.343.png 855734305.344.png 855734305.346.png 855734305.347.png 855734305.348.png 855734305.349.png 855734305.350.png 855734305.351.png 855734305.352.png 855734305.353.png 855734305.354.png 855734305.355.png 855734305.357.png 855734305.358.png 855734305.359.png 855734305.360.png 855734305.361.png 855734305.362.png 855734305.363.png 855734305.364.png 855734305.365.png 855734305.366.png 855734305.368.png 855734305.369.png 855734305.370.png 855734305.371.png 855734305.372.png 855734305.373.png 855734305.374.png 855734305.375.png 855734305.376.png 855734305.377.png 855734305.379.png 855734305.380.png 855734305.381.png 855734305.382.png 855734305.383.png 855734305.384.png 855734305.385.png 855734305.386.png 855734305.387.png 855734305.388.png 855734305.390.png 855734305.391.png
Zgłoś jeśli naruszono regulamin