0% found this document useful (0 votes)
150 views63 pages

EN199906

The document summarizes information about a new ST7 microcontroller from ST Microelectronics. It discusses the ST family of microcontrollers, describing the ST6, ST7, ST9 and ST10 models. The ST7 is a faster, more versatile 8-bit microcontroller with more features than previous models like the ST6. It has various I/O functions and is available in different package types and memory configurations, making it suitable for applications in automotive, remote controls, and other devices.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
150 views63 pages

EN199906

The document summarizes information about a new ST7 microcontroller from ST Microelectronics. It discusses the ST family of microcontrollers, describing the ST6, ST7, ST9 and ST10 models. The ST7 is a faster, more versatile 8-bit microcontroller with more features than previous models like the ST6. It has various I/O functions and is available in different package types and memory configurations, making it suitable for applications in automotive, remote controls, and other devices.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 63

THE ELECTRONICS & COMPUTER MAGAZINE JUNE 1999

£ 2.85

PC TOPICS:
make your own music CDs
the new ST7 microcontroller
EEPROM for BASIC control computer
68HC11 evaluation system

DIY: from vinyl


to compact disc

weather
eat her-sat
-satellit
ellitee decoder
weather-satellite
from radio
from radio signal to
to comput
com puter
er display
computer

EEDTTS Pro
EED Pro
our new
new
model train
train
control
contr ol
sysstem
sy
The ST family of mic roc ontrollers is used a lot in Elektor
Elec tronic s projec ts. The well-known ST6 c ontroller has
now ac quired a sturdy younger brother in the form of
the ST7 proc essor. In this artic le, we take a c loser look
at the new member of the family.

n e w ST 7 co n t r o l l e r s
f a s t e r, m o r e v e r s a t i l e a n d w i t h m o r e f e a t u r e s

tion quantities. Some versions also have


an internal EEPROM. All in all, this results
in a produc t palette of around 30 dif-
ferent versions of the proc essor.

The a va ila b le I/O func tions a re a s fol-


lows:

• 16-bit timer
• watc hdog timer
• A/D c onverter
• D/A c onverter
• async hronous serial interfac e
• SPI (serial peripheral interfac e)
• I2C
• USB
• CAN

The family tree


ST Mic roelec tronic s has divided the ST
Microcontrollers play a steadily increas- b y c ontra st, ma kes these c ontrollers family into four main branc hes.
ing role in a large number of produc ts. partic ularly well suited for use in some The well-known ST6 is a n energ y-effi-
The major growth markets are the auto- other ma rket seg ments. A new, p ro- c ient 8-bit proc essor with 1.2 to 8kB of
motive industry and mobile c ommuni- grammable interrupt system introduces ROM and a limited number of I/O func -
c a tions. Monitor ma nufa c turers a lso the possibility of flexible c onfiguration tions. Typ ic a l a p p lic a tions for this
build a mic roc ontroller into prac tic ally of the priorities of the various interrupts. proc essor are simple c ontrol c irc uits.
every unit, frequently using an ST7 type. The c ontrollers are available in six dif- The new ST7 is also an 8-bit proc essor.
In all of these systems, there is a need ferent typ es of p a c ka g es, inc lud ing It uses an industry-standard instruc tion
for a la rg e p roc essing c a p a c ity a nd typ es with p ins a nd SMD versions. set, has from 256 bytes to 3 kB of RAM,
high reliability. In addition, low energy Dep end ing on the fea tures inc lud ed , 4 to 40 kB of ROM a nd numerous I/O
consumption is a factor in mobile com- the pac kages have 28, 32, 42, 44, 56 func tions. Typ ic a l a p p lic a tions for this
munic ations. or 64 c onnec tions. An extensive mix of c ontroller are to be found in the auto-
In ord er to b etter meet the c ha ng ing interna l memory c onfig ura tions a nd motive industry, remote controls for tele-
demands of the market, ST Mic roelec - ha rd wa re op tions is a va ila b le. This vision sets a nd (for exa mp le) RDS
tronic s ha s rec ently exp a nd ed the a llows the user to ma ke a n op timum dec oders.
ra ng e of the ST7 fa mily with versions choice for the cost/performance trade- The powerful ST9 is an 8/16-bit proc es-
tha t inc lud e new interfa c es. The CAN off. All devic es are available with vari- sor with an instruc tion time of 250 ns for
b us, for exa mp le, ma kes these c on- ous options for the sizes of the data and a 16-b it word . It sup p orts ma ny
trollers a g ood c hoic e for use in the program memory. A ROM version is also addressing modes, inc ludes DMA and
automotive industry and other environ- a va ila b le for la rg e p rod uc tion runs, has an advanc ed interrupt system and
ments tha t a re sub jec t to strong inter- and an OTP (one time programmable) ma ny I/O func tions. In a d d ition, it ha s
ferenc e. Support for the SCI interfac e, version c an be used for small produc - 16 to 128 kB of ROM a nd a t lea st

2 - 6/99 Elektor Elec tronic s EXTRA ——————————————— PC TOPICS


256 b ytes of RAM. The a utomotive
industry is a large consumer of ST9 con-
trollers.
The la st b ra nc h of the ST fa mily is the
ST10. This 16-b it p roc essor ha s a n
instruction time of 100 ns. It has 72 kB of
fla sh memory a nd a t lea st 10 kB of
RAM, a nd a numb er of integ ra ted I/O
functions. This processor is an outstand-
ing c hoic e for d ema nd ing c ontrol
applic ations, suc h as energy manage-
ment and air bag c ontrollers.

Controller design
The ST7 processor complies with the Von
Neuma nn a rc hitec ture, whic h mea ns
tha t a ll system c omp onents (suc h a s
memory, timers and I/O) are loc ated in
a single memory spac e.
The processor has an 8-bit internal data
Figure 1. The ST7 is a p owerful m ic roc ontroller, whic h c om b ines a lot of p roc essing
struc ture. It has six registers (A, X, Y, PC,
p ower with num erous I/O func tions. Som e of the I/O func tions a re not inc lud ed in c erta in
SP and CC), including a 16-bit program
versions.
c ounter (PC) and a 16-bit stac k pointer
(SP). The ST7 is c onsiderably faster than
its p red ec essor, the ST6. This is d ue to
the fa c t tha t it works with a p a ra llel is used for log ic a l a nd a rithmetic hold s fla g b its tha t a re more or less
interna l b us, while the ST6 ha s a seria l instruc tions. Instruc tions that c onsist of independent of eac h other. For exam-
interna l struc ture. The ST7 p roc essor only two op era nd s a nd a lso use two p le, if the result of a n a d d ition is zero,
uses 63 instruc tions with 17 d ifferent op era tors a re only p ossib le if one of the Z fla g will b e a c tive, b ut it will b e
addressing options. The instruc tion set the two op era nd s is held in the a c c u- reset for any other result. If the result of
inc ludes several powerful instruc tions, mula tor. Instruc tions tha t emp loy only an operation is negative, the N flag will
suc h as an unsigned 8 ↔ 8 multiplic a- one op era nd , suc h a s inc rement, b e a c tiva ted , a nd it will simila rly b e
tion, bit manipulations, various bit/byte d ec rement, c omp lement, c omp a re, reset for any other result. The CC regis-
c onversions a nd p owerful b ra nc hing test for neg a tive or zero, b it c omp a re ter saves the flag bits after each instruc-
op tions. The p erip hera l ha rd wa re is a nd so on, c a n either d irec tly refer- tion has been executed. They can sub-
c ontrolled via sp ec ia lized interrup ts enc e a memory loc a tion or use the seq uently b e used b y a c ond itiona l
and registers. Figure 1 shows the over- ac c umulator. jump instruction. The following flags are
all organization of the proc essor. The condition code register (CC) c ontained in the CC register:
Sinc e the a d d ress b us is 16 b its wid e,
the proc essor c an address up to 64 kB.
This is more tha n a d eq ua te for the
intend ed a p p lic a tions of the ST7. To
make the c ode espec ially effic ient, a
sp ec ia l 256-b yte b loc k (0–0FFH) is
reserved a s ‘p a g e 0’. This mea ns tha t
the memory spac e is divided into two
reg ions. The reserved p ortion c a n b e
ac c essed using an 8-bit address, while
the remainder of the memory c an only
be ac c essed using the 16-bit address
mode. All I/O ports are located in page
0 in a reserved b loc k b etween 000 H
a nd 080 H. The memory struc ture is
depic ted in Figure 2.
The proc essor works at a c loc k rate of
16 MHz. It can be put into a WAIT, SLOW
or HALT sta te und er softwa re c ontrol.
This allows its energy consumption to be
drastic ally reduc ed.

Register usage
As a lrea d y mentioned , the ST7 ha s six
registers.
The a ccumula tor (A) is na tura lly the Figure 2. As exp ec ted, a n 8-b it p roc essor ha s 64 kB of a d d ress sp a c e. This d ia gra m
best-known register in the proc essor. It shows how the m em ory sp a c e is a lloc a ted.

PC TOPICS——————————————— Elektor Elec tronic s EXTRA 3 - 6/99


output via these connections. The Data
Direc tion and Option registers c an be
used to customize the characteristics of
eac h I/O pin.

16-bit timer. The 16-b it timer c a n b e


used for a large variety of timing func -
tions. It c onsists of a free-running 16-bit
c ounter a nd a p resc a ler. Ea c h timer
has two inputs for count pulses and two
outputs. Pulses c an thus be measured
or g enera ted using the timer. Timer
overflows and other events assoc iated
with the timer are logged in the status
register, and c an be optionally used to
trigger an interrupt.

Watchdog timer. The built-in watchdog


timer c ontains a 7-bit reloadable regis-
ter tha t initia lizes a p roc essor reset a s
soon a s a p reviously-d efined va lue is
reac hed. During normal operation, the
software must reload the register within
a c ertain interval, to prevent the reset
c ond ition from oc c urring . If the p ro-
gram hangs, the c ounter will no longer
b e reloa d ed a nd the system will reset
itself. A software reset is normally suffi-
c ient to free the softwa re a nd let the
system sta rt a g a in with wha t it wa s
d esig ned to d o. The ‘softwa re wa tc h-
dog’ is activated by software, while the
ha rd wa re wa tc hd og is p erma nently
ac tivated by the hardware.

A/D converter. The b uilt-in A/D c on-


verter ha s eig ht a na log ue inp uts. It
c onverts analogue values to 8-bit digi-
tal values by successive approximation.
Figure 3. The c ore of the m ic roc ontroller c onsists of the registers, m em ory, ALU a nd a
The a na log ue volta g e to b e d ig itized
num b er of other func tions, a ll interc onnec ted b y severa l b usses. This struc ture form s the
must not be higher than the processor’s
hea rt of a ll ST7 p roc essors.
supply voltage, sinc e this is used as the
referenc e voltage.
• C flag: represents the c arry bit; stac k.
• Z flag: ac tive if the result is zero; Figure 3 shows the c ore of the proc es- D/A converter. The b uilt-in D/A c on-
• N flag: active is the result is negative; sor, c onsisting of the registers, memory, verter g enera tes a 10-b it p ulse-wid th
• I flag: used to enable all interrupts; ALU a nd a numb er of other func tions, modulated signal whose duty c yc le is
• H fla g : ha lf-c a rry b it, used to p a ss and illustrates how these elements are determined by software. This signal can
the c arry between two nibbles. interc onnec ted. b e c onverted to a c ontrol volta g e b y
a n externa l RC filter, a nd the resulting
The index registers (X and Y) are used Integrated I/O functions volta g e c a n b e used to rep la c e a
for storing addresses during instruc tion potentiometer or an analogue c ontrol
execution. They complement the accu- The following summa ry d esc rib es the voltage. Some versions of the ST7 have
mulator, whic h is used to hold the data numerous I/O func tions tha t c a n b e a 12-bit c onverter.
that will be processed by an instruction. inc luded in the proc essor. Depending
The program counter (PC) is the regis- on the selec ted p roc essor version, Asynchronous serial communication.
ter that c ontrols the exec ution of a pro- c erta in of these func tions ma y not b e The Seria l Communic a tion Interfa c e
g ra m. It c onta ins the a d d ress of the p resent. (SCI) p rovid es the user with a flexib le
next instruc tion to b e exec uted . The full-duplex serial c onnec tion. Data c an
c ontent of this 16-b it reg ister c a n b e Parallel I/O. The bidirec tional I/O lines b e exc ha ng ed via this interfa c e
modified by instruc tions, suc h as c on- are grouped in sets of eight, as usual. ac c ording to the standard serial data
ditional jumps. The numb er of a va ila b le I/O lines format.
The stack pointer (SP) is the final regis- depends on the package type. The I/O Thanks to the built-in double baud rate
ter. Its func tion should b e ob vious. In lines may be used by a number of I/O generator, a wide range of baud rates
plays an important role in the use of the functions in common (alternative appli- is a va ila b le. The tra nsmitter a nd
sta c k memory. A memory b loc k from c ations), or by an I/O func tion defined rec eiver work independently and c an
0140H through 017FH is reserved for the in softwa re. Da ta c a n b e rea d in a nd be set to different rates.

4 - 6/99 Elektor Elec tronic s EXTRA ——————————————— PC TOPICS


Seria l Periphera l Interfa ce (SPI). This interfac e of the ST7 supports both mul- the ST7 p roc essors. They ra ng e from
sync hronous serial interfac e is ideal for tima ster a nd sla ve mod es, a nd it c a n simple starter kits, c onsisting of a proto-
interc onnec ting ma ster a nd sla ve ha nd le sp eed s (sig na l ra tes) up to typing board with doc umentation and
devic es. Systems with single as well as 400 Hz. Sta nd a rd events suc h a s ‘b us simple development software, to a very
multip le ma sters c a n b e c onstruc ted . b usy’ a nd ‘sla ve a d d ress’, a s well a s p owerful C c omp iler with d eb ug g ing
This interfac e c an be used for c ommu- error c ond itions, a re a utoma tic a lly tools. Existing d evelop ment environ-
nic a tion with I/O c hip s a s well a s with detec ted and stored in an assoc iated ments, suc h a s the Ac tum Rea lizer (a
other p roc essors. Ad va nc ed reg isters register. An interrupt c an optionally be p a c ka g e tha t a llows softwa re to b e
and interrupts allow transac tions to be triggered as a result of such events. The d evelop ed b y d esc rib ing its struc ture
dealt with under software c ontrol, and interfa c e sup p orts 7-b it a nd 10-b it graphic ally), have also been adapted
also support user-defined protoc ols. addressing. to support the ST7 processor. For begin-
ners, the ST7 Develop ment Kit from ST
USB interface. The USB interface allows CAN bus interface. The CAN (Controller Mic roelec tronic s is rec ommended. This
PCs and peripheral equipment, such as Area Network) protoc ol allows the user package contains all relevant informa-
monitors, keyb oa rd s, multimed ia to take advantage of developments in tion, with most of the d oc umenta tion
devic es and sc anners, to be interc on- Europe and other regions, in whic h this loc a ted on a CD-ROM a long with the
nec ted via a sta nd a rd ized interfa c e. b us is b eing used more a nd more in software. The accompanying hardware
An imp orta nt a d va nta g e of this inter- c a rs a nd ind ustria l setting s. The CAN makes it easy to develop relatively sim-
fac e is that it is ‘hot pluggable’, whic h bus is an exc ellent c hoic e for environ- ple applic ations.
means that peripheral devic es c an be ments tha t a re sub jec t to strong inter-
c onnec ted or d isc onnec ted without ferenc e signals. Conclusion
having to switc h off the power or reset The CAN interfac e that is integrated in
the system. The USB interfa c e imp le- the proc essor supports the ‘2.0 ac tive’ If this artic le has aroused your c uriosity,
mented in the ST7 is suitable for the low- a nd ‘2.0B p a ssive’ CAN sta nd a rd s. It it is recommended that you visit the web
speed version of the USB. Data transfers c onta ins three 10-b it tra nsmit/rec eive site http://www.st.com. STMicroelectron-
ta ke p la c e via DMA. The USB func tion buffers and two 12-bit message accep- ics has put a lot of information about the
has its own integrated 3.3 V supply and tanc e filters. The baud rate is program- ST processors and associated develop-
a tra nsc eiver. The p roc essor sup p orts ma b le, with a ma ximum va lue of ment systems at this address. Application
the Suspend and Resume c ommands. 1 Mbit/s. notes, data sheets and other interesting
information can be downloaded free of
I2C interface. The I2C bus allows serial Getting started is easy charge from this site.
d a ta c ommunic a tion b etween c om- (992029-1)
p onents to ta ke p la c e using only a There are several development systems
d a ta line a nd a c loc k line. The I2C available for c reating applic ations for

Figure 4. The ST7 Develop m ent Kit from ST Mic roelec tronic s is a good sta rting p oint for getting a c q ua inted with these p roc essors.

PC TOPICS——————————————— Elektor Elec tronic s EXTRA 5 - 6/99


This month we present a new selec tion of tips, tric ks,
hints and kinks for all users of the Windows 98 opera-
ting system. Take your pic k!

By Chris Ja m sa , Ph. D., MBA

Win d o w s 9 8
Tip s & Tr ick s
NFS is the ma kes extensive use of p rotec ted - use the Windows Update feature to
Unix Network File System mode 32-bit devic e drivers. Unfortuna- loc a te a nd insta ll a newer d evic e
Windows 98 uses the FAT32 file system to tely, d ep end ing on your ha rd wa re (or driver.
store files on your disk. In a similar way, a g e of your ha rd wa re), Wind ows 98
the Unix operating system uses the NFS or may have to use real-mode 16-bit dri- Optimizing the
Network File System. In general, FAT32 vers for sp ec ific ha rd wa re d evic es. Windows 98 File System for
and NFS define how the operating sys- Unfortunately, real-mode device drivers
tems store files on disk. Windows 98 and are muc h slower than their 32-bit pro-
your Hard Disk
Unix store files differently. As a result, using tec ted -mod e c ounterp a rts, whic h will To imp rove your system p erforma nc e,
the FAT32 file system, Windows 98 could slow down your system performanc e. Wind ows 98 ta kes a d va nta g e of d isk
As a rule, you should use 32-bit drivers c a c hes whic h resid e in your PC’s fa st
whenever p ossib le. By using the Win- elec tronic RAM. Windows 98 c an per-
d ows 98 Up d a te Wiza rd , you c a n form rea d a nd write c a c hing . As your
loc a te a nd insta ll new d evic e d rivers lea rned , when Wind ows 98 p erforms
muc h ea sier tha n users c ould in the write-behind c ac hing, Windows 98 will
past. To determine if a devic e driver is temporarily plac e the information that
using a real-mode 16-bit or a virtual 32- your programs write to disk into its disk
bit mode devic e driver, perform these c ac he. Later, when Windows 98 has a
steps: free moment, it will write the c a c he’s
1. Clic k your mouse on the Start menu contents to disk. Because your program
a nd then selec t the Setting s menu does not have to wait for the slow disk-
Control Panel option. Windows 98, in write operation to c omplete, your pro-
Figure 7. To a c c ess files on a Unix d isk, turn, will open the Control Panel win- gram’s performance improves. Unfortu-
you m a y need to insta ll NFS c lient soft- dow. na tely, if the short interva l of time
wa re on your system . 2. Within the Control Pa nel wind ow, between when Windows 98 plac es the
double-click your mouse on the Sys- informa tion into the c a c he a nd when
not read a Unix disk. Likewise, using NFS, tem ic on. Wind ows 98 will d isp la y Windows 98 rec ords the information on
Unix could not read a Windows 98 disk. the System Properties dialog box. your d isk, your system exp erienc es a
If you c onnec t to a Unix c omputer that 3. Within the System Prop erties d ia log p ower outa g e or d isk error, you ma y
resides on your network or to which you box, c lic k your mouse on the Perfor- lose the informa tion in c a c he. Worse
dial in, you may need to install software manc e tab. Windows 98, in turn, will yet, your program thinks the information
support within Windows 98 that lets your display the Performanc e sheet. was correctly written to disk. Because of
system a c c ess files stored on a n NFS 4. Within the Performa nc e sheet, look this potential data loss, users often turn
disk. In most c ases, your network admi- for the message “Your system is con- off write-behind c ac hing.
nistra tor will insta ll a nd c onfig ure the figured for optimal performanc e.” If Depending on your willingness to trade
NFS software for you. Figure 7, for exa- you find the message, your system is off risk of data loss for improved perfor-
mple, shows the Selec t Network Client using a ll a va ila b le virtua l 32-b it manc e, you may want to let Windows
software dialog box that shows FTP Soft- devic e drivers. If you see a different 98 perform write-behind caching. If you
ware, Inc .’s NFS c lient. messa g e, c lic k your mouse on the a re using write-b ehind c a c hing a nd
Devic e Manager tab. Windows 98, you a re exp erienc ing d isk errors on a
For Optimal Performance, in turn, will d isp la y the Devic e remova b le d rive, you c a n p erform
Ensure that Your System is Ma na g er sheet. Within the Devic e these step s to d isa b le write-b ehind
Manager, examine the various devi- c ac hing for that drive:
Using 32-Bit Device Drivers c es and c hec k if they are using 32- 1. Selec t the Sta rt menu Setting s
To improve performanc e, Windows 98 bit drivers. If you find an older driver, options. Windows 98, in turn, will dis-

6 - 6/99 Elektor Elec tronic s EXTRA ——————————————— PC TOPICS


play the Settings submenu. simulta neously, the more Wind ows 98
2. Within the Settings submenu, c lic k may have to swap programs between
your mouse on the Control Panel RAM a nd your swa p file on d isk. As a
option. Windows 98 will open the rule, the more RAM your c omputer has,
Control Panel window. the less Windows 98 will have to swap
3. Within the Control Panel, double- to and from the disk.
c lic k your mouse on the System Usually, Windows 98 will reserve spac e
ic on. Windows 98, in turn, will dis- on your ha rd d isk for the swa p file. In
play the System Properties dialog previous versions of Windows, you had
box. to c onfig ure your Wind ows swa p file
4. Within the System Properties dialog setting s yourself. In c ontra st, Wind ows
b ox, c lic k your mouse on the 98 uses a dynamic swap file that it can
Performanc e tab. Windows 98, in grow or shrink as its needs require.
turn, will display the Performanc e Although Windows 98 configures its own
sheet. swap file settings, you c an take c ontrol
5. Within the Performanc e sheet, c lic k a nd c onfig ure your own swa p file, a s
your mouse on the File System but- your need s req uire (most users won’t
ton. Windows 98, in turn, will display have a need to configure the swap-file
Figure 9. The Prop erties d ia log b ox
the File System Properties dialog settings). To forc e a permanent swap-
Settings sheet.
box. file size within Wind ows 98, p erform
6. Within the File System Properties dia- these steps:
log box, c lic k your mouse on the 1. Selec t the Sta rt menu Setting s 1. Clic k your mouse on the Start menu
Removable Disk tab. Windows 98, options. Windows 98, in turn, will dis- Settings option and c hoose Control
will display the Removable Disk, play the Settings submenu. Pa nel. Wind ows 98 will op en the
sheet as shown in Figure 8. 2. Within the Settings submenu, c lic k Control Panel window.
your mouse on the Control Panel 2. Within the Control Pa nel wind ow,
option. Windows 98 will open the double-click your mouse on the Sys-
Control Panel window. tem ic on. Wind ows 98 will d isp la y
3. Within the Control Panel, double- the System Properties sheet.
c lic k your mouse on the System 3. Within the System Prop erties sheet,
ic on. Windows 98, in turn, will dis- c lic k your mouse on the Perfor-
play the System Properties dialog manc e tab. Windows 98 will display
box. the Performanc e sheet.
4. Within the System Properties dialog Within the Performanc e sheet, c lic k
b ox, c lic k your mouse on the your mouse on the Virtua l Memory
Devic e Manager tab. Windows 98, button. Windows 98 will display the
in turn, will d isp la y the Devic e Virtua l Memory d ia log b ox, a s
Figure 8. The File System Prop erties d ia - Manager sheet. shown in Figure 10.
log b ox Rem ova b le Disk sheet. 5. Within the Devic e Manager sheet,
expand the drive list, and then dou-
7. Within the Removable Disk sheet, ble-c lic k your mouse on the disk
remove the c hec k mark from the drive. Windows 98 will display the
Enable write-behind c ac hing on all drive’s Properties dialog box.
removable drives c hec kbox and 6. Within the Properties dialog box,
then c lic k your mouse on the OK c lic k your mouse on the Settings
button. tab. Windows 98 will display the
8. Within the System Properties dialog Settings sheet, as shown in Figure 9.
box, c lic k your mouse on the Close 7. Within the Settings sheet, use the
button to c lose the dialog box. Reserved drive letters field to selec t
the drive letter you desire. Then,
Changing a Disk Drive Letter c lic k your mouse on the OK button.
Assignment 8. Within the System Properties dialog Figure 10. The Virtua l Mem ory d ia log
box, c lic k your mouse on the OK b ox.
When you install software on your sys- button.
tem, Windows 98 will often create short- 5. Within the Virtua l Memory d ia log
cuts and menu options that correspond Forcing Windows 98 to use box, click your mouse on the Let me
to the software’s loc ation on your disks. a Permanent Swap File spec ify my own virtual settings and
If you la ter remove a ha rd d rive from then enter a minimum a nd ma xi-
your system, Windows 98 may reassign When you run several programs at the mum size va lue for your swa p file.
your d isk d rive letters, whic h c a uses sa me time, Wind ows 98 ma y, d ep en- Next, c lic k your mouse on the OK
your p rog ra ms not to run from the d ing on the numb er a nd the size of button.
menu option or shortcut. In such cases, your programs, run out of RAM. In suc h 6. To put your c hanges into effec t, you
you ma y b e a b le to c ha ng e the d isk c ases, Windows 98 will use a swap file must restart your system.
d rive’s letter a ssig nment (whic h ma y into which it will move one program out (992028-II)
you may find c onvenient for c hanging of memory to d isk, in ord er to ma ke
your CD-ROM d rive letter) b y p erfor- room for a d ifferent p rog ra m in
ming these steps: memory. The more p rog ra ms you run

PC TOPICS——————————————— Elektor Elec tronic s EXTRA 7 - 6/99


For rec ording you own CDs or editing audio files on
the c omputer, it c an be a good idea to have an
S/PDIF input and output available, for example on a
sound c ard. Unfortunately, the c apabilities of suc h
interfac es on inexpensive sound c ards are fairly limit-
ed, whic h you should take into ac c ount before mak-
ing a purc hase. First of all, though, what do you need
to know about suc h c onnec tions, and are they really
nec essary?

S/ P D I F co n n e ct i o n s
f or t he PC
u s e f u l , o r a n u n n e ce s s a r y l u x u r y ?
stand what happens to the digital sig-
nal inside the c ard.
The hea rt of this sound c a rd is a DSP
chip that performs all digital processing
a t a fixed sa mp ling ra te of 48 kHz. All
digital input data are c onverted to this
sampling rate by means of a sampling
rate c onverter. The advantage of this is
tha t a ll typ es of p roc essing , suc h a s
adjusting the volume via the Windows
mixing p a nel, c a n b e p erformed b y
the DSP without the need for any extra
c alc ulations to c onvert between differ-
ent sampling rates.
The d ig ita l outp ut sig na l a lso works
with a fixed sampling rate, whic h is the
sa me 48 kHz. This is exc ellent for
rec ord ing d a ta from the PC on a DAT
rec ord er, sinc e this is the sta nd a rd
sampling rate for suc h rec orders. How-
ever, if you feed the digital signal from
a CD p la yer to the sound c a rd , the
Figure 1. The Sound b la ster Live! ha s two c onnec tor b ra c kets. The d igita l c onnec tors a re
sa mp ling ra te c onverter will c ha ng e
loc a ted on the sec ond b ra c ket (p hoto: Crea tive).
the sig na l from 44.1 kHz to 48 kHz.
Althoug h this p roc ess is p ra c tic a lly
loss-free, it still a mounts to a n extra
c onversion step . And if you wa nt to
lowly b ut surely, a fford a b le sound to pass through an intermediate ana- outp ut the d ig ita l sig na l from the
c a rd s with a n inp ut a nd /or outp ut for logue stage. sound c a rd to a d evic e tha t uses a
S/PDIF sig na ls a s a sta nd a rd fea ture sampling rate of 44.1 kHz, you are sim-
are bec oming available in inc reasing Only 48 kHz? p ly out of luc k, sinc e tha t is not p ossi-
numbers. The S/PDIF interfac e take the ble with this c ard.
form of c oaxial (Cinc h) or optic al-fibre One of the c urrently most p op ula r Still, these restric tions a re not a s b a d
connectors. With this interface, it is pos- sound c a rd s, the Sound b la ster Live!, a s they ma y seem a t first g la nc e, a s
sib le to tra nsfer d ig ita l a ud io sig na ls has a digital input and a digital output long as you first c arefully think through
from the c omp uter to a rec ord er (or as standard features. However, before wha t you wa nt to d o with the S/PDIF
the other wa y a round ) without ha ving you start using them, you should under- c onnec tion.

8 - 6/99 Elektor Elec tronic s EXTRA ——————————————— PC TOPICS


Applications
For most hob b y a p p lic a tions, d ig ita l
c onnec tions on the sound c a rd will
rarely be necessary. Anyone who wants
to ma ke c omp ila tions of music from
CDs c an simply read in the trac ks digi-
ta lly using his or her CD-ROM d rive or
CD burner, and then put the modified
selec tion on a new CD. Dig ita l inp uts
and outputs on the sound card are thus
unnec essary for this task.
However, anyone who wants play back
data from a MiniDisc or DAT c assette to
the c omp uter d oes in fa c t need a
sound c a rd with a d ig ita l inp ut. If in
addition the data are to be transferred
back to a DATor MiniDisc recorder after
being edited on the c omputer, a digi-
tal output is also nec essary. As already
noted, the standard sampling rate for
DAT is 48 kHz. In a MiniDisc recorder, the
data are always first passed through a
sampling rate c onverter internal to the
d evic e a nd then c omp ressed . In this
case we do not have to be concerned
a b out the sa mp ling ra te used b y the
sound c ard — 48 kHz is just fine!
On the other hand, if you want to c opy
your own music from a DAT to a CD via
the c omp uter, then you will ha ve to
somehow a rra ng e for the d a ta to b e
converted from 48 to 44.1 kHz. This can
be done using software on the PC.
Figure 2. If you work a lot with d igita l a ud io signa ls, you a re b etter off to b uy a c a rd tha t
Some sound c ards have only a digital
is sp ec ia lly d esigned for suc h signa ls, suc h a s the Digi32 from the Germ a n firm RME
outp ut, with no d ig ita l inp ut. Suc h a
(p hoto: RME).
c ard is good for fanatic al game play-
ers (a mong others) who wa nt to feed
the sound signal to the digital input of sampling rates. The pric e of this c ard is along with the c onverters.
their stereo system in ord er to g et the around £240. If you wa nt to b e well p rep a red for
best possible results. For the true audio enthusiast who does what’s c oming next, it’s a good idea to
Nonetheless, in most c a ses the b est a lot of a ud io ed iting with the c om- b uy a c a rd tha t sup p orts 96 kHz sa m-
advic e is to take a good sec ond look p uter, it is c onvenient to ha ve a ll the p ling with 24-b it resolution. This is the
at your specific application. Frequently, audio connectors in a more accessible new sta nd a rd for DVD a ud io. RME
you will c onc lude that there is no spe- loc a tion tha n a t the rea r of the c om- offers c a rd s with this c a p a b ility, b ut
c ific req uirement for a d ig ita l inp ut or p uter. The Guillemot Ma xi Stud io Isis there are others available as well, such
output. (c urrently a round £300) is in this c a se a s the Terra tec EWS 88 MT c a rd (a t
Note well tha t this rec ommend a tion an outstanding solution, sinc e it has all around £400).
a p p lies to typ ic a l hob b y a p p lic a - c onnec tors loc ated in a separate box, (992030-1)
tions. For p rofessiona l a p p lic a tions,
the req uirements a re na tura lly q uite
d ifferent.

Other cards
The Soundblaster Live! is fully adequate
for the vast majority of PC users, for 99%
of a ll a p p lic a tions. Another g enera l-
p urp ose sound c a rd tha t ha s d ig ita l
inp uts a nd outp uts is the Aud iowerk2
c ard from Emagic , at around £200.
However, if you d o a lot of work with
digital audio signals, it’s better to use a
card that is specially designed for such
use. A well-known a nd a fford a b le
exa mp le is the Dig i32 c a rd from RME, Figure 3. This c a rd from Guillem ot p rovid es a ha nd y setup for the true a ud io hob b yist,
whic h ha s b oth RCA a nd Toslink c on- sinc e it ha s a ll c onnec tors a nd the c onverters loc a ted in a sep a ra te enc losure (p hoto:
nec tors and supports several different Guillem ot).

PC TOPICS——————————————— Elektor Elec tronic s EXTRA 9 - 6/99


One of the most frequently asked questions on the
Internet site for the 80C32-BASIC c ontrol c omputer is,
‘Can it burn EPROMs?’ In fac t, it c an, and this artic le
explains how.

Desig n b y H. J. Böhling

EEP R OM s a n d t h e
B A SI C co n t r o l co m p u t e r
FA Qs f o r t h e B A SI C co m p u t e r

The 8052AH-BASIC V1.1 proc essor uses c onsump tion, b ut it must b e p ro- c omputer. This still requires a proc essor
port 0 for programming EPROMs. Sinc e grammed with MCS-51 BASIC before it with an internal BASIC interpreter, plus a
this p ort is a lso used for the externa l c an be used. If you are not able to do numb er of mod ific a tions to the ha rd -
data and address bus, using it to burn this yourself, you c an obtain a prepro- ware and the c irc uit board (980002-1),
EPROMs is only p ossib le b ec a use the grammed c ontroller from Elektor Read- as follows:
BASIC interpreter is stored in the internal ers Servic es.
memory of the 8052. It thus d oes not In a d d ition, you will need some ha rd - ✓ Remove the 80C32 CPU (IC1) from its
need the externa l d a ta /a d d ress b us wa re tha t switc hes the p rog ra mming soc ket.
while it is p rog ra mming a n EPROM. voltage to the EPROM and c ontrols the ✓ On the top side of the c irc uit board,
Unfortunately, an 80C32 processor, with low-a d d ress reg ister d uring the p ro- c ut the tra c k a t p in 31 of the CPU
MCS-51 BASIC loc ated externally, c an- gramming proc ess. Both of these func - soc ket (IC1).
not b urn EPROMS or EEPROMS! If you tions are found on the Elektor Elec tron- ✓ Connec t a 47 kΩ resistor (R2)
need to do this, you will have to have ic s 80C32 BASIC Computer, for exam- b etween p in 31 of the CPU soc ket
either the original 8052AH proc essor or ple (see the Elektor book Short Course and pin 40 of the CPU soc ket (+ 5 V).
an 87C52 proc essor (with 8 kB of inter- 8051/8032 Mic roc ontrollers and ✓ On the b ottom sid e of the c irc uit
na l EPROM) tha t ha s b een p ro- Assembler, whic h is a va ila b le a long b oa rd , c ut the tra c k tha t c onnec ts
g ra mmed with the BASIC interp reter. with the circuit board 910042-1 through pin 30 of the CPU (ALE/P) to pin 11 of
Sinc e the first of these c ontrollers is no our Readers Servic es). the a d d ress reg ister (IC2). Sold er a
longer manufac tured by Intel, it is likely On the other hand, if you c an do with- 1N4148 diode (D1) across the break,
to b e d iffic ult to ob ta in. The sec ond out burning EPROMs and can limit your- with the c a thod e on the CPU sid e
c ontroller, ma nufa c tured b y Philip s, is self to 8 kB EEPROMS, it’s a lso p ossib le and the anode on the IC2 side.
available and even has a lower current to work with the 80C32-BASIC c ontrol ✓ Connec t a 47 kΩ resistor (R3)

980002-1
(C) Segment

R2

D1 R4

D2

R3

992022 - 12
992022 - 13

Figure 1. Mod ific a tions to the top a nd b ottom sid es of the p rinted c irc uit b oa rd.

10 - 6/99 Elektor Elec tronic s EXTRA ——————————————— PC TOPICS


between pin 11 of IC2 and pin 40 of 10 REM * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
the CPU soc ket (+ 5 V). 20 REM * ERASE f or er asi ng EEPROMs *
30 REM * ( C) H. - J. Boehl i ng 21. 08. 98 *
✓ Connec t a 1N4148 d iod e (D2)
40 REM * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
between pin 11 of IC2 and pin 4 of
50 PRI NT ” Pr epar i ng t o er ase EEPROMs. ”
the CPU, with the cathode at the CPU 60 MTOP=5FFFH : REM save RAM memor y f r om 6000H ( upper 8 Kbyt e)
end and the anode at the IC2 end. 70 REM ===== f i l l RAM wi t h FFH ==========
✓ On the b ottom sid e of the c irc uit 80 FOR I =6000H TO 7FFFH : XBY( I ) =0FFH : NEXT I
b oa rd , c ut the tra c k tha t c onnec ts 90 REM ===== l oad r egi st er s ===============
pins 27 and 28 of IC5. 100 REM sour ce = 6000H t o 7FFFH ( RAM) t o
✓ Connec t a 47 kΩ resistor (R4) 110 REM t ar get = 8000H t o 9FFFH ( EEPROM)
between pin 27 of IC5 and pin 28 of 120 REM l engt h = 2000H Byt es ( 8 Kbyt es)
IC5 (+ 5 V). 130 DBY( 19H) =000H : REM sour ce LSB
✓ Connec t a leng th of insula ted wire 140 DBY( 1BH) =060H : REM sour ce HSB
150 DBY( 18H) =0FFH : REM t ar get - 1 LSB
between pin 27 of IC5 and pin 5 of
160 DBY( 1AH) =07FH : REM t ar get - 1 HSB
the CPU (P1.4).
170 DBY( 1EH) =000H : REM l engt h LSB
✓ Install a CPU IC with internal 8052AH 180 DBY( 1FH) =020H : REM l engt h HSB
BASIC in the IC1 soc ket. 190 DBY( 26H) =DBY( 26H) . AND. 0F7H : REM st andar d pr ogr ammmi ng
✓ Insert a 28C64 EEPROM in the IC5 200 DBY( 40H) =0DCH : REM pr ogr am pul se l engt h 10 ms LSB
soc ket. 210 DBY( 41H) =000H : REM pr ogr am pul se l engt h 10 ms HSB
✓ The BASIC EPROM (IC4) is not needed 220 XBY( 128H) =0DCH : REM pr ogr am pul se l engt h f or PROG LSB
and may be removed. 230 XBY( 129H) =000H : REM pr ogr am pul se l engt h f or PROG HSB
240 REM ===== Pr ompt : er ase? ========
250 PRI NT ” Do you want t o er ase EEPROM now? ( Y/ N) : ” ,
How it works 260 K=GET : I F K=0 THEN 260
270 PRI NT CHR( K)
Pin 31 of the CPU is pulled high via resis-
280 I F K>90 THEN K=K- 32 : REM conver t t o upper case
tor R2. This a c tiva tes the interna l ROM
290 I F K=ASC( ‘ Y’ ) THEN 310
of an 8052-series processor. This means 300 GOTO 400
that external program memory c an no 310 PRI NT ” Er asi ng EEPROM! Pl ease wai t 2 mi nut es. ” : PGM
long er b e a c c essed in the a d d ress 320 REM ===== Er r or checki ng ========
range of 0 to 1FFFH. The memory region 330 PRI NT
from 2000H to 7FFFH c an of c ourse still 340 I F ( DBY( 30) . OR. DBY( 31) ) =0 THEN 380
b e used for BASIC extensions a nd 350 H=DBY( 1AH) : L=DBY( 18H) : HL=H* 256+L
mac hine-language programs. The sig- 360 PRI NT ” EEPROM not empt y at addr ess : ” , : PH1. HL
na l ALE/P is ANDed with the sig na l 370 GOTO 400
ALEDIS (P1.3 of the CPU) via D1, D2 and 380 PRI NT ” No er r or s occur r ed dur i ng er ase oper at i on. ”
390 PRI NT ” EEPROM now empt y! ”
R3. The resulting signal drives pin 11 of
400 REM ===== End =======================
the a d d ress reg ister IC2. The sig na l
410 MTOP=7FFFH : REM enabl e RAM
PGM (P1.4 of the CPU), with its p ull-up
resistor R4, drives the Write input of the
EEPROM. Unfortuna tely, not every
28C64 EEPROM c a n b e used with this b e d one using the termina l emula tor from the PC to a BASIC c ontrol c om-
arrangement — in partic ular, ST Mic ro- program Terminal MCS-51, whic h c an p uter tha t ha s b een mod ified a s
electronics EEPROMs with the type num- b e found a t va rious p la c es, inc lud ing d esc rib ed a b ove. The MCS-51 BASIC
b er M28C64C-15P1 (ma nufa c turer the 80C32-BASIC c ontrol c omp uter c omma nd PROG c a uses the d own-
c ode ST) c annot be written! home page at loa d ed p rog ra m to b e b urned a s the
first program in an empty EEPROM, and
Question time http://www.germany/net/ the c omma nd PROG2 c onverts it into
teilnehmer/101.107378/index.htm an autostart program.
How do I develop a program and burn If the exec ution of the a utosta rt p ro-
an autostart EEPROM? and on the Elektor CD-ROM 986007-1, g ra m is for some rea son susp end ed
The p rog ra m is first d evelop ed in the the Reuss Mikroc ontroller V1.0 CD-ROM and the watc hdog func tion has been
RAM of the c ontrol c omputer. This c an and the Pegasus Vol. 8 CD-ROM. ac tivated by removing jumper JP1 on
Termina l MCS-51 ha s a ma ny a d va n- the peripheral circuit board, a reset will
ta g es c omp a red to c onventiona l ter- b e g enera ted a fter a round 10 sec -
mina l emula tors, suc h a s Hyp erTermi- onds. This causes the program to restart
COMPONENTS LIST nal. For example, it inc ludes a c onve- from the b eg inning . Don’t forg et tha t
nient line editor and the ability to store the c omma nd PROG2 a lso stores the
Resistors: p rog ra ms in the PC or loa d them into terminal baud rate in the EEPROM!
R2,R3,R4 = 47kΩ the c ontrol c omputer by simply press-
ing a button. How do I erase an EEPROM?
Semiconductors: An a utosta rt p rog ra m should servic e A programmed EEPROM can be erased
D1,D2 = 1N4148 the watc hdog timer via the timer inter- using the small MCS-51 BASIC program
IC1 = 8052AH-BASIC or 87C52 with MCS- rup t. The p rog ra m CLOCK.LIS c a n b e ERASE.LIS. This program writes the value
51 BASIC interpreter (order code 996510-1) used as a starting point. You can simply 0FFH (255) to every loc ation of the EEP-
IC5 = 28C64A-20/P (Microchip) or insert your own program code between ROM. Completely erasing an EEPROM
HN58064-25 (Hitachi) lines 40 and 59999. After the program takes about two minutes.
is c omp lete, it c a n b e d ownloa d ed (992022-1)

PC TOPICS —————————————— Elektor Elec tronic s EXTRA 11 - 6/99


With the present pric es of CD burners and CD-R disc s,
making your own audio CDs with your own c hoic e of
music is an attrac tive possibility. You c an for example
make a c ompilation of tunes from existing CDs, or
you c an c opy your favourite trac ks from LPs onto a
CD. In the latter c ase, the sound quality c an be
improved in numerous ways with the help of spec ial
software. In this artic le, we provide some general
guidelines and tec hnic al details for those of you that
want to start making your own audio CDs.

m a ke you r ow n
m u s i c CD s
D i g i t i z i n g LP s a n d m a k i n g y o u r o w n c o m p i l a t i o n s

c lean up the audio files, you will have


to resort to a c omp uter with a CD
burner.
Currently, one of the CD-recording pro-
grams Easy CD Creator (from Adaptec)
or Win On CD (from Cequadrat) is most
often supplied with the CD burner. We
can use a few screen shots from the lat-
ter program to illustrate what you have
to p a y a ttention to when ma king a n
audio CD.

Copying CDs
The easiest task is simply making a 1:1
c opy of an audio CD.
Before you start c opying a CD, the CD
rea d er must first b e tested . This is
bec ause the error c orrec tion for audio
CDs is much less extensive than for CD-
ROMs. As a result, mod ern 32 or 40-
sp eed CD d rives c a n typ ic a lly rea d
audio CDs at a maximum speed of 4 or
8 times the norma l ra te. Most CD
rec ording programs have a test option
to d etermine the ma ximum ra te a t
whic h the d rive c a n rea d the a ud io
data without errors. Note however that
the reliability of the test results can vary,
d ep end ing on the testing method
Althoug h nowa d a ys everyb od y in the at a sampling rate of 44.1 kHz with 16- used. It can thus be better to use a sep-
c omp uter world is ta lking a b out MP3 bit resolution. arate ‘ripper’ program (as it’s c alled in
a ud io, the norma l a ud io CD is still the To put together an audio CD, you c an tra d e ja rg on), whic h is sp ec ia lly
most imp orta nt rec ord ing med ium for use a spec ial audio CD rec order, suc h d esig ned to rea d the d a ta from a n
the true a ud io fa n, a s fa r a s q ua lity is a s the one ma d e b y Philip s. However, audio CD. Some examples of such pro-
c onc erned. The data on an audio CD the fea tures of suc h a rec ord er a re g ra ms a re Dig ita l Aud io Cop y (www.
are not c ompressed and are rec orded ra ther limited . If you wa nt to ed it or windac .de) and Easy CD-DA Extrac tor

12 - 6/99 Elektor Elec tronic s EXTRA ——————————————— PC TOPICS


(www.polkasoft.c om/c dda/).
Win On CD also provides jitter c orrec -
tion for rea d ing in a ud io d a ta . With
most modern CD drives, the quality of
the read data is good enough that jit-
ter correction is normally not necessary,
b ut with old er-mod el d rives it c a n b e
essential for obtaining good results.
After you ha ve d etermined the b est
d a ta tra nsfer ra te from the CD-ROM
drive, you can copy the desired tracks.
With a 1:1 c op y, you c a n either c op y
the trac ks direc tly to the CD burner or
you c a n first ma ke a n ‘ima g e’ on the
hard disk. An image is a replic a of the
content of the CD. It is usually written to
the ha rd d isk a s a wa v file, a nd then
read out and c onverted to the normal
a ud io CD forma t when the new CD is
rec ord ed . Keep in mind tha t you will
need around 700 MB of free spac e on
the hard disk for an image of an audio
CD.
When p utting tog ether a c omp ila tion
CD, you c a n first c op y the ind ivid ua l
trac ks to the hard disk and then rec ord
the c ollec ted tra c ks on a CD in the
desired sequenc e.
Figure 1. A ‘rip p er’, suc h a s Digita l Aud io Cop y, c a n b e used to tra nsfer exa c t 1:1
Tha t’s b a sic a lly it, b ut there a re a few
c op ies of CD a ud io tra c ks to the ha rd d isk.
things that you have to watc h out for.

Trac k at onc e or disc at onc e?


Normally, in trac k-at-onc e mode, a 2- to c hec k whether they were rec orded whic h usually will indic ate whether pre-
sec ond g a p is inserted b etween suc - with pre-emphasis. The burner software emphasis is present. Some CD c opying
c essive trac ks by the CD burner. This is will normally not indic ate this, but you programs, suc h as Digital Audio Copy,
not exa c tly wha t norma l a ud io CD c an always c hec k it by simply inserting also indic ate whether the pre-empha-
players want to see. It c an often c om- the CD into a normal audio CD player, sis bit is set in the original rec ording.
pletely disrupt their operation, since the
la ser b ea m is switc hed off while the
gap is rec orded.
When c op ying a n entire CD, the CD
burner often automatic ally transfers all
the trac ks and rec ords them ‘c hained
together’. If you are rec ording a num-
b er of tra c ks tha t you ha ve c ollec ted
yourself, you must ta ke c a re tha t the
option ‘disc at onc e’ is selec ted in the
CD burner program. In this case pauses
will still b e inserted b etween the ind i-
vidual tunes, but the laser beam will not
be switc hed off between trac ks.

Pre-emphasis
You may not be particulary familiar with
this term. In the ea rly d a ys of a ud io
CDs, a form of pre-emphasis was some-
times used to imp rove the d yna mic
ra ng e for hig h freq uenc ies. With p re-
emphasis, all frequenc ies above 3kHz
are rec orded a few dBs louder on the
CD. This setting is detec ted by the CD
player during playbac k, so that a de-
emp ha sis filter c a n b e switc hed in to
restore the orig ina l levels. Nowa d a ys
this tec hniq ue is tota lly unnec essa ry Figure 2. Most CD b urning softwa re is d esigned with two m a in wind ows, so tha t tra c ks
a nd is not used . However, if you a re c a n sim p ly b e d ra gged from the one wind ow (the ‘exp lorer’ wind ow) to the other win-
c opying trac ks from old CDs you have d ow (the CD-R tha t is to b e b urned ).

PC TOPICS —————————————— Elektor Elec tronic s EXTRA 13 - 6/99


Figure 3. Win On CD 3.6 p rovid es (a m ong other fea tures) jitter c orrec tion for rea d ing in a ud io tra c k d a ta. Pa ra m eters suc h a s the p re-
em p ha sis b it a nd c op y p rotec tion c a n b e ind ivid ua lly set for the CD to b e rec ord ed.

An ena b led p re-emp ha sis b it is not First of all, of c ourse, you need a c om- p rog ra m with more fea tures, suc h a s
a utoma tic a lly c op ied from the a ud io puter with a CD burner. In most c ases, the well-known p rog ra ms Cool Ed it
CD b y most CD-rec ord ing p rog ra ms. the c omputer will be running Windows (www.syntrillium.c om), Gold wa ve
With Win On CD you c a n set it ma nu- software. (www.goldwave.c om) or Wa vela b
a lly, whic h is a useful fea ture if you In a d d ition, you will na tura lly need a (www.steinberg.net). With these p ro-
oc c asionally need it. g ood -q ua lity sound c a rd . Wha t d oes grams, you c an more c onveniently set
this mea n? Almost a ll mod ern PCI parameters suc h as the sampling rate
Copy protec tion sound c a rd s p rovid e g ood to out- and the rec ording level. Many of these
A numb er of c op y-p rohib it b its p re- sta nd ing sound q ua lity, with a la rg e programs also have built-in VU meters,
vent a n a ud io CD from b eing c op ied dynamic range and little distortion. For so tha t you c a n c losely monitor the
d ig ita lly more tha n onc e (tha t is, they rec ord ing ma teria l from p honog ra p h rec ord ing level. Be sure to c a refully
p revent a ny further d ig ita l c op ying of rec ord s a nd c a ssettes, a sound c a rd selec t the rec ording level. Overdriving
a d ig ita l c op y of a CD). The setting s tha t c osts on the ord er of £35 to £70 is bad for the sound quality, but a sig-
of these b its a re a lso not nec essa rily should thus be satisfac tory. A c assette na l rec ord ed a t too low a level c on-
c op ied inta c t b y the rec ord ing soft- deck can be connected directly to the tains too much noise. This is actually the
wa re. Some p rog ra ms a llow c op y line inputs of the sound card, but a sep- sa me a s for ma king rec ord ing s with a
protec tion to be manually enabled or a ra te MD/MC p hono p rea mp lifier is c assette rec order, but you should keep
disabled. If it is disabled, any number needed for a phonograph (the specific in mind that the audible effects of over-
of sec ond a ry c op ies of the CD c a n type depends on the type of c artridge d riving a re muc h more evid ent in the
b e ma d e (so tha t you c a n ma ke a used ). The b est results a re ob ta ined d ig ita l d oma in tha n with a na log ue
c op y of the CD, a nd then a c op y of when the p rea mp lifier p rovid es line- rec ordings.
the c op y, a nd so on). This c a n b e level outputs that c an be direc tly c on- It is important to select the correct input
useful for rec ord ing s of your own nec ted to the line inp uts of the sound (line) in the Wind ows a ud io mixer
ma teria l. c ard (sinc e the mic rophone input of a b efore you sta rt, a nd to set a ll other
sound card delivers inferior sound qual- inp uts to zero or switc h them off. Pa y
Analogue recordings ity and is also only monophonic ). Else- partic ular attention to the mic rophone
where in this issue you will find a design input, since it will add a lot of unneces-
When you c op y d ig ita lly rec ord ed for a high-quality stand-alone MD/MC sary noise if it is not disabled!
music you will seld om if ever need to p rea mp lifier, whic h is p erfec t for this A program such as Cool Edit also allows
d o a nything to the c ontent, b ut if you applic ation. the lea d -in a nd tra iler of a p iec e of
make digital recordings from analogue Finally, you naturally need software to music to be removed, so that the result-
sourc es, suc h a s p honog ra p hs a nd rea d in the tra c ks from the rec ord s or ing wav file c ontains only exac tly what
c a ssette p la yers, some ed iting of the c assettes and write the data to disk in is nec essary.
music ma y well b e useful or even wav format, following whic h the trac ks Also make sure that everything is read
essential. Who hasn’t dreamed of being c an be c leaned up (if nec essary) and in with a sa mp ling ra te of 44.1 kHz if
able to listen to some numbers from a used to ‘burn’ an audio CD. you plan to rec ord it on a CD that is to
rare LP (that has never been released b e p la yed b a c k using a n ord ina ry
on CD) without the usual noise? Digital Reading in audio signals audio CD player. Although good audio
tec hnology provides quite a few possi- In p rinc ip le, you c a n use the sound editing programs allow the data to be
bilities in this regard. recorder function of Windows to read in resampled (for example, to change the
What do you need to be able to make a na log ue sig na ls, b ut this is a ra ther sa mp ling ra te of a d ig itized a ud io file
your own rec ordings? primitive approac h. It is better to use a from 48 kHz to 44.1 kHz), it is na tura lly

14 - 6/99 Elektor Elec tronic s EXTRA ——————————————— PC TOPICS


better to avoid any unnec essary inter-
mediate proc essing.

The indirect approach


As an alternative to digitizing the ana-
logue signal using the sound c ard, you
c a n first rec ord the d esired p iec es of
music using a DAT or MiniDisc rec order.
This is often a more convenient and reli-
a b le a p p roa c h, a nd the D/A c onvert-
ers in suc h rec orders provide outstand-
ing sound q ua lity. After you ha ve
rec ord ed the d a ta , you c a n simp ly
transfer the digital signal to the PC.
Of c ourse, this approac h makes other
demands on the nec essary hardware
and software. First of all, you will need
a c a rd with a d ig ita l (S/PDIF) inp ut in
order to read the digital signals into the
c omputer. This c ould for example be a
Sound b la ster Live c a rd or a Terra tec
EWS64, or a special S/PDIF card such as
the Digi32 from the German firm RME.
Figure 4. A good -q ua lity sound c a rd is essentia l if you wa nt m a ke rec ord ings from
Next, a translation step is often needed
rec ord s or c a ssettes.
in the computer. A normal DAT recorder
always works at a 48 kHz sampling rate.
After the data that have been sampled
a t this ra te ha ve b een rea d in, they
must be resampled to 44.1 kHz with the
help of a p rog ra m suc h a s Cool Ed it.
This problem is not present with a Mini-
Disc rec ord er, sinc e it ha s a n interna l
c onverter that always provides an out-
p ut sig na l a t 44.1 kHz. The d isa d va n-
tage of using a MiniDisc recorder is that
the d a ta a re c omp ressed interna lly
and possibly also resampled.

Editing
Various programs are available for edit-
ing wav files. For example, Sound Forge
(www.sfoundry.c om) a nd Steinb erg
Clean (www.steinberg.net) offer a lot of
options. Nowadays, even CD recording
programs suc h as Easy CD Creator de
Luxe a nd Win On CD 3.6 inc lud e a
number of editing modules that can for
example remove noise and c lic ks.
Although audio enthusiasts have been
very sceptical about such editing in the
p a st, it must b e a d mitted tha t the
capabilities of modern editing software
are amazingly good. It is truly possible
to very a c c ura tely loc a te a nd elimi- Figure 5. A p rogra m suc h a s Cool Ed it is very well suited to m a king rec ord ings from
na te noise and c rac kles a t the d ig ita l p honogra p h rec ord s, a nd in a d d ition it p rovid es a la rge num b er of ed iting op tions, suc h
level, without affecting the audio signal. a s resa m p ling.

PC TOPICS —————————————— Elektor Elec tronic s EXTRA 15 - 6/99


CD databases own program for further use, but there is also software avail-
able that makes automatic use of the CDDB. For example,
Making a c omplete list of the titles of all the trac ks you have there are programs for assembling your own CD database,
rec orded on your CD, and putting the titles on a neat label CD players, CD jukeboxes and CD rec ording software that
or inlay for the CD c ase, c an easily be a fairly time-c on- utilize the CDDB. Whenever the program or devic e needs
suming ac tivity. Fortunately, there are also a number of the trac k information, it just makes a c onnec tion to the
interesting aids to help with this task. Everyone with ac c ess CDDB and downloads the nec essary information.
to the Internet c an browse free of c harge in the CDDB (CD In addition, there are programs available that have their
Database), whic h is loc ated at www.c ddb.c om. The trac k own audio databases with trac k information. For example,
titles of several hundred thousand audio CDs are c ollec ted the latest version of Win On CD (3.6 Power Edition) has its
in this data base, and the number is inc reasing daily, sinc e own database, with trac k titles from a number of well-known
every user c an make his or her own c ontributions to the audio CDs. The exac t number is not spec ified, but probably
data base. You c an ‘manually’ look up the title of a CD in it will be possible to update this database as well via the
the CDDB and then c opy the relevant information to your Internet in the near future.

Figure 6. Win On CD inc lud es va rious ed iting op tions, ra nging from elim ina ting c lic ks to a d d ing reverb era tion.

Exa c tly these sorts of d efec ts p la g ue from the ‘explorer’ window to the CD-R with a sound c a rd , a CD b urner, a
LPs (espec ially older examples). wind ow in the ord er tha t you wa nt to turntable with a separate preamplifier
If we take Win On CD 3.6 again as an ha ve them p la c ed on the CD. To sta y or a c a ssette rec ord er, a nd of c ourse
example, we see that there is a built-in as c ompatible as possible with normal the nec essa ry softwa re. All tha t’s then
a ud io ed itor tha t inc lud es a 5-b a nd a ud io CD p la yers, you should not p ut left is finishing off your p rod uc t. If you
g ra p hic eq ua lizer, a d ec lic ker for multiple sessions on an audio CD and ha ve the time, you c a n ma ke a n
removing c lic ks, a dec rac kler for elim- you should selec t the ‘d isc a t onc e’ attrac tive inlay and label for your self-
inating short tic ks suc h as c rac kling or op tion, a s p reviously mentioned . This ma d e CD. There a re c urrently a num-
ra ttling sound s, a nd a ‘d enoiser’ for guarantees that the resulting audio CD ber of commercial packages available
removing b roa d b a nd noise from a c a n b e p la yed b a c k b y a ll CD d rives for generating CD labels (from HP and
rec ording. There are also a number of without any problems. Some programs Traxdata, among others).
op tiona l ‘effec ts’, suc h a s stereo a llow you to sp ec ify the leng th of the (992025-1)
enha nc ement, a d justing the p la ying pause between suc c essive trac ks, but
speed and adding a certain amount of usually this is fixed at 2 sec onds.
reverberation. A norma l a ud io CD p la yer will a lwa ys
With Easy CD Creator de Luxe, a num- rec ognize the various trac k numbers of Copyright
ber of similar features are provided by a DIY CD. Sometimes you also have the
the c ompanion Spin Doc tor program. option of placing index markers before If you make your own music CDs, you
burning the CD. This c an be handy for must give due c onsideration to c opy-
Burning the CD c lassic al music , whic h c annot be eas- right aspec ts. It is perfec tly OK to
ily sp lit into a numb er of short p iec es. make a c opy of music from your pri-
After you have rec orded and edited a Index markers provide a simple method vate c ollec tion of CDs and LPs for your
number of wav files, you c an put them for jumping to the start of spec ific pas- own use, but you are not allowed to
all together onto a CD-R. Do not use a sages or movements. give or sell suc h c opies to others who
re-rec ord a b le CD (CD-RW), sinc e the do not already own the original(s).
ma jority of a ud io CD p la yers a re The final touches After all, the artists have to live from
absolutely unable to read suc h a CD. something as well, and they suffer the
With most CD b urning p rog ra ms, you As you c an see, it’s not all that diffic ult most from illegal c opying.
c a n simp ly d ra g the va rious wa v files if you just have the right kit: a computer

16 - 6/99 Elektor Elec tronic s EXTRA ——————————————— PC TOPICS


RADIO, TELEVISION & VIDEO

RF marker generator
calibrate receivers, receiver dials
and signal generators

Anyone involved in
the construction of
radio receivers and
associated equipment
will have felt the need
for some means of
producing an accu-
rately calibrated dial.
The ability to confi-
dently set the tuning
to a particular fre-
Early in stru m en ts of th is kin d often com p aratively sim p le m atter to cali-
quency is often half in corp orated tw o crystals, on e cu t to brate up or down from these points by
the battle when reson ate at 1 MH z, th e oth er at
100 kH z, an d th e fu n d am en tals an d
means of lower frequency signals pro-
d u ced by th e d ivision of th e crystal
searching for a weak h arm on ics of th ese frequ en cies w ere fundamental.
used to calibrate receivers and test gear Most crystal markers make n o p ro-
transmission, and up to, and beyond, 30 MHz. vision for the modulation of the signal.
greatly increases the The development of the integrated
circuit, in particular the prod uction of
H igh p erform an ce receivers in corp o-
ratin g a BFO (beat frequ en cy oscilla-
pleasure of using a binary and decimal counter ICs, made tor) can p rod u ce an au d ible ton e from
it p ossible to u se on ly on e crystal, cu t an u n m od u lated carrier, bu t w ith
receiver of any kind. to resonate at a higher frequency (often d om estic su p erh ets th ere w ill be n o
The calibrator 2 or 4 MH z), an d to d ivid e th e fre- clear au d ible in d ication th at th e
qu en cy d ow n in ord er to p rovid e marker signal has been tuned-in. Iron-
described here relies markers for lon g an d med iu m waves, ically, it is often th e listen ers w h o are
on a quartz crystal to and for the fine sub-division of the dial.
Wh en attem p tin g to calibrate th e
tryin g to get th e m ost ou t of sim p ler
receivers w h o h ave th e greatest n eed
determine and hold d ial of a sh ort-w ave receiver u sin g for som e m ean s of im p rovin g tu n in g
on ly a crystal stan d ard , d ifficu lty can accu racy. Accord in gly, p rovision is
constant the fre- be en cou n tered in id en tifyin g th e m ad e for th e op tion al m od u lation of
quency of the oscilla- p articu lar h arm on ic of a 1 MH z fu n - th e marker sign als.
d am en tal. If a 4 MH z crystal is u sed
tor providing the th e p osition is m u ch easier, bu t con - THE CIRCUIT
fusion can still arise as calibration pro- Th e fu ll circu it of th e u n it is given in
marker signals. gresses in to th e u p p er reach es of th e Figure 1. It is based on low-cost, CMOS
H F sp ectru m . (comp limen tary metal oxid e semicon -
In ord er to avoid th is, th e u n it d uctor) logic gate ICs. An inexpensive
d escribed h ere h as been d esign ed 8 MHz crystal determines the basic fre-
arou n d an 8 MH z crystal. With h ar- qu en cy of oscillation w ith a h igh
monics at 16, 24 and 32 MHz, virtually degree of accuracy and stability.
u n m istakable m arkers are p rod u ced IC5 con tain s fou r tw o-in p u t N O R
Design by Raymond Haigh th rou gh ou t th e H F ban d s, an d it is a gates. Strap p in g th e in p u ts of each

Elektor Electronics 6/99


14
gate togeth er p rod u ces fou r in vertin g 12V
IC3a
amplifier stages. O ne of these, IC5a, is
u sed as th e RF oscillator, w ith th e fre-
1 5
D
IC1a
1 4MHz

2
CTRDIV10
E ≥1 +
0
3
4
8MHz 3 2 1MHz 1 1
qu en cy of oscillation d eterm in ed by C
R S
C
2
5 100kHz
7 6
qu artz crystal X1. In th is circu it, th e 4 6 CT=0 3

crystal p resen ts an in d u ctive reac-


tan ce at th e op eratin g frequ en cy, an d
it reson ates w ith load in g cap acitors, 12V
13 2MHz IC3b
C1 an d C2. C2 is ad ju stable, an d th e 9
D
CTRDIV10 11
frequ en cy of oscillation can be set, by 11
I C 1 b
12
10
E ≥1 +
0
12
C 100kHz 9 1
referen ce to an extern al stan d ard , at 4MHz R S C
2
13 10kHz

p recisely 8 MH z. DC n egative feed - 10 8 15


CT=0 3
14

back, p rovid ed by R1, stabilises th e


operating cond itions of the stage, and
IC5b bu ffers th e ou tp u t. 1MHz
5 1 5 1 50kHz
IC5c and IC5d are connected as an D D
IC2a IC4a
R-C oscillator, the values of R5-R6 and 3
C
2 3
C
2
2MHz
C5 being chosen to give a frequency of R S R S
4 6 4 6
oscillation in the region of 1 kHz. This
audio tone is used to modulate the RF
output of the marker generator.
The buffered output of the oscillator 9 13 9 13 25kHz
D D
is ap p lied to th e clock in p u t of IC1, a IC2b IC4b
50kHz
d u al bistable flip -flop . Th is d evice 1MHz
11
C
12 11
C
12
R S R S
allows alternate pulses to pass, thereby 10 8
500kHz
10 8
d ivid in g th e crystal oscillator fre-
qu en cy by tw o. Th e resu ltin g 4 MH z
m arker at p in 1 is fed to th e secon d 12V

500kHz
100kHz
50kHz
25kHz
10kHz
clock in p u t, an d a 2 MH z sign al is
8MHz
4MHz
2MHz
1MHz
X1 R5 S1
1M
available at p in 13. Th is p rocess is 12 13
8 7 6 5 4 C6
repeated with IC2 in order to produce 8MHz 9 3 ≥1 IC5d
R1 10
1 MHz and 500 kHz markers. 10M
8MHz
11
2
R6
100n

1 11
The 1 MHz signal is applied to clock IC5a IC5b 12 13
390k
8 9
input of IC3a, a d ual d ecimal counter. 1
≥1 3
5
≥1 4
S2
C5
≥1 IC5c
2 6
Th e first stage of th is IC d ivid es th e 1n
C2 IC1, IC2,IC4 = 4013
1 MH z in p u t by 10 to give 100 kH z. C1 10
1kHz
IC3 = 4518 D1
Th is sign al is ap p lied to th e secon d 22p 22p
IC5 = 4001 T1
R4
stage for further division by 10 to pro- 3k9
12V 1N4148
duce a 10 kHz marker. IC6 C3 K1
7812 BC550
50 kHz and 25 kHz markers are use- 10n
K3
ful when calibrating the long, medium R2

3k3
and lower HF scales of a receiver, and C9 C10 C11 C12 C13 14 C14 14 C7 14 16 C8 14 C4 K2
IC1 IC2 IC3 IC4 IC5
to p rovid e th ese th e 100 kH z ou tp u t 100µ 100n 100n 22µ 10n
7 7 7 8 7
from IC3a is ap p lied to an oth er d u al 25V 25V 100n 100n 100n 100n R3
33Ω

bistable, IC4.
990047 - 11
Tran sistor T1 acts as a m od u lator.
Con figu red as an em it-
ter follower, its base pre- Figure 1. Circuit dia-
sents a moderately high gram of the RF marker
im p ed an ce to th e generator. Alth ou gh crystal totyp e u n it for p ow erin g it from a
in com in g sign al from oscillators are ben ch su p p ly or an in exp en sive (12-
th e d ivid er ICs, th e renowned for their sta- volt dc) mains adaptor.
requ ired m arker bein g selected by bility, operating frequency is shifted, to
rotary sw itch , S2. A low-im p ed an ce som e sm all exten t, by ch an ges in th e CONSTRUCTION
ou tp u t is d evelop ed across em itter amplifier ’s supply voltage. Regulation All of the components, with the excep-
resistance, R2-R3. Socket K2 supplies a of th e su p p ly voltage w ill th erefore tion of sw itch S1 are m ou n ted on a
relatively low output level (20-50 mV) en h an ce th e p erforman ce of th e u n it. PCB. Figure 2 sh ow s th e com p on en t
w h ich m ay be safer for d irect rath er Power is accordingly derived from two m ou n tin g p lan (overlay) an d cop p er
th an in d u ctive cou p lin g to receiver 9-volt PP3 batteries connected in series track layou t. Th e board sh ow n is n ot
inputs. to give a nominal 18 V supply, which is available ready-made.
Switch S1 enables the 1-kHz oscilla- dropped to the required 12 V as well as Although the CMOS IC’s are fitted
tor w h en a m od u lated ou tp u t is regulated by IC6. Bypass capacitor C12 w ith static p rotection d iod es, th ese
required. sh u n ts an y electrical n oise d evelop ed cannot be relied upon to prevent dam-
With CMO S d evices, p rop agation by the regulator to the ground rail. age, an d ap p rop riate p recau tion s
delay (the time taken for the output to Current drain with fresh batteries is again st ESD sh ou ld be taken w h en
change in response to a change of state in the region of 35 mA and this falls to u n p ackin g an d in stallin g th e d evices.
at the input) is particularly dependent arou n d 25 m A w h en th ey reach th e Work on a grou n d ed ben ch m at, an d
on supply voltage. IC5 and IC1, located en d of th eir u sefu l life. Wh ilst th is is never insert or withd raw a CMO S IC,
at the start of the chain of dividers, are not an excessive current demand on a or w ork on th e PCB, w ith th e p ow er
working fairly close to their maximum PP3 battery, equ ip m en t of th is kin d supply connected.
clock frequency, and the lowest supply tend s to be operated for lengthy peri- IC sockets are fitted to permit rapid
voltage for reliable operation is 12 V. ods, and provision is made in the pro- su bstitu tion ch eckin g (it is n ot

Elektor Electronics 6/99 15


C5 COMPONENTS LIST
990047-1 D1 R5
2 R6
S1

H3
C8 X1
Resistors:
IC4 IC3 IC5 R1 = 10 MΩ
R2 = 3kΩ3

R1
R3 = 33 Ω
OUT

C7
C1 R4 = 3kΩ9
K1 C3 C6 C14
T1 IC2 R5 = 1 MΩ
R6 = 390 kΩ
C13
C2
OUT1

+ Capacitors:

R4
K2 IC1 C1 = 22 pF
C4 1-740099
R2
ROTKELE )C( K3 C2 = trimmer, 22 pF
S2 C11 0
C3,C4 = 10 nF
C10 C5 = 1 nF
R3

H1
H2

C12 C9 C6,C7,C8,C10,C11,C13,C14 =
IC6
100 nF
C9 = 100 µF 25V radial
C12 = 22 µF 25 V radial

Semiconductors:
D1 = 1N4148
T1 = BC550
(C) ELEKTOR
990047-1 IC1,IC2,IC4 = 4013
IC3 = 4518 (see text)
IC5 = 4001
IC6 = 7812

Miscellaneous:
X1 = 8MHz crystal
K1,K2 = cinch socket, angled, PCB
mount
S1 = on/off switch
S2 = 12-way 1-pole rotary switch,
PCB mount
K3 = 2 solder pins

Figure 2. PCB artwork (board


not available ready-made).
Co m p o n e n t s
All of the ICs and semiconductors,
Figure 3. Finished PCB, ready with the exception of the low cur-
for mounting into the enclosure. rent LED, are listed in JAB Elec-
tronics’ catalogue (JAB, PO Box
5774, Birmingham, B44 8PJ). This
firm can also supply the other
components. Maplin retail all of the
parts. They offer two variants of the
4518, and it is the device they list
as HCF4518BEY dual BCD counter
which is required for this project.
Cirkit can supply everything except
the 4518 IC.

u n kn ow n for ICs of th is kin d to be


fau lty w h en su p p lied ) an d m in im ise
the possibility of damage during instal-
lation.
Fin ally, ch eck you r w ork again st
Figure 3.

TES TING
It is a good idea to check the function-
ing of the unit before the whole assem-
bly is enclosed within a case.
First of all, ch eck th e PCB for p oor
sold ered join ts an d brid ged cop p er
tracks. Check the orientation of the ICs
and other semicond uctors, in particu-
lar th e voltage regu lator IC: if th is is
connected into circuit wrongly, the full
supply voltage could appear across the
CMOS devices.

16 Elektor Electronics 6/99


Con n ect th e u n it to batteries or a the harmonic of the marker frequency Frequ en cy) receiver w ith ou t regen er-
ben ch p ow er su p p ly. Cu rren t con - exactly m atch es th e frequ en cy of th e ation , th e m arker sign als w ill h ave to
su m p tion w ith an 18 V su p p ly to th e distant transmitter. The 1 MHz marker be m od u lated in ord er to p rod u ce an
regu lator sh ou ld be in th e region of w ill, of cou rse, h ave to be u sed for au d ible ton e.
35 mA. Check that the output from the tran sm ission s on an od d n u m ber of H arm on ics of all th e m arkers
regulator is 12 V. MH z, bu t 2 MH z can be u sed for th e extend upwards through the HF spec-
If a frequ en cy m eter or an oscillo- German station radiating on 6 MHz. trum, and confusion will be avoided if
scop e is available, u se it to ch eck th e A sh ort screened lead on K2 can be the highest possible marker frequency
variou s sp ot frequ en cies. O th erw ise, u sed to con n ect th e ou tp u t of th e is used to start the calibration process:
use a rad io receiver to ensure that the marker generator to the equipment to e.g., begin by injecting a 1 MHz marker
circu it is fu n ction in g (gu id an ce on be calibrated , bu t a len gth of sin gle on medium waves (the band does not
in jectin g th e sign al in to a receiver is flex on K1, p laced n ear th e receiver ’s exten d far en ou gh to con tain its h ar-
given later). aerial termin al, w ill u su ally be all th at monic on 2 MHz), and start with the 4
is requ ired to secu re ad equ ate in jec- or 8 MH z m arkers as th e calibration
AD J U S T M E N T AN D U S E tion . Alw ays keep in jection levels as p rogresses th rou gh th e sh ort w ave
If an accu rate frequ en cy cou n ter is low as p ossible in ord er to m in im ise bands.
available, in ject th e 8 MH z m arker sp u riou s resp on ses w ith in th e Wh en th ese d atu m p oin ts h ave
(m o d u la t io n sw it ch e d o ff) a n d receiver. Note that superhets generate been establish ed , w ork aw ay from
a d ju st C2 t o ‘p u ll’ t h e cr y st a l t o im ages of th e received sign al, th e them using a lower frequency marker.
th e exact frequ en cy. m ost trou blesom e bein g sp aced at On medium waves, 100 kHz would be
If a radio receiver is to be used to set tw ice th e receiver ’s in term ed iate fre- ap p rop riate, follow ed by 50 th en
the calibrator, tune it to an appropriate qu en cy from th e tran smission . 25 kH z in ord er to fu rth er su b-d ivid e
tran sm ission ; e.g., Deu tsch e Welle, a If th e receiver is of th e com m u n i- th e scale. If th e d ial is large, 10 kH z
500-kW tran sm ission on 6 MH z from cation s typ e, sw itch on th e BFO an d could be injected , rather than 25 kHz,
Germ an y. In ject th e h igh est p ossible tune it to zero beat with unmodulated in order to produce a finer calibration.
m arker sp ot frequ en cy in to th e m arkers. Th is tech n iqu e can also be Th e calibrator can , of cou rse, be
receiver, an d ad ju st C2 for zero beat u sed for th e calibration of sim p le u sed as a m ean s of accu rately settin g
with the transmission. As the two fre- regenerative receivers if the regenera- the tuning of a receiver with a poor or
qu en cies d raw closer, th e p itch of th e tion or ‘Q ’ m u ltip lier con trol is bad ly calibrated d ial to th e frequ en cy
au d ible beat n ote em itted by th e ad van ced u n til th e receiver is ju st of a particular transmitter.
receiver will decrease to a slow flutter- oscillatin g. If th e receiver is a d om es- (990047-1)
in g an d th en cease (zero beat) w h en tic su p erh et or a TRF (Tu n ed Rad io

WHEN ELECTRONICS WAS YOUNG (6)


After Morse had instigated the formed Telegraph Construction and Maintenance Company, using
world’s first telegraph line in the biggest ship then afloat – the Great Eastern. This paddle steamer
1843, practical men developed this had a complement of 500 men, including 120 engineers and techni-
new means of communications, cians of the cable company. It took five attempts, but in 1866 the
and constructed improved and permanent link between Europe and America was finally established.
more reliable equipment. Before By the end of the 19th century more than 250,000 miles of cable
long overland lines were no longer had been laid, establishing well over 300 links. Today, just over a
sufficient and intercontinental century later, the cable link between France, Great Britain and the
lines were proposed. In 1850, a United States, finished in 1988, consists of a single fibre-optic cable,
cable was laid between Dover and TAT-8, which is 4114 miles (6620 km) long, and carries most of the
Calais. A similar operation failed television, telephone, and data processing signals between these
when it was first tried in the countries. An even later one (1992), TAT-10, is a direct 4436 mile
Mediterranean (between Sardinia (7320 km) long fibre-optic link between the USA and Germany via
and Algeria), owing to that sea the Netherlands.
being much deeper in places than Of course, not everybody involved in physics and electrical engi-
the English Channel. Only in neering during the 19th century was concerned with cable-laying. In
1857 did Newall & Co, with 1856, Ernst Werner von Siemens (1816–92) demonstrated a small,
Werner von Siemens as adviser, Werner von Siemens manually-operated dynamo that used a permanent magnet, and in
achieve success and the first (1816...1892) 1866, the series dynamo. It was not until the Belgian-French inven-
deep-sea cable was laid. tor Zénobe Théophile Gramme (1826–1901) had built the first com-
Following this success, the Agamemnon and Niagara, cable-lay- mercially practical generator for producing alternating current in
ing ships of the London-based Atlantic Telegraph Company, laid 1867, however, that the world’s first public electrical power plant
4,000 miles of cable linking Europe and America. When the work could be taken into use (in Godalming, England, in 1881). The alter-
was completed in August that year, Queen Victoria and President nator used in this plant, manufactured by the firm of Siemens &
Buchanan exchanged telegrams of congratulation. Three weeks later, Halske, developed 746 kilowatts.
the connection was suddenly interrupted and the telegraph machines In 1879, in America, Thomas Alva Edison (1847–1931) and in
stopped; it seems likely that moisture had penetrated the insulation England, the British physicist and chemist Sir Joseph W ilson Swan
of the cable. The fault was never found; to this day the cable lies at (1828–1914) simultaneously introduced the first practical carbon
the bottom of the Atlantic. filament lamp, which was a great improvement on the mercury arc
It took many years before funds had been raised to attempt lamp first demonstrated by Professor Wray on the Hungerford Sus-
another trans-Atlantic cable. This was undertaken by the newly pension Bridge in London on 3 September 1860.

Elektor Electronics 6/99 17


Con n ect th e u n it to batteries or a the harmonic of the marker frequency Frequ en cy) receiver w ith ou t regen er-
ben ch p ow er su p p ly. Cu rren t con - exactly m atch es th e frequ en cy of th e ation , th e m arker sign als w ill h ave to
su m p tion w ith an 18 V su p p ly to th e distant transmitter. The 1 MHz marker be m od u lated in ord er to p rod u ce an
regu lator sh ou ld be in th e region of w ill, of cou rse, h ave to be u sed for au d ible ton e.
35 mA. Check that the output from the tran sm ission s on an od d n u m ber of H arm on ics of all th e m arkers
regulator is 12 V. MH z, bu t 2 MH z can be u sed for th e extend upwards through the HF spec-
If a frequ en cy m eter or an oscillo- German station radiating on 6 MHz. trum, and confusion will be avoided if
scop e is available, u se it to ch eck th e A sh ort screened lead on K2 can be the highest possible marker frequency
variou s sp ot frequ en cies. O th erw ise, u sed to con n ect th e ou tp u t of th e is used to start the calibration process:
use a rad io receiver to ensure that the marker generator to the equipment to e.g., begin by injecting a 1 MHz marker
circu it is fu n ction in g (gu id an ce on be calibrated , bu t a len gth of sin gle on medium waves (the band does not
in jectin g th e sign al in to a receiver is flex on K1, p laced n ear th e receiver ’s exten d far en ou gh to con tain its h ar-
given later). aerial termin al, w ill u su ally be all th at monic on 2 MHz), and start with the 4
is requ ired to secu re ad equ ate in jec- or 8 MH z m arkers as th e calibration
AD J U S T M E N T AN D U S E tion . Alw ays keep in jection levels as p rogresses th rou gh th e sh ort w ave
If an accu rate frequ en cy cou n ter is low as p ossible in ord er to m in im ise bands.
available, in ject th e 8 MH z m arker sp u riou s resp on ses w ith in th e Wh en th ese d atu m p oin ts h ave
(m o d u la t io n sw it ch e d o ff) a n d receiver. Note that superhets generate been establish ed , w ork aw ay from
a d ju st C2 t o ‘p u ll’ t h e cr y st a l t o im ages of th e received sign al, th e them using a lower frequency marker.
th e exact frequ en cy. m ost trou blesom e bein g sp aced at On medium waves, 100 kHz would be
If a radio receiver is to be used to set tw ice th e receiver ’s in term ed iate fre- ap p rop riate, follow ed by 50 th en
the calibrator, tune it to an appropriate qu en cy from th e tran smission . 25 kH z in ord er to fu rth er su b-d ivid e
tran sm ission ; e.g., Deu tsch e Welle, a If th e receiver is of th e com m u n i- th e scale. If th e d ial is large, 10 kH z
500-kW tran sm ission on 6 MH z from cation s typ e, sw itch on th e BFO an d could be injected , rather than 25 kHz,
Germ an y. In ject th e h igh est p ossible tune it to zero beat with unmodulated in order to produce a finer calibration.
m arker sp ot frequ en cy in to th e m arkers. Th is tech n iqu e can also be Th e calibrator can , of cou rse, be
receiver, an d ad ju st C2 for zero beat u sed for th e calibration of sim p le u sed as a m ean s of accu rately settin g
with the transmission. As the two fre- regenerative receivers if the regenera- the tuning of a receiver with a poor or
qu en cies d raw closer, th e p itch of th e tion or ‘Q ’ m u ltip lier con trol is bad ly calibrated d ial to th e frequ en cy
au d ible beat n ote em itted by th e ad van ced u n til th e receiver is ju st of a particular transmitter.
receiver will decrease to a slow flutter- oscillatin g. If th e receiver is a d om es- (990047-1)
in g an d th en cease (zero beat) w h en tic su p erh et or a TRF (Tu n ed Rad io

WHEN ELECTRONICS WAS YOUNG (6)


After Morse had instigated the formed Telegraph Construction and Maintenance Company, using
world’s first telegraph line in the biggest ship then afloat – the Great Eastern. This paddle steamer
1843, practical men developed this had a complement of 500 men, including 120 engineers and techni-
new means of communications, cians of the cable company. It took five attempts, but in 1866 the
and constructed improved and permanent link between Europe and America was finally established.
more reliable equipment. Before By the end of the 19th century more than 250,000 miles of cable
long overland lines were no longer had been laid, establishing well over 300 links. Today, just over a
sufficient and intercontinental century later, the cable link between France, Great Britain and the
lines were proposed. In 1850, a United States, finished in 1988, consists of a single fibre-optic cable,
cable was laid between Dover and TAT-8, which is 4114 miles (6620 km) long, and carries most of the
Calais. A similar operation failed television, telephone, and data processing signals between these
when it was first tried in the countries. An even later one (1992), TAT-10, is a direct 4436 mile
Mediterranean (between Sardinia (7320 km) long fibre-optic link between the USA and Germany via
and Algeria), owing to that sea the Netherlands.
being much deeper in places than Of course, not everybody involved in physics and electrical engi-
the English Channel. Only in neering during the 19th century was concerned with cable-laying. In
1857 did Newall & Co, with 1856, Ernst Werner von Siemens (1816–92) demonstrated a small,
Werner von Siemens as adviser, Werner von Siemens manually-operated dynamo that used a permanent magnet, and in
achieve success and the first (1816...1892) 1866, the series dynamo. It was not until the Belgian-French inven-
deep-sea cable was laid. tor Zénobe Théophile Gramme (1826–1901) had built the first com-
Following this success, the Agamemnon and Niagara, cable-lay- mercially practical generator for producing alternating current in
ing ships of the London-based Atlantic Telegraph Company, laid 1867, however, that the world’s first public electrical power plant
4,000 miles of cable linking Europe and America. When the work could be taken into use (in Godalming, England, in 1881). The alter-
was completed in August that year, Queen Victoria and President nator used in this plant, manufactured by the firm of Siemens &
Buchanan exchanged telegrams of congratulation. Three weeks later, Halske, developed 746 kilowatts.
the connection was suddenly interrupted and the telegraph machines In 1879, in America, Thomas Alva Edison (1847–1931) and in
stopped; it seems likely that moisture had penetrated the insulation England, the British physicist and chemist Sir Joseph W ilson Swan
of the cable. The fault was never found; to this day the cable lies at (1828–1914) simultaneously introduced the first practical carbon
the bottom of the Atlantic. filament lamp, which was a great improvement on the mercury arc
It took many years before funds had been raised to attempt lamp first demonstrated by Professor Wray on the Hungerford Sus-
another trans-Atlantic cable. This was undertaken by the newly pension Bridge in London on 3 September 1860.

Elektor Electronics 6/99 17


AUDIO & HI-FI

DIY: from vinyl


to compact disk
with a PC and sound card

Nowadays, with the


availability of personal
computers and com-
pact-disk (CD) writers,
there is nothing in the
way of transferring
one’s collection of
vinyl records on to
compact disks. All
that may be needed
in addition to the
equipment already
mentioned is a suit-
able preamplifier,
such as the one pre-
sented in this article.

Br i e f p a r a m e t e r s
Input sensitivity
(moving-coil) 2 mV
(dynamic) about 0.2 mV
Nominal output signal 200 mV
Signal-to-noise ratio
(moving-coil) 78 dBa (750 Ω in)
88 dBA (input short-circuited)
(dynamic) 70 dBA (25 Ω in)
71 dBa (input short-circuited)
Design by T. Giesberts

Elektor Electronics 6/99


20
INTRODUCTION
Th e DIY m akin g of com p act d isks is
rap id ly becom in g a com m on p lace.
1
20
One of the applications that is particu- A
larly attractive to m an y p eop le is th e (dB)
RECORDING CURVE
digitizing of their valuable collection of 10
vin yl record s. Th ere are, of cou rse,
oth er ad van tages th an creatin g sp ace
(CDs take much less storage space than 0
vin yl record s): a com p act d isk h as a
lon ger life th an a vin yl record
(alth ou gh it is n ot, as som e p eop le -10
believe, infinite), and it becomes possi- PLAYBACK CURVE
ble to select and shuffle sections of the
recording if and as desired. -20
When a personal computer is avail-
able th at in corp orates a CD record er
10 20 50 100 500 1k 2122 10k 100k
(man y mod ern on es are) an d a good - f (Hz) 990048 - 13
qu ality sou n d card , th e cop yin g of
vin yl record s is straigh tforw ard . All
that is then required is a means of link- Figure 1. RIAA recording and playback characteristics.
in g th e p icku p ou tp u t to th e sou n d
card. When the record player is placed
next to the computer, the line outputs
of th e am p lifier m ay be u sed . Wh en
this is not possible, there are a few dif- tw o stereo ch an n els is lin ked to an plug-and-socket connections, there is a
ficu lties. Th e ou tp u t voltage of a in p u t am p lifier for m ovin g coil p ick- change-over relay at the output, which
d yn am ic p icku p is abou t 3 m V an d u p s, w h ich can be taken ou t of circu it en su res th at w h en th e m ovin g-coil
th at of a m ovin g-coil typ e arou n d by a w ire brid ge, follow ed by a stan - preamplifier is not used, the line input
0.3 m V. Clearly, th ese p oten tials are d ard am p lifier for d yn am ic elem en ts. is connected to the relevant terminal(s)
in su fficien t to d rive th e lin e in p u t of The RIAA frequency-correction circuit is on the computer.
th e sou n d card . Moreover, th e fre- incorporated in this latter amplifier. Th e p ow er su p p ly p rovid es th e
quency response of the signal must be N ote th at for cases w h ere th e ± 15 V lines for the operational ampli-
corrected. record player is linked to the computer fiers, as w ell as th e sin gle + 20 V lin e
for lon g p eriod s, th e lin e in p u t is for th e relay. It is p reced ed by a filter
RI AA CO RRE CTI O N retain ed for oth er ap p lication s. To to elim in ate an y m ain s h u m an d
A vin yl record is cu t tan gen tially, th at avoid th e cu m bersom e ch an gin g of in terferen ce.
is, th e cu tter traverses th e d isk in a
straigh t lin e from d isk ed ge to cen tre.
Th e cu tter resp on se is called con stan t
velocity, which means that its velocity Figure 2. Block schematic of the preamplifier.
is th e sam e for all frequ en cies. Th ere-
fore, the amplitude increases as the fre-
quency drops (at a rate of 6 dB/octave).
It w ou ld th u s be 16 tim es greater at
2 20V

30 Hz than at 15 kHz.
Large low-frequ en cy stylu s excu r-
sion s d u rin g p layback are avoid ed by
cu ttin g th e bass an d boostin g th e tre-
LINE
ble frequencies to improve the signal to
n oise ratio. Th ese con tou rs roll off at
either side of a short flat region centred
on 1 kH z to form th e RIAA (Record in g
Industry Association of America) char-
acteristic. Th e p layback am p lifier or
preamplifier has a frequency response
that is a mirror image of the RIAA char-
acteristic (see Figure 1).

DESIGN LINE

Th e d esign of th e p reamp lifier allow s


20V
the output of dynamic as well as mov-
ing-coil pickups to be connected to its
input.
Alth ou gh th e p ream p lifier is 15V
in ten d ed p rim arily for u se as a con -
filter power
verter between record player and per- supply
sonal computer, it is equally suitable for 15V
u se w ith a h i-fi am p lifier th at h as n o
integral phone input.
Th e block sch ematic of th e p ream- POWER
990048 - 11

plifier is shown in Figure 2. Each of the

Elektor Electronics 6/99 21


C2 C4 15V
* zie tekst
3 * see text
R4
768k
68n
C3
1n5

18n
C15 C11 C13
C19
* siehe Text R2
51Ω1
R3
49k9
R5
3k92
100µ
25V
100n
7 7
100n
22n
* voir texte IC1 IC2
R20
47Ω5
5 4 4 R21
2 C16 C12 C14

475Ω
C5 R6
6 5
R K1 JP1 IC1 100Ω 2
3 100µ 100n 100n
8 2µ2 R7 25V 6
IC3
1

220k
K6 3 8
* R1
47k5
C1 LT1115 15V
1
C18

5Ω62
LINE LT1028
100p K3 10n
R19
MD/MC

K5
R22
* R8 C20

5Ω62
C6
47k5

R14 20V Re1


LT1028
10n 1
100p

220k
LT1115 3
8
JP2
3
1
C10 R13
R18
* IC4
6

8 2
6
IC2 100Ω

475Ω
L K2 2 R17 D1 5
2µ2
S1

33k
R23
5 R24
1N4148 47Ω5
R9 R10 R12
C21
51Ω1 49k9 3k92 T1
R16
R11 C8 22n
33k
768k
18n R15
C7 C9 C17 BC547B

3k3
LINE
K4 68n 1n5
100µ
25V

14V3
15V BC550C

D3 R28

1k
10Ω 20V T2

2x D4 C40
R25 C22 7 7 C24
1N4002
100µ C26 IC3 IC4
40V 470n 4 4 470n
100µ 25V
Tr1 4x 22n
C27
K7 C38 C34 C37
L1 C23 C25
100µ 25V
100n IC5
C42 C41 7815 15V 470n 470n
R26
X2 X2 B1

1k
100n 100n C39 T3
250V 250V
27mH C32 C30 C28
100n C35 C36
470µ 100n 4µ7
2x 15V B80C1500 40V 63V
15V BC560C
3VA3 –14V3

D2

POWER C33 C31 C29

R27
6k8

470µ 100n 4µ7


40V 63V

990048 - 12
IC6 7915 15V

Figure 3. The circuit diagram may conveniently be split into


three sections.

CIRCUIT DESCRIPTION elem en t are abou t 750 Ω an d 450 m H Sw itch S1 serves to en able m an u al
resp ectively. switching of the relay between ampli-
In Figure 3, the preamplifier for mov- Th e gain of IC 1 an d IC 2 is 40 d B at fiers and line input terminal; K4 with-
ing-coil elements is formed by IC3 and 1 kH z. Th e RIAA correction n etw ork is out the need of switching off the sup-
IC4, while the main amplifier is based included in the negative-feedback loop ply.
on IC1 and IC2. betw een p in s 2 an d 6. Cap acitors C 5 When a dynamic pickup element is
Wh en th e ou tp u t of a d yn am ic an d C 10 d ecou p le an y offset, w h ile used, jumper terminals JP 1 and JP 2 are
pickup is linked to terminals K1 and K2, resistors R6 and R13 protect the opera- closed . The sections based on IC3 and
the input impedance has the standard tion al am p lifiers again st cap acitive IC4 are then not used and need not be
valu e of 47 kΩ – d eterm in ed alm ost loads. Resistors R7 and R14 ensure that built.
exclusively by R1 and R8. Capacitors C1 C5 and C10 are charged in the absence Wh en a m ovin g-coil p icku p ele-
an d C 6 d eterm in e th e frequ en cy of a load , w h ich h elp s to p reven t m en t is to be u sed , JP 1 an d JP 2 m u st
response between 10 kHz and 20 kHz, switch-on phenomena. rem ain op en an d resistors R1 an d R8
which means that their value depends Wh en th e p ow er is sw itch ed on , m u st be rep laced by 100 Ω typ es.
to some extent on the type of dynamic relay Re 1 is energized, whereupon the Amplifiers IC3 and IC4 are included in
element used. output of the amplifiers is linked to ter- the signal path via terminals K5 and K6.
O perational amplifiers IC1 and IC2 minal K3. When the supply is switched These amplifiers provide an amplifica-
are typ ified by a very low n oise fig- off, th e relay is d isabled , w h ereu p on tion of about ×10.
u re, a reason ably low bias cu rren t, the additional line input at terminal K4 To en su re a low n oise figu re, th e
an d low in p u t offset. Wh en th e ou t- is linked to K3. values of R19 and R22 are very low. To
p u t is 200 m V an d th e in p u t is sh ort- To avoid switch-on clicks and plops, p reven t th is form in g too large a load
circuited , the amplifiers have a signal- the relay is energized with some delay for the op amps, an additional resistor is
to -n oise ratio of 88 d B. In p ractical p rovid ed by cap acitor C 17 via tran sis- u sed in th e n egative-feed back loop
u se, th e n oise of th e am p lifier is p ro- tor T1. Resistor R15 en su res th at th e (R21 and R24 respectively). The result-
d u ced p rim arily by th e p icku p ele- relay is deenergized rapidly to guaran- in g n arrow in g of th e ban d w id th is
m en t. N ote th at th e resistan ce an d tee that the supply to the amplifiers is negated to a large extent by the use of
in d u ctan ce of an average d yn am ic switched off instantly. very fast operational amplifiers.

22 Elektor Electronics 6/99


4 Parts list

Resistors:
+20V 0
T1
S1 R1, R8 = 47.5 kΩ or 100 Ω (see text)

OUT1
R15 R2, R9 = 51.1 Ω

H7
H5

D1

C17
R16 R3, R10 = 49.9 kΩ
H1

H2

R17 R4, R11 = 768 kΩ


K7 R18

K3
RE1
L1
R5, R12 = 3.92 kΩ
990048-1 R6, R13 = 100 Ω

C10
R13
R14 R7, R14 = 220 kΩ
R15 = 3.3 kΩ

C5
C42

K4
C41 C3 R16, R17 = 33 kΩ
R7 R18 = see text
C4 R6
C11 C1 R19, R22 = 5.62 Ω
JP1 R20, R23 = 47.5 Ω
H10 H9

R5
R21, R24 = 475 Ω
C15

R
R25, R26 = 1 kΩ

R4
R3
1-840099 IC1 R27 = 6.8 kΩ

R1
TR1

ROTKELE )C( R28 = 10 Ω

K1
+

C2 R2
C8

C9
0

C12 K5
C13 Capacitors:
-

K2
R12
C1, C6 = 100 pF, 63 V, 1%
C16

R8
R27

C2, C7 = 0.068 µF, 63 V, 1%


C38 C14

L
IC2
C3, C8 = 0.018 µF, 63 V, 1%
C7

R11
R10
D2
C39

C4, C9 = 0.0015 µF, 63 V, 1%

H6
H8

JP2 C6 C5, C10 = 2.2 µF, metallized poly-


R9
D4
D3

R28

ester, pitch 5 mm or 7.5 mm


C35

C36 C37 C34


B1

C32

C21 C11–C14, C30, C31, C36, C38 = 0.1 µF


C25
T3

-
0

H12

C31 R23 C15–C17, C26, C27 = 100 µF, 25 V,


R26

C20
IC4

radial
+20V

R22
C27 C18, C20 = 0.01 µF
C24
C23

R24
0

C40 C19, C21 = 0.022 µF


C33 C19
IC6 C30 R19 C22–C25 = 0.47 µF
R25

C26 C18 C28, C29 = 4.7 µF, 63 V, radial


IC3

IC5 +
C29 C28
-15V

H4

0 R20
H3 H11

C32, C35 = 470 µF, 40 V, radial


T2

+15V C22 R21 K6


C34–C37 = 0.022 µF, ceramic
C40 = 100 µF, 40 V, radial
C41, C42 = 0.1 µF, 250 VAC, Class X2

Inductors:
L1 = 2×27 mH, 400 mA, 250 VAC

Semiconductors:
D1 = 1N4148
D2 = LED, green, high efficiency
D3, D4 = 1N4002
B1 = B80C1500 (straight)
T1 = BC547B
T2 = BC550C
T3 = BC560C

Integrated circuits:
IC1, IC2 = LT1115CN6 (Linear Tech-
nology)
IC3, IC4 = LT1028CN8 (Linear Tech-
nology)
(C) ELEKTOR IC5 = 7815
990048-1 IC6 = 7915

Miscellaneous:
JP1, JP2 = 2-way pin header and
jumper
K1, K2 = audio socket for board
mounting
K3, K4 = 3.5 mm PCB mounting audio
socket
K5, K6 = 8-way SIL (see text)
K7 = 2-way terminal block for PCB
mounting, pitch 7.5 mm
S1 = single-pole, single-throw switch
Re1 = 24 V relay, 2.2 kΩ
Tr1 = mains transformer, 2×15 V
secondary, 3.3 VA

Figure 4. The printed-circuit board for the preampli-


fier is intended to be cut into two or three sub-
boards.

Elektor Electronics 6/99 23


Figure 5. The completed proto- than a 12 V type, which means that the
5 type preamplifier for use with
dynamic and/or moving-coil
(adverse) effect on the preamplifier of
th e rip p le su p erim p osed on th is cu r-
pickup elements. rent is smaller.
The relay needs an energizing volt-
age of n ot less th an 18 V, so th at th e
20 V provided in the present design is
m ore th an ad equ ate. If a relay oth er
th an th at sp ecified is u sed , it m ay be
possible to lower the current drawn by
it by altering the value of R18. Note that
th is resistor is n ot n eed ed w h en th e
specified relay is used.

Table 1.
To lower the gain to 30 dB, alter
the values of the following com-
ponents as indicated.

R2, R9 = 162 Ω
R3, R10 = 49.9 kΩ
R4, R11 = 845 kΩ
R5, R12 = 3.83 kΩ
C3, C8 = 0.02 µF
C4, C9 = 0.0012 µF

Table 1 sh ow s th e valu es of w h ich


com p on en ts n eed to be altered if th e
lin e in p u t of th e sou n d card in th e
computer needs a lower level.
The board for the moving-coil type
p icku p elem en t is lin ked to th e m ain
amplifier board via an 8-way single-in-
lin e (SIL) con n ector, K5, w h ich is in
essence a half IC socket. This, as well as
th e corresp on d in g con n ector K6, may
also consist of an 8-way terminal strip.
The two connectors or strips are linked
by eight 15 mm lengths of 0.8 mm dia.
in su lated circu it w ire. See th e p h oto-
Cap acitors C 18 an d C 20 su p p ress CONSTRUCTION graph in Figure 5.
any r.f. radiation. Since the impedance To avoid any interference between
of moving-coil pickup elements is very Th e p ream p lifier is best bu ilt on th e the signal lines and the supply lines of
low, th e valu es of C 1 an d C 6 are too p rin ted -circu it board sh ow n in Fig- the moving-coil board, the latter do not
low, which results in too wide a band- ure 4. Th e board con sists of th ree sec- en ter via K6, bu t via th ree ad d ition al
width. This is, therefore, narrowed by tion s, w h ich m ay be cu t ap art. Th is is solder pins at the back of the board.
capacitors C19 and C21. h igh ly ad visable as far as th e p ow er As mentioned earlier, the interior of
An y in terferen ce on th e su p p ly su p p ly is con cern ed , sin ce, in view of a p erson al com p u ter, an d th e sp ace
lin es to IC 3 an d IC 4 is ad d ition ally stray field s arou n d th e m ain s tran s- im m ed iately su rrou n d in g it, are n ot
decoupled by gyrators T2 and T3. formers, this is best kept as far away as exactly free of interference. It is, there-
Regulators IC5 and IC6 provide sta- possible from the amplifier section(s). fore, highly advisable to house the pre-
bilized ± 15 V lin es from a trad ition al Con stru ction sh ou ld p resen t n o am p lifier in a w ell-screen ed m etal
power supply. The 20 V supply for the problems provided it is done with con- enclosure.
relay is sep arately rectified an d stan t an d carefu l referen ce to th e cir- [990048]
smoothed. Resistor R28 provides some cu it d iagram an d th e p arts list. Th ere
filtering of the line. are, n everth eless, a few p oin ts th at
Note that, because of the small sig- need special mention.
nal voltages, the supply contains rather The output of the pickup element is
more r.f. d ecoupling than usual. Since linked to the preamplifier via audio ter-
th e m ain s voltage in th e vicin ity of a m in als K1 an d K2. For best, lon g-life
p erson al com p u ter often is n ot too performance, use gold-plated types.
‘clean’, mains filter L1-C42 is provid ed Th e lin e in p u t an d ou tp u t term i-
at th e p rim ary of m ain s tran sform er n als, K3 an d K4, are stan d ard 3 m m
Tr 1. audio sockets.
Diod e D 2 is th e obligatory on /off N ote th at a 24 V relay h as been
indicator. used, since this draws a smaller current

Elektor Electronics 6/99 25


COMPUTERS

weather-satellite
decoder
a PLL-based intelligent interface
The decoder dis-
cussed in this article
sits between the out-
put of a weather-satel-
lite receiver and a free
RS232 port on your
computer. Featuring a
phase-locked loop
(PLL), extensive filter-
ing and a microcon-
troller for time-critical
functions, it will faith-
fully translate demod-
ulated audio signals
into a serial datas-
tream that can be
processed by many of
the popular wefax
image processing
programs like JVFAX.

Weath er satellite recep tion is a fasci- an ten n as an d th e like, bu t also on test


n atin g h obby on w h ich , fortu n ately, files, sou n d sam p les an d th e latest
lots of in form ation is available from weather image processing software. If
sp ecialised grou p s. In th e UK, for you are not on the Internet, then con-
exam p le, an yon e w ith an in terest in tact th e RIG th rou gh Th e Secretary,
the present d esign should contact the John Tellick, 34 Ellerton Road, Surbiton,
Remote Imaging Group (RIG). We say Surrey KT6 7TX.
this without hesitation because the RIG
is for begin n ers an d ad van ced u sers GET THE PICTURE
alike. Their superbly styled website at As already mentioned, the place of the
www.rig.org.uk con tain s a m assive present decoder is between the receiver
amount of useful information and links ou tp u t an d th e RS232 p ort on you r
to hard ware and software sources. As comp u ter. O n e p ossible con figu ration
we’ve discovered ourselves during the of a weather satellite reception system
p rep aration of th is article, RIG m em - is sketched in Figure 1. Note that there
bers will be pleased to assist and advise are two input ‘channels’: 137 MHz for
Design by J. Altenburg n ot on ly on th e ch oice of receiver, low-orbiting (high-resolution) satellites

Elektor Electronics 6/99


26
tape/cassette recorder

1 fixed
dish
PC

LO

printer
1691 MHz RS232
METEOSAT
converter

DET. decoder
tracking LO
antenna
137 MHz
AM/FM
receiver or scanner 990021 - 12

Figure 1. Components that make up a


(NOAA, GOES) and 1690 MHz for the full-blown weather-satellite receiving stron gest p art of th e
geostation ary ‘Meteosat’ clu ster. Usu - system. If the system is equipped with a tran sm ission (‘p ass’)
ally, th e Meteosat con verter w ill suitable clock control, the cassette from a low-orbitin g
em p loy 137 MH z as th e in term ed iate recorder may be used for unattended satellite like N OAA,
frequency (IF), allowing its output sig- recording of weather charts. th en a sim p le d ip ole
n al to be feed to th e in p u t of th e an ten n a an d a w id e-
137 MHz converter. The Meteosat con- ban d (> 40 kH z) scan -
verter usually gets its input signal from an d STSO RBIT-Plu s – h yp erlin ks to ner/receiver may be used with accept-
a p arabolic d ish , w h ile th e 137 MH z d ow n load sites are on th e RIG’s Soft- able resu lts. Again , RIG members will
converter usually employs a cross-yagi ware page! be happy to advise!
with combined azimuth and elevation Note that the equipment as shown
control by a tracking system. This sub- in Figu re 1 is a ‘fu ll-blow n ’ system . T H E S AT E L L I T E S I G N AL
system is fed with the so-called Kepler Meteosat reception is optional, as is the is an audible signal with the main com-
elements you have to calculate for your trackin g system for th e 137-MH z ponent (carrier) at 2400 Hz. Weather
location on th e globe. Su itable p ro- antenna. If you are sat- satellites (even Russian
grams? Look for Wintrack, PCTrack 3.1 isfied w ith ju st th e Figure 2. Circuit dia- ones) generally use the
gram of the decoder
for wefax signals.

2 5V

R3 D3
A 2V C4 5V
120k

IC5 = 4066
B 3V8 R4
4 IC1, IC4 = TL072 TEST DECODE
100n
1k

C 4V R2 C3 D8 D9 D10 D11
3 5V
4k7 IN
D 2V3 A IC2 8 2400Hz
100n OUT R21 R22 R23 R24
2 C13
E 0V4 C2 D 14
1k

1k

1k

1k
R5 C1
567 5
B R 22k IC5
1 100n
C3 7 100n
P2
8 8
C RC JP1
P1 IC1 IC4
D1 D2 C5 C6 7 6
22k INT 4 4 1
C2
250k C7
4µ7 10µ D
16V 63V 15
Tr1 3 PB0
100n 14 7
1 33n PB1 RESET
IC1a 13
2 2x BAT85 PB2
12 2
P3 R8 5V PB3 TIMER
11
R1 10k PB4
R6 10 IC6 5
22k 5V PB5 NMI
1k

10k

9
5V PB6
8
R7 PB7
4 6 C23 ST62T10
10k
DIV BAT85 D6 19
D4 C8 PA0
1 7 12n 13 18
C9
FB OUT PA1
R10 2 1 17 6
10n IC3 PA2 VPP/TEST
AA119 12n
18k2

16
6 MAX280 R11 R12 PA3
D5 R9 5 8 5 IC5a C11 D7 OSC
7 3 COSC BOUT 3k3 17k8 IN OUT
IC1b 10k 7
5 1 E IC4b 330n 3 X1 4 20
AA119 IC4a 6 R13 BAT85
2
2 3
5k23

C15 C14

5V R15 22p 8MHz 22p


R14
5V C9 100k
1k

IC7 C12 K2
78L05 12n 5V 5V
K5 LP2950-5

1
S1 8
R25 R16 R17 R18 R19 6
1k

4k7

2k2

4k7

33Ω

2
2 1 D13
C+ BOOST C22 7
C20 C21 IC8
7 6 T1 3
OSC LV IC5b IC5c IC5d
10µ
10µ 10µ 4 ICL7660 5V6 8
5 63V 4 3 11 10 8 9
C16 C19 D12 63V C– VOUT 400mW 4
C17 C18 63V
MAX1044 JP2 9
5 12 6 BC327
100µ 100n 100n 10µ R20 5
25V 63V 3
680Ω

5V
POWER

5V 990021 - 11

Elektor Electronics 6/99 27


Figure 3. Copper track

C10
C9

1-120099
ROTKELE )C(
P3 R8
layout and component

H1
D5

R12
R11
R10

R13

R14

R18
R19
R9
R7 mounting plan of the sin-
D4
990021-1
R6 C23 gle-sided PCB for the

IC5
TR1 C2 C1 decoder (board available

K2
R1
P1
ready-made).
IC1 IC3 IC4 T1

C8
R20

R17
R2
R4 P2
C22

R15
C3
COMPONENTS LIST

D6
D7
IC8 IC2 C12

D13

D2
D1
C11 C14 Resistors:
R25 D3
C6 R1,R4,R14,R21-R25 = 1 kΩ

C15
C21 C5 C7 R2,R16,R18 = 4kΩ7
D12 X1

R5
IC7 C20 R3 C4

JP2
R3 = 120 kΩ

C13
C16 C19 R5 = 22 kΩ
IC6
R6-R9 = 10 kΩ
S1 C18 R10 = 18kΩ2 1%
9V

R11 = 3kΩ3

R21
R22
R23
R24
R16
C17 K5

JP1
R12 = 17kΩ8 1%
R13 = 5kΩ23 1%

H2
H3

D8 D9 D10 D11 R15 = 100 kΩ


R17 = 2kΩ2
R19 = 33 Ω
R20 = 680 Ω
P1 = 250 kΩ preset H
P2,P3 = 22 kΩ preset H

Capacitors:
C1-C4,C13,C17,C18 = 100 nF
C5 = 4µF7 16V radial
C6,C19-C22 = 10 µF 63V radial
C7 = 33 nF
C8 = 10 nF
C9,C10,C23 = 12 nF
C11 = 330 nF
C12 = 1 µF MKT
C14,C15 = 22 pF
C16 = 100 µF 25V radial

Semiconductors:
D1,D2,D6,D7 = BAT85
D3 = LED red, 3mm, low current
D4,D5 = AA119 or BAT85
D8-D11 = LED, yellow, 3mm, low
(C) ELEKTOR
990021-1

current
D12 = LED, green, 3mm, low current
D13 = zener diode, 5V6, 400mW
T1 = BC327
IC1,IC4 = TL072 CP
IC2 = LM567CM
IC3 = MAX280CPA
APT format (Automatic Picture Trans- weather-satellite signal has been prop- IC5 = 4066
mission), which is a mix of FM (fre- erly d em od u lated before it is ap p lied IC6 = ST62T10 B6-HWD (order code
quency mod ulation) and AM (ampli- to th e p resen t d ecod er, a d etailed 996513-1)
tude modulation). The picture informa- an alysis of its stru ctu re is beyon d th e IC7 = 78L05 or LP2950 CZ5.0
tion is amplitud e-mod ulated on a scope if this article. IC8 = ICL7660 CPA or MAX1044
carrier, which, in turn, is frequency
Miscellaneous:
mod ulated . Cumbersome and hope- H A R D WA R E JP1 = 3-way SIL pinheader with
lessly outdated as it may seem, this ‘AM- DESCRIPTION jumper
in-FM’ packaging is actually pretty inge- The circuit diagram of the converter is JP2 = 2-way pinheader with jumper
nious because it avoid s the complex shown in Figure 2. The circuit is a com- K2 = 9-way sub-D socket (female),
compensation of Doppler shift at the bination of analogue and d igital com- angled pins, PCB mount
receiver side. Remember, all low-orbit- ponents. K5 = mains adaptor socket, PCB
ing satellites travel at very high ground Th e au d io in p u t sign al reach es mount
S1 = on/off switch, 1 contact
speeds, typically covering a horizon-to- in p u t am p lifier IC1a via a lin e tran s-
TR1 = line transformer, Monacor
horizon arc in just a few minutes. former, Tr1. This is included for electri- (Monarch) type LTR110 or MTR120
The picture transmission rate is usu- cal isolation an d to keep d igital n oise X1 = 8MHz quartz crystal
ally tw o lin es p er secon d . Th e sign al (8-MH z ST6 clock) aw ay from th e Clip-on lead for 9V PP3 battery
w ill typ ically sou n d like a h iss in ter- receiver. Preset P1 allow s an ou tp u t 9 volt PP3 battery or 9V 300mA
rupted by two 2400-Hz beeps per sec- level of 2.3 V to be set. The opamp out- mains adaptor
on d . Th e 2400-H z ton e is also d om i- p u t sign al is sen t to a PLL (p h ase- PCB, order code 990021-1 (see
Readers Services page)
n an t in th e p ictu re lead er an d trailer locked loop), IC2, and a rectifier/buffer,
Disk, contains ST6 source code file
syn cs. Th e h igh est frequ en cy of th e IC1b-IC4a, which is followed by a filter and Satview program, order code
picture information proper (‘pixels’) is built around IC3 and IC4b. 996019-1 (see Readers Services
about 1200 Hz. Let’s first look at what the PLL does. page).
Becau se it is assu m ed th at th e The inexpensive and well-tried NE567

28 Elektor Electronics 6/99


M a i n d e co d e r code to be sent to ‘dcb’ for the control of the LEDs. The code to
open the sample&hold switch is also sent. Next the program

r ou t in e counter is returned to ‘loop’ and the micro waits for NMI again.
The A/D conversion takes place while the micro waits for a new
NMI pulse edge.
The main grey-level decoding routine executed by the ST micro-
controller in this project performs the following sequence:
1.Initialise register x with value 00 (aux. value for jump instructions) 208 µs 208 µs

2. Enable interrupts NMI


3. Disable timer interrupt
4. Initialise variable ‘dcb’ (all LEDs off)
Pin 11 sample

Inside ‘loop’, the following is done:


5. Copy contents of ‘dcb’ to port B (open sample&hold switch, Read A/D
make LEDs light) 234 µs

6. Wait for falling edge of NMI Data Out

The NMI handling consists of:


Start A/D
7. Close sample&hold switch
8. Read A/D converter
9. Send start bit to serial channel A/D Ready
10. Start A/D conversion using input ‘average’ 70 µs 70 µs
990021 - 14
11. Reload watchdog
12. Send bits 0-7 to serial channel
13. Read A/D converter The timing is calculated as follows:
14. Send stop bit to serial channel NMI to data-out: 19.5µs
15. Start A/D conversion using input ‘sample&hold’ Serial out:234µs
16. If A/D value< 70 then code for 1 LED to ‘dcb’, go to ‘loop’ Which LEDs on/off 42.5µs
17. If A/D value< 100 then code for 2 LEDs to ‘dcb’, go to ‘loop’ Data to port B: 19.5µs
18. If A/D value< 150 then code for 3 LEDs to ‘dcb’, go to ‘loop
19. Code for 4 LEDs to ‘dcb’, go to ‘loop’ The total duration of 316 µs corresponds to a frequency in excess
of 3 kHz.
The timing of these routines is critical. At 2400 Hz, a time slot of The serial signal is generated as follows. The byte in accumulator
417 µs is available to perform both A/D conversions and transmit A has to be transmitted serially, LSB-first. “Piece of cake” you’d
the value serially. Fortunately, the A/D conversion may be per- say, “just use the usual Rotate or Shift-Left instructions”. Surprise,
formed while serial data are being transmitted and the microcon- surprise, the ST6 does not have these instructions! Not to be put
troller determines which of the 4 LEDs is to be switched on. The bit off, the author devised a solution that does not compromise the
rate is 38,400 per second, or 26 µs per bit. In this time slot, the control of the LEDs. As shown below, it involves conditional jumps
processor executes 16 machine cycles. and accurately ‘tweaking and padding’ the number of machine
A software cycle starts with waiting for the NMI signal supplied by cycles to make sure the routine always takes the same amount of
the PLL. During the previous cycle, the A/D converter already mea- time to execute whether or not the jump condition is satisfied.
sured the input voltage at the pixel input (i.e., the input with sam-
ple&hold). The conversion result is held ready in the A/D latch. At Label i nst r uct i on comment no. of machi ne cycl es
step 7, the sample&hold switch is closed, allowing the capacitor J r s 2a, hp15 Tes t bi t 2, j ump as 1 5
to track the input. At step 8, the A/D converter is read. To save Nop 2
time, a start bit is already sent. Next, a new A/D cycle is started, Res 0, DRA wr i t e 0 4
this time the average value at input 8 is measured (PB7), this value J r r 0, x , hp16 X = 0, s o al way s j ump 5
is later used to drive the LED bar. One A/D conversion lasts at least Hp15
70 µs. No problem, we’d say, because a 10-bit serial word is sent Nop 2
at the same time, lasting 10x26= 260 µs. Set 0, DRA wr i t e 1 4
Next, the 8 databits are transmitted. The overall timing is critical J r r 0, x hp16 X = 0, s o al way s j ump 5
as discussed further on. While the 8th databit is being transmitted, Hp16
at step 13 the A/D is already being read (voltage at ‘average’
input). Meanwhile the time for the last bit has elapsed, and the
stop bit is sent (step 14). Next, we start the A/D converter, this time In this way, 16 machine cycles are always executed, correspond-
sampling the pixel input. The measured average value is com- ing to 26 µs and a data rate of 38,400 bits/second.
pared checked against a couple of thresholds to allow the right

is u sed h ere in a stan d ard con figu ra- (2400 H z) an d th e h igh est d ata fre- be found on the Datasheets on page 61-
tion . Diod es D1 an d D2 limit its in p u t quency (approx. 1200 Hz). Remember, 62 of ou r March 1999 issu e. Th e filter
signal to about 0.4 V. Preset P2 sets the in traditional transmission technology, arou n d IC4b is a Bu tterw orth section
centre frequency to 2400 Hz, enabling a rule of thumb is that carrier frequen- which further adds to the selectivity for
the carrier reference clock to be recov- cies are at least 10 tim es h igh er th an the pixel component in the APT signal.
ered from the composite APT signal. the highest modulation frequency. This The filtered picture data represents
Th e sign al rectifier (IC1b) is an is done to facilitate extracting the mod- grey levels. It is used to charge a capac-
active 2-p h ase typ e w h ose h alf-p h ase ulation signal. The filter consists of itor, C11, via electron ic sw itch IC5a.
ou tp u t levels can be m ad e equ al by three elements: (1) low-pass R10-C8, (2) This capacitor acts as a memory device
adjusting preset P3. IC2 an d (3) Bu tterw orth section IC4b. when the microcontroller is busy per-
Alth ou gh it em p loys ju st on e IC The first is dimensioned for cut-off fre- form in g an A-D con version . Th e
and an opamp, the filter is a seven-pole qu en cy of abou t 1400 Hz. Th e secon d switch is controlled by microcontroller
typ e! Exten sive filterin g is requ ired element, says Maxim Inc., is a ‘5th order port line PB4.
becau se of th e relatively sm all d iffer- all-pole instrumentation lowpass filter with The average value of the pixel grey
en ce betw een th e carrier frequ en cy no dc error’. Its main technical data may levels is read by th e ST6 via p ort lin e

Elektor Electronics 6/99 29


H yp erTerm in al), an d set u p a d ata
rate of 38,400, 8 bits, no parity, 1
stop bit, no handshaking. N ext,
in stall JP2 on th e con verter board .
JP1 sh ou ld be set to th e ‘grou n d ’
p osition . Th e con verter sh ou ld
w rite a con tin u ou s stream of gob-
bledegook characters among which
can be read the words START!! and
‘Bild test’. If th is w orks, th e serial
lin k is okay. If n ot, d ebu g it first.
Have you fitted a socket in p osition
K2? Is you r serial cable a straight-
through typ e (n o crossed w ires)? Is
the RS232 port on your PC properly
set up?
5. Remove JP2 and install JP1 so that it
is at the side of R5.
Q u it you r com m u n ication s p rogram .
Launch the wefax or image processing
p rogram — if correctly set u p on th e
PC, th e weath er image can be seen to
build up line by line.
Figure 4. Our finished
and working prototype I M AGE P RO CE S S I N G
of the weather satel- S O F T WA R E
PB7. It is obtain ed by low-p assin g th e lite decoder. Several excellen t p rogram s are avail-
filter output in network R15-C12. able for w eath er image recep tion an d
The ST6 microcontroller (IC1) runs processing on a PC. The best known of
a p rogram w ritten to p erform qu ite a in clu d in g LEDs, ICs, electrolytic cap s these is the formidable JVFAX package
few fu n ction s qu asi-sim u ltan eou sly. and transistor T1). w ritten by Eberh ard Backesh off,
Th ese fu n ction s in clu d e A-D con ver- DK8JV. Version 7.1 of this program may
sion of the pixel grey levels, supplying AD J U S T M E N T be found on various web sites and ftp
a serial d atastream to th e PC (via T1 For th e follow in g ad ju stm en t p roce- sites (ftp.funet.fi). N ote, h ow ever, th at
and K2) and d riving a LED array (D6, dure it is assumed that you have avail- JVFAX is neither shareware nor public
D9, D10, D11). Th e inset p rovid es able a record in g of a w eath er-satellite domain — see the author ’s Copyright
essential information on the operation signal (these may be found on the web notes on page 50 of the (hefty) manual.
of the software. as ‘wave’ files). JVFAX is not an easy program to master
The power supply is fairly conven- but it excels in the number of weather-
tion al. Eith er a 9-V PP3 battery or a 1. Ap p ly th e in p u t sign al an d ad ju st satellite m od es an d stan d ard s su p -
mains adaptor may be used to supply P1 for a level of 2.3 Vpp on pin 1 of p orted . If you are a n ew bie, d on ’t
an unregulated input voltage of about IC1. expect to have JVFAX up and running
9 V dc. This is stepped down to a reg- 2. Ad ju st P2 u n til th e PLL locks on to in less than an evening.
u lated 5-V rail by a 78L05 (IC7). Th e th e 2400 H z carrier, w h en D3 w ill O th er su itable p rogram s in clu d e
negative (–5 V) auxiliary voltage for the light. WXSAT 2.4 an d SatView. Th e latter, a
TL072 op am p s is gen erated by an 3. Connect an oscilloscope to pin 1 of Win d ow s p rogram , w as w ritten sp e-
ICL7660 (IC8) in a standard application IC4 an d ad ju st P3 for best sym m e- cially for the present decoder and may
circu it. A zen er d iod e (D13) is ad d ed try of the two rectified half-waves. be found on the project diskette (order
for safety. 4. Now first set up the serial link to the code 996019-1) which also contains the
PC. Ru n a term in al em u lation or source cod e file for the ST6 microcon-
CONSTRUCTION com m u n ication p rogram (say, troller (METEOSAT.ASM). (990021-1)
The artwork layout shown in Figure 3
is th at of a com p act sin gle-sid ed PCB
accommodating all parts including the
battery. Th is board is available read y-
m ad e th rou gh ou r Read ers Services
an d kit su p p liers ad vertisin g in th is
magazine. Construction is straightfor-
w ard if you w ork carefu lly an d sys-
tem atically. In p articu lar, m ake su re
you get th e follow in g righ t: 1% resis-
tors (measure value before fitting) and
all p olarised com p on en ts (d iod es

Figure 5. Example of a
weather satellite
image received with
the decoder in combi-
nation with the
‘Satview’ program.

Elektor Electronics 6/99 31


GENERAL INTEREST

conductive plastics
Of luminescent plastics
and plastic transistors

Plastics are polymers, that


is, chains of many identical
molecules (monomers) that
are intercoupled. The rea-
son that most plastics are
isolators is that their elec-
trons are localized. Each elec-
tron is firmly fixed, as it were,
to its own atomic nucleus. This
means that the electrons, carri-
ers of the electric current, can-
not move freely in the material.
In conductive or semiconductive plastics, discovered by accident in
Japan in 1977, this is different. In these, the polymer chains have conju-
gated connections. This means that the discrete atoms are intercon-
nected alternately by a single and a double chemical bond.

D E VE LO P M E N TS p olymers.
T O D AT E Tod ay, CDT is d evelop in g flexible d is-
After con d u ctive p olym ers h ad been p lays based on PolyLEDs an d h as
d iscovered by accid en t in Jap an in already demonstrated a prototype of a
1977, research ers at th e Un iversity of p olym er d isp lay, w h ich w as d evel-
Cam brid ge in En glan d d iscovered op ed in coop eration w ith Seiko-
lu m in escen t p olym ers in th e late Ep son . It con cern s a sm all, m on o-
1980s. In lin e w ith m od ern p ractice, ch rom e d isp lay th at as yet d oes n ot
the university hived off this discovery con sist solely of p olym ers: th e elec-
trod es are m ad e of in d iu m tin oxid e
for com m ercial exp loitation to Cam -
(In Sn O 2) an d alu min iu m (Al). Never-
brid ge Disp lay Tech n ologies (CDT).
th eless, th e p erform an ce is rem ark-
Th e first lu m in escen t p olym er, able: its lu m in osity is fou r tim es as
p olyp h en yl-vin yl or PPV, is p aten ted great as th at of liqu id -crystal d isp lays
by CDT. Th e com p an y h as gran ted a (LCDs) an d d oes n ot su ffer from th e
Based on ‘Plastic chips & luminous licen ce to Ph ilip s of th e N eth erlan d s lim ited view in g an gle th at is so ch ar-
plastics’ a report from Philips Research for the commercial exploitation of the acteristic of LCDs.

Elektor Electronics 6/99


32
Th e German firm of H oech st collabo-
rates w ith Ph ilip s in th e man u factu re polyphenyl-vinyl
an d fu rth er d evelop m en t of 1 (PPV)
PolyLEDs. H oech st h as also join ed
forces w ith Un iax, an Am erican firm
in Californ ia w h ich h as p rod u ced th e H H H
first seven-segment d isplay consisting polyphenylamine
of PolyLEDs. (PANI)
N N N
Th e com p an y th at su cceed s in p ro-
ducing truly flexible displays will have
H
th e com m ercial w orld at its feet. Th e
H
n u m ber of p ossible ap p lication s of N
PolyLEDs ru n s in to th e h u n d red s. polypyrrole
N
However, the technological difficulties (PPy)
N
to market th ese ap p lication s are still a N
H
formid able obstacle. H 990039 - 11

Figure 1. Chemical structures of some


R E L E VA N T P H Y S I C S often used conjugated polymers:
Conductive or semiconductive plastics polyphenyl-vinyl or PPV; polypheny- m aterial an d d op in g it,
are p olym er ch ain s w ith con ju gated lamine (often called polyaniline) or th at is, ad d in g ch arge
double links. The first PolyLEDs were PANI; and polypyrrole or PPy. The carriers.
based on polyphenyl-vinyl (PPV). The polymers form long chains consisting
p rin cip le of th eir con d u ctivity (or, of thousands of monomers that are
rath er sem icon d u ctivity) is best illu s- coupled in tandem. Characteristic of PROCESSING
trated by the simplest polymer with a all semiconductive polymers is their In th eir origin al state,
con ju gated stru ctu re: p olyacetylen e. conjugated structure, which means sem icon d u ctive p oly-
See Figure 1. that their bonds are alternately single m ers can n ot be easily
The single bond in the conjugated and double. p rocessed . Th is is
structure is always a σ-bond, whereas becau se th e con ju gated
th e d ou ble on e con sists of a σ-bon d stru ctu re of d ou ble
an d a π-bon d , w h ich h as a d ifferen t bon d s resu lts in flat,
ch aracter. Tw o varian ts of p olyacety- th at is, a m ixtu re as in Figu re 2, th e inelastic chains. The addition of large,
lene that differ only in the locations of electron s are free to m ove alon g th e flexible sid e ch ain s—see Figure 3—
the π-bonds are shown in Figure 2. It entire chain. ren d ers th e p olym ers solven t, w h ich
could be said that these variants could This does not mean, of course, that simplifies their processing. Varying the
be merged freely. The real structure is th e m aterial itself, w h ich con sists of ch em ical com p osition of th e sid e
a mixture of the variants in which each many monomers, becomes conductive. chains enables properties such as sol-
is represented equally. Th is occu rs on ly w h en electron s can ubility, d urability and cond uctivity to
Th is h as an im p ortan t con se- h op from on e ch ain of p olym ers to be enhanced.
qu en ce: in th e case of an σ-bon d , th e an oth er. It h as been fou n d th at th is Th e great ben efit of con d u ctive
electron s form in g th e bon d are becomes possible when the chains are p olym ers is th at th e area of d evices
bon d ed to both n u clei an d th erefore in close p roxim ity of each oth er. Th e made from them is virtually limitless.
localized. Normally, this is also the case closer the chains are together, the more Conventional semiconductor technol-
w ith electron s form in g a π-bon d . m obile th e electron s becom e. Th is is ogy is h eavily in volved in m in iatu r-
Becau se of th e con ju gated stru ctu re, further enhanced by purification of the ization ; silicon , th e basic m aterial, is
em in en tly su itable in th is d evelop -
ment. The production of large devices
is, h ow ever, m u ch m ore com p licated
Figure 2. The normal chemical notation of the structure an d exp en sive, becau se th e m aterial
formula of, for instance, polyacetylene, offers two possi- u sed m u st be crystallin e. Th is m ean s
bilities. These suggest that the double bonds are local- that its lattice must not contain even
ized. In reality it concerns a mixture of the two. th e tin iest d istortion . Th e p rod u ction

2 H H H H H H H H H H H H

C C C C C C C C C C C C

C C C C C C C C C C C C

H H H H H H n H H H H H H n
990039 - 12

Elektor Electronics 6/99 33


R1 tic—see Figure 4. The electric potential
3 R3
R6
betw een cath od e an d an od e en su res
th at a con stan t stream of electron s
enters the polymer from the top. The
d rain age of electron s via th e an od e
R2 R5 creates vacan cies (h oles) in th e p oly-
R4 m er th at are m ath em atically equ iva-
x 1-x len t to p ositron s (p ositive electron s).
Th e in com in g electron s fill th ese
vacan cies so th at both h ole an d elec-
tron d isap p ear. In th is p rocess, th e
electron emits a quantum of energy in
the form of a photon.
Th e cath od e an d an od e are fabri-
intensity

cated from calcium (Ca) or indium-tin


oxid e (In Sn O 2). Th e latter m aterial is
tran sp aren t, w h ich is, of cou rse, n ec-
essary if light is to be passed. The elec-
trod es m ay be p attern ed , so th at n ot
400 500 600 700 800 on ly flat lu m in ou s stru ctu res can be
p rod u ced , bu t also com p an y logo-
wavelength (nm) 990039 - 13
types, segments of displays, and even
pixels of a display screen.
Figure 3. The addition of side chains
(R1–R6) to polyphenyl-vinyl (PPV) results manufacture of thin-
in the emission of light in all possible n er d isp lays th an is POS SIBLE
colours. Each of these colours corre- p ossible in liqu id - AP P L I C AT I O N S
sponds to a different chemical composi- crystal tech n ology. In th eory it is p ossible to p rod u ce a
tion of the side chains. Moreover, PolyLEDs ligh t-w eigh t colou r television screen
op erate w ith low from con d u ctive p olymers. Alth ou gh
(battery) voltage and th is is fu tu ristic, research ers h ave
are th erefore em in en tly su itable for alread y su cceed ed in p rod u cin g a
of silicon is tedious and requires accu- use in modern equipment. matrix display with a vertical and hor-
rately defined ambient conditions. The PolyLEDs are also very th rift. izon tal resolu tion of 100 p ixels on
larger the crystal, the more difficult its Tod ay, th e lu m in ou s flu x is of th e w h ich grap h ics images cou ld be rep -
p rod u ction becom es. Th is is n ot th e ord er of 4–8 lm W –1 (the picture tube resented.
case w ith p lastics, so th at p olym ers in a current TV receiver emits 1 lm W–1 All in itial research w as d irected at
m ay op en th e w ay to large sem icon - an d an LC d isp lay, 1.5 lm W –1. th e rem oval of tech n ical barriers, for
ductor components. Research ers aim to p rod u ce con d u c- w h ich oran ge PolyLEDs w ere u sed .
tive polymers that produce a luminous Tod ay, it is p ossible to fabricate red ,
flu x of 25 lm W –1. In com p arison , an green and blue PolyLEDs. Since these
T H E P O LYL E D in can d escen t bu lb em its abou t materials behave in a virtually identi-
Wh en an electric p oten tial is ap p lied 20 lm W–1 and a fluorescent tube about cal manner, with these three primary
across sem icon d u ctive p lastics, th ey 70 lm W –1. colours it is possible to make polymers
em it ligh t. Th is p rop erty, d iscovered A fu rth er ad van tage is th at sin ce of an y d esired colou r. Th e requ isite
by research ers at th e Un iversity of ligh t is em itted om n id irection ally, p oten tial across th e p olym er is 3–5 V
Cambridge in England, forms the basis there is no limiting reading angle. and the brightness of the emitted light
of the PolyLED.. d ep en d s on th e level of cu rren t
The PolyLED is essentially a much through the material.
sim p ler com p on en t th an a tran sistor. CONSTRUCTION A d urability of about 50 000 work-
Its ap p lication s in clu d e segm en t d is- O F T H E P O LYL E D ing hours has already been achieved.
p lays su ch as u sed in m obile tele- A PolyLED con sists of a stru ctu re of
p h on es an d backgrou n d ligh tin g in a con d u ctive p olym er san d w ich ed
liquid-crystal displays. betw een a cath od e an d an an od e on TRAN S I S TO RS ALS O
PolyLED tech n ology en ables th e a substrate of glass or transparent plas- Apart from diodes, it is also possible to
make plastic transistors from conduc-
tive p olym ers. With referen ce to Fig-
ure 5, the transistor is d eposited on a
substrate of polyimide. (1).
4 With sp in -coatin g*, th e first elec-
trode is deposited on to the substrate.
cathode This consists of a 200 nm thick layer of
p olyp h en ylam in e (p olyan ilin e or

luminescent
polymer
Figure 4. A PolyLED consists of a
anode luminous polymer sandwiched
between two electrodes with the
substrate
combination bonded to a substrate
990039 - 14 of glass or transparent plastic.
photon

34 Elektor Electronics 6/99


PAN I). Th e p olyp h en ylam in e is by ultraviolet light via the same sten- Figure 5. A plastic transis-
d ep osited in liqu id form to w h ich a
photo-initiator has been added. (2).
cil as used earlier. (7).
The final result is a plastic transistor
5 tor can be produced from
conductive polymers by a
Th e electrod e is illu m in ated by w h ich may be lin ked to oth er tran sis- step-by-step lithographic
ultraviolet light via a stencil. Owing to tors to form an integrated circuit via a process. The end result is a
the photo-initiator, the electrical resis- gate, sou rce an d d rain . Th e electrical four-layer wafer bonded to
tance of the illuminated areas increases p rop erties of th e tran sistor are d eter- a polyimide substrate.
by a factor 1010, turning the areas into mined primarily by the PTV film. (8)
isolators. Th e n on -illu m in ated areas
remain conductive. (3). [990039]
Th e electrod e is h eated w h ereby
the residue of the photo-initiator evap-
orates. (4) 1. substrate
With spin-coating, the next two lay-
ers are deposited: a 50 nm thick film of polyphenylamine
sem icon d u ctive PTV an d a 250 n m electrode
th ick film of p olyvin yl p yrrolid on e
(PPV—an isolator). (5) 2. depositing the first electrode
The second polyphenylamine elec-
trod e, to w h ich a p h oto-in itiator h as UV
been added, is deposited by spin-coat-
ing. (6)
The second electrode is illuminated

3. illuminating

isolating
conducting

4. heating

isolator

semiconductor

5. depositing semiconductor and isolator

polyphenylamine
electrode

6. depositing second electrode

UV

Figure 6. Spin-coating is a tech-


nique that enables a thin film of
one material (in liquified form)
to be deposited on to another
(solid) material.

7. illuminating
gate
* Spin-coating is a technique that enables a virtually homogeneous film of liqui-
fied material 100–200 nm thick to be deposited on to another material, The isolator
solid material, such as the substrate of a diode or transistor, is made circular semiconductor

and the resulting disc is made to rotate at very high speed. A drop of the liqui- source drain substrate
fied material is dropped on to the disc and spreads out into a thin, homoge-
electrodes
neous film. When the solvent (used to liquify the material to be deposited) has 990039 - 15
8. transistor
vaporized, the film solidifies. There are virtually no limitations to the size of sub-
strate that can be used in spin-coating. See Figure 6.
Dip-coating is a similar process in which use is made of the bond that can be
formed between substrate and film material. In this process, however, the sub-
strate is briefly immersed into the soluble polymer.

Elektor Electronics 6/99 35


MICROPROCESSORS

development system
for 68HC11F1
accepts eight different
memory devices
Motorola’s 68HC11
microcontroller is a
highly valued device
when it comes to
developing applica-
tions based on micro-
controllers. This article
present a low-cost way
for you to start creating
such applications
based on the 68HC11.
Unusually, the present
development system is
marked by a relatively
large amount of system
memory.

N ew com ers m ay w on d er abou t th e th e HC11 family. Moreover, it is easily


p u rp ose of a d evelop m en t system . obtainable.
Man y of ou r read ers, w e kn ow, From its d esign an d featu res, it is
attem p t to m ake m icrocon troller cir- obviou s th at th e 68H C11 is squ arely
cuits perform certain functions. For this aim ed at ‘h eavy ’ ap p lication s. Th e
you n eed certain ‘tools’, w h ich , d evice in tegrates an ad d ress d ecod er
depending on the case, equate to hard- and a complete bus (that is, one that is
w are an d /or softw are. Th e tw o are not multiplexed). These features allow
‘m arried ’ in w h at is com m on ly system developers (like you, we hope)
referred to as a development system. to just ad d RAM and EPRO M and yet
Over the pas few years, it has tran- have a working controller. It should be
sp ired from p u blication s in th e elec- noted, however, that ‘single chip’ func-
tron ics p ress th at th e ‘F1’ version of tion in g is on ly p ossible if you keep
Motorola’s 68HC11 family is th e most RAM size d own to 1 kBytes, and EEP-
popular. Despite the fact that it comes RO M size, to 512 bytes.
Design by J. Gonzalez in a 68-pin case, the HC11F1 is actually The 68HC11 may be crystal clocked
and A. Amaranthe on e of th e least exp en sive d evices in at up to 20 MHz. Typically, at 16 MHz it

Elektor Electronics 6/99


36
ach ieves a m em ory access sp eed of
250 n s. O f cou rse, it is p ossible to u se
low er clock frequ en cies if so d esired ,
1
an d access to p erip h eral com p on en ts
may be ‘slowed down’ with respect to
memory access (see Clock Stretching in
the 68HC11F1 documentation, Ref. [1]).

THE ELECTRONICS
Although the basic design of the board
is relatively simple, it will be adequate
for those of you who limit themselves
to assem bly cod e p rogram m in g. Th e
arch itectu re m ay also be exten d ed if
necessary.
As you can see from the circuit dia-
gram in Figure 2, th e board is bu ilt
arou n d five in tegrated circu its: a
68H C11F1, a MAX232, a 74H C139, a
memory d evice an d a voltage regu la-
tor.
In ad d ition to w h at h as been said
abou t th e 68HC11F1 in th e p reviou s
paragraphs, we now get down to busi-
ness by showing the internal structure
and device pinout in Figure 1. Of all 17
m em bers of th e 68H C11 fam ily, th e
H C11F1 version is w ith ou t d ou bt th e
best kn ow n an d best sellin g d evice in
amateur circles.
Lookin g at th e in tern al stru ctu re
you will agree with us that the 68HC11
is a fairly complex d evice. At about 10
years of age th e H C11F1 is on e of th e
you n ger m em bers of th e fam ily. It is
also one of the most powerful because
multiplexing is not used, plus a 1-kByte
RAM an d a 512-byte EEPRO M are
available on the chip. The chip is sup-
plied in a 68-pin case. The HC11F1 has
no internal RO M or EPRO M. Instead,
it can take m an y d ifferen t extern al
memory devices of impressive capaci-
ties. Finally, the HC11F1 micro contains
no fewer than four ports, a number of
w h ich can be u sed in bid irection al
mode.
The second essential part in the cir-
cuit diagram is the MAX232. This inte-
grated circu it allow s th e
board to be con n ected to Figure 1. Pinout and
a serial PC p ort (RS232). architecture of the
As w ill be d iscu ssed fu r- 68HC11F1 microcontroller
th er on , th e ‘M11’ soft- (courtesy Motorola).
ware allows you to down- devices. Arguably, p resen t d evelop men t system, it is h as
load object cod e to th e this feature is one been m od ified to allow extern al EEP-
H C11, p lace breakp oin ts, u se sin gle- of th e m ost attractive of th e d evelop - ROMs to be programmed. This is useful
step p rogram execu tion , an d d isp lay ment system described in this article. for th ose of you lackin g th e m ean s to
the contents of program variables, reg- In fact, th e m em ory d evice can be p rogram EPRO Ms. In th at case, a
isters, and lots more. an y RAM, EEPRO M or EPRO M, as 28C64 EEPROM is a perfect substitute.
Th e th ird circu it is an ad d ress long as the relevant chip comes in a 28- Th at brin gs u s to a n ew an d u n ex-
decoder type 74HC139, of which only p in DIL case. Th is in clu d es EPRO Ms p ected ap p lication of th is p roject: th e
one half is used. It supplies the RD and w ith a cap acity of 8, 16, 32 an d board m ay be u sed to p rogram EEP-
WR signals that make the bus compat- 64 kBytes, RAMs with a capacity of 8 or RO Ms in ten d ed for u se in oth er cir-
ible with ‘Intel’ components. Indepen- 32 kBytes, as well as 8 or 32-kByte EEP- cuits. O nce the external EEPRO M has
d en t ReaD an d WRite sign als are RO Ms. Th e selection of th e m em ory been p rogram m ed w ith cod e, it m ay
required for EEPRO M type 2864. d evice inserted in the socket reserved be protected against (accid ental) writ-
In the circuit diagram, the memory for IC2 is by means of two jumpers on in g by p u llin g th e WR ju m p er from
socket is sh ow n to h old a 32-kByte connector K7 (see Table 1 further on). con n ector K7. An oth er, sm aller, EEP-
RAM type 62256. However, this is just Th e softw are called ‘M11’ m ay be RO M is available in sid e th e H C11 for
an exam p le as th e socket can accom - familiar to those of you who have built semi-permanent storage of configura-
modate one of eight different memory the circuit described in Ref. [2]. For the tion data.

Elektor Electronics 6/99 37


C6 5V 5V
K9 IC6
2
K10
1
R2 D1 7805 R5
2 2
1k

4K7
K2 5V V+ 1 3
16 C1+ C4 1N4001 D2 D3
C15 C14
1 C8 IC3 3
C1–
6 14 11 47µ 47µ
RS1OUT T1IN 25V 6V8 1W3 10V
2 8 9 RXD
RS2IN R2OUT
7 13 12
RS1IN R1OUT
3 7 10 TXD CSPROG
RS2OUT T2IN
8 4 K6
C2+ C5
4 MAX232 5V
15 1
9 5
C2– 2
5 V-
5V D7 3
6 C9 C10 C11
C7 D6 4
10µ C12
10n 100n D5 5
63V
C4 ... C8 = 10µ / 63V
100n D4 6
34
K4 D3 7
28
1 42 9 D0 D2 8
PA0 PC0
2 41 10 D1 A0 10 D1 9
PA1 PC1 A0
3 40 11 D2 A1 9 20 D0 10
PA2 PC2 A1 CS
4 39 12 D3 A2 8 A0 11
PA3 PC3 A2
5 38 IC1 13 D4 A3 7 11 D0 A1 12
PA4 PC4 A3 D0
6 37 14 D5 A4 6 IC2 12 D1 A2 13
PA5 PC5 A4 D1
7 36 15 D6 A5 5 13 D2 A3 14
PA6 PC6 A5 D2
8 35 16 D7 A6 4 15 D3 A4 15
PA7 PC7 A6 RAM D3
9 A7 3 16 D4 A5 16
A7 D4
10 28 58 A0 A8 25 17 D5 A6 17
PD0/RXD PF0 A8 D5
11 29 57 A1 A9 24 62256 18 D6 A7 18
PD1/TXD PF1 A9 D6
12 30 56 A2 A10 21 19 D7 A8 19
PD2/MISO PF2 A10 D7
13 31 55 A3 A11 23 A9 20
PD3/MOSI PF3 A11
14 32 54 A4 A12 2 A10 21
PD4/SCK PF4 A12
15 33 53 A5 A13 26 A11 22
PD5/SS PF5 A13
16 52 A6 BUSY 1 A12 23
PF6 A14
17 20 51 A7 A13 24
PG7 PF7 OE WR
18 21 A14 25
PG6 22 14 27
19 22 50 A8 A15 26
PG5 PB0 RD A14/WR
20 23 49 A9
PG4 PB1 5V
21 24 48 A10
PG3 PB2
22 25 47 A11
PG2 PB3 R12
23 26 46 A12 5V
PG1 PB4

10K
24 27 45 A13
PG0 PB5
25 44 A14 R13 K7
K3 PB6 10K WR
26 43 A15
PB7 A14/WR
5V 68HC11F1 A14
1 18 68
XIRQ VREFH BUSY
R10 R9 R8 R7 K5
5V A15
10k

10k

10k

10k

8 59 10
4XOUT PE0 IC5a
61 9 R11
PE1 DMUX

10k
63 8 1 4
PE2 0
JP1 5V 65 7 5
PE3 1
2 60 C13 2 6
MODB PE4 6 2
0 0
3 62 5 3 1 G3 7 5V
MODA PE5 3
10µ 5V
17 64 4 63V
RES PE6
19 66 3
IRQ PE7
4 1 16
E
5 67 2 IC5
R/W VREFL IC5 = 74HC139
5V 8
5V EXTAL XTAL
K8
6 7 1
R6 R1 R3 10 5V
MC33064
IC4 2 10M
10k

100Ω

9
IC5b
X1 8
DMUX
1 WR 7 15 12
RES 0
MC33064 S1 C1 C2 RD 6
1
11
IRQ 5 14 10
RESET 0 0 2
27p 8MHz 27p
1 3 3 R/W 4 13 1 G 3 9
3
2 RESET E 3
2
1

990042 - 11

Figure 2. The core of the circuit diagram is obviously


Note: to be able to pro- the 68-pin microcontroller type 68HC11F1. p riority. It is, th erefore, p er-
gram an external EPROM fectly possible to keep work-
you will need an EPROM in g w ith ou t recon figu rin g
programmer. The M11 utility is only capa- RAM allow s you to w ork mu ch faster CSPROG, provided you limit yourself
ble of programming the EPROM area w h en th e am ou n t of cod e starts to to a memory area with the same size as
available in certain HC11 microcontrollers exceed a few kilobytes. Fin ally, the memory d evice used . By contrast,
(not including the HC11F1). alth ou gh th e EEPRO M is th e m ost CSPROG h as to be m od ified if you
Given th e fact th at H C11F1 h as an exp en sive memory op tion for a given install a second memory device on the
in tern al RAM of 1 kBytes, m ost memory capacity, it is the most versa- extension connector.
tu rn key, stan d alon e or oth erw ise tile. For most, if not all, amateur use, an If you are w orkin g w ith th e M11
‘closed ’ ap p lication s w ill take an 8-kByte EEPRO M w ill h ave en ou gh softw are, you d on ’t n orm ally h ave to
EPRO M or an EEPRO M in p osition capacity. w orry abou t th e m em ory tech n ology
IC2. By con trast, w h en softw are is Th e m em ory d evice is d ecod ed by u sed . M11 au tomatically p rovid es th e
u n d er d evelop m en t, it w ill often be th e CSPROG sign al su p p lied by th e typ e of w rite action requ ired for th e
requ ired to load m an y d ifferen t ver- PG7 pin on the controller. After a reset, m em ory m ap d eclared in th e m en u
sions of the program, set breakpoints, CSPROG covers a d efau lt area of hc11_set. Th ere m ay be ‘bord er ’ con -
etc. Th is obviou sly requ ires a RAM or 64 kBytes. Th is d oes n ot con flict w ith flicts, h ow ever, if cod e exten d s over
EEPRO M installed in position IC2. other memory elements because these, tw o m em ory elem en ts of d ifferen t
Wh ile d ebu ggin g softw are, th e being internal to the 68HC11, are given tech n ology an d occu p yin g ad jacen t

38 Elektor Electronics 6/99


990042-1 COMPONENTS LIST
3 K6

H1
H2

R3
K5 Resistors:
S1 C11 K8 R1 = 10MΩ
R2 = 4kΩ7

IC5
R8 R9 R4 R3 = 100Ω
R6 R10 C13 R4 = SIL array, 8 x 10kΩ
X1 K3
R5 = 1kΩ

IC2
990042-1
C2
Capacitors:
K2 C1
R1 IC1 C1,C2 = 27pF
C4-C8, C11,C13 = 10µF 63V
C6
C4 R7 C9 C9 = 10nF
JP1 C10,C12 = 100nF
C10 C12 R12
K7
IC4 R11 C14 = 47µF 10V
K9
D2 C15 = 47µF 25V
C8
IC3

C15

R5
D1 Semiconductors:
R2

C14 K10 D1 = 1N4001


C5
C7
D2 = zener diode 6.8V 1.3W

H3
H4

K4
D3 D3 = LED
IC6
IC1 = 68HC11F1 (Motorola)
IC2 = 62256 (RAM)
IC3 = MAX232 (Maxim)
IC4 = MC33064 (Motorola)
IC5 = 74HC139
IC6 = 7805

Miscellaneous:
JP1 = 4-way SIL pinheader
K2 = 9-way female sub-D con-
nector (socket), PCB mount
K3 = 2-way pinheader with
jumper
K4,K6 = 26-way boxheader or
dual-row pinheader
K5,K8 = 10-way boxheader or
dual-row pinheader
K7,K9 = 5-way SIL pinheader
K10 = mains adaptor socket
S1 = pushbutton, 1 make con-
tact
(C) ELEKTOR
X1 = 8MHz quartz crystal
990042-1
68-pin PLCC socket
PCB, order code 990042-1 (see
Readers Services page)
Disk, order code 996005-1 (see
Readers Services page)

990042-1

Figure 3. Component
mounting plan and
track layouts of the
double-sided through-
plated board supplied
through the Readers
Services.

ad d ress areas (rare th ou gh ). If th at taneously programming several mem- tors: K4, K5, K6 and K8. In most cases,
happens, a small area of about 40 bytes ory devices of different technology. only K4 and K5 will be used.
should be left free before the border. In N ote: the M 11 software assumes that K4 is for th e free bin ary in p u t ou t-
th is w ay, you force th e assem bler to RAM is available in areas not declared in put lines of ports A, D and G, while K5
separate the relevant memory blocks in the ‘hc11_set’ menu. covers port E. The inputs that may be
the S19 output file. This may look like u sed to con vey an alogu e sign als are
a sh ortcom in g, bu t rem em ber th at THE CONNECTORS sep arately rou ted (K5 is very close to
there are few utilities capable of simul- Th e card h as fou r exten sion con n ec- p ort E). Th e referen ces u sed by th e

Elektor Electronics 6/99 39


N ext u p are th e
Figure 4. Our finished
4 prototype of the
sockets for IC2, IC3
an d IC5. If you
board. Look carefully en visage frequ en tly
at the positioning of ch an gin g th e m em -
IC1 and notice the ory d evice in p osi-
bevelled edge on the tion IC2 you m ay
IC socket.
consider fitting a ZIF
socket (zero in ser-
tion force) or, if th at
is too exp en sive, a
su p p ly volt- socket with turned pins.
age of abou t Con stru ction is fin ish ed by fittin g
8 V ‘bor- the boxheaders or pinheaders and the
row ed ’ from RS232 connector.
th e h ost cir-
cu it (if avail- Soldering
able, of course). With proper soldering, a board like this
LED D3 acts as on e sh ou ld last more th an 20 years. If
a p ow er on /off you are not an experienced electronics
indicator. constructor then you are likely to apply
Th ose of you too much solder.
w ith an eye for The solder iron used should have a
d etail in sch emat- fin e tip an d a p ow er ratin g of abou t
ics w ill n ot h ave 30 watts. First heat the solder pad and
failed to notice that the wire in it, then apply a little solder,
w e h ave n ot yet w ith d raw th e sold er w ire, an d keep
talked about IC4, an h eatin g th e join t for 2 to 3 secon d s.
MC33064 from Then remove the tip and let the solder
Motorola. Th is ch ip solidify.
acts as a low-voltage
(‘brown-out’) detector TH E S E RI AL CAB LE
for au tom atic con trol Th e cable th at lin ks th e d evelop m en t
of a m icrop rocessor system to th e PC is of th e ‘straigh t-
reset lin e. Its obviou s through’ type, that is, it has no crossed
fu n ction is th at of a wires. Although such cables are avail-
analogue-to-d igital converter w atch d og, m on itorin g able read y-m ad e at very low p rices,
(ADC) are also routed to K5. Short links th e su p p ly voltage level you may still want to make one your-
should be used to keep noise levels as and supplying a reset pulse when the self from a len gth of flatcable term i-
low as possible. level drops below 4.6 V. n ated w ith a 9-w ay su b-D socket
Each p ort of th e H C11 m ay be (female connector) at one side, and a 9-
em p loyed in bin ary in p u t/ou tp u t CONSTRUCTION w ay su b-D p lu g (m ale con n ector) at
m od e an d /or it m ay be cou p led to a The artwork (copper track layouts and the other. Care should be taken in the
special interface: timer for port A, ser- component mounting plan) of the PCB fitting of the connectors to the cable —
ial links for port D, and ADC for port E. designed for the 68HC11 development look very atten tively at th e p in n u m -
For certain ap p lication s, you m ay board is shown in Figure 3. This circuit bers p rin ted on th e con n ector p arts
w an t to h ave an extern al m em ory or board is double-sided, through-plated before clam p in g th em togeth er in a
an in terface com p on en t d esign ed to and available ready-made through our vise. Th e w h ole exercise of m akin g
acts as a lin k to a microcon troller bu s. Readers Services. you r ow n cable m ay n ot be w orth -
In that case, it is possible to use the bus The board is populated in the usual while, however, as the two connectors
sign als gath ered on K6, an d th e bu s manner. In this case, however, it is rec- m ay cost m ore th an a read y-m ad e
control signals gathered on K8. om m en d ed to start by fittin g th e 68- shielded cable bought from a computer
Next, there are two further options: w ay squ are socket for th e m icrocon - store.
u se ‘trad ition al’ ad d ress d ecod in g, or troller (position IC1). The orientation of Th is brin gs u s to the moment
pick from port G those pins that could the socket on the board is indicated by supreme, th e lon g-aw aited m om en t
be employed as ‘chip selects’. The lat- a bevelled edge. Make absolutely sure when the home constructor can put a
ter solution is to be preferred but only if you get this right because any error at feath er in h is cap , or th e d read ed
the relevant port G pins are not in use th is p oin t h as d ramatic con sequ en ces moment when nothing seems to work
alread y. Th e ad van tages: less w irin g — th e MC68H C11 w ill be fitted th e at all.
(but a bit more software) and the pos- w ron g w ay arou n d ; it m ay be d am -
sibility to ‘slow d ow n ’ certain p in s to aged an d th e circu it w ill n ot w ork at FIRST TEST
access slow com p on en ts or u n its (for all. An even bigger problem, however, is Th e step s below d escribe h ow th e
exam p le, a bu s-con n ected LCD m od - to rem ove th e PLCC socket from th e board is taken into service.
ule). board. Doing so may cause damage to ✓ Power the board without the expen-
The last component to be discussed the board and eventually force you to sive parts fitted (HC11, memory, but
is voltage regu lator IC6 in th e p ow er have wreck the whole socket with pliers with th e MAX232 in stalled in p osi-
supply section. The raw input voltage an d th en extract th e p in s on e by on e. tion IC3. Verify the presence of + 5 V
is supplied by a mains adaptor with an All w ith ou t d am agin g th e board , of at all the relevant IC socket pins, and
output voltage between 9 and 12 V dc. course! th e p resen ce of th e RS232 voltages
Con n ector K9 on th e board (close to Cap acitors C9 an d C10 are p refer- (ap p rox. + 10 V an d –10 V at p in s 2
th e m ain s ad ap tor socket) allow s th e ably fitted at th e sold er sid e of th e an d 6 resp ectively of th e MAX232).
board to work on a separate regulated board . N ext, fit th e low-p rofile p arts. Obviously, the power indicator LED

40 Elektor Electronics 6/99


should light. sequ en ce d oes n ot ap p ear at it all in Windows Explorer.
✓ Switch off th e su p p ly voltage, th en ad d resses 8100, 8200, 8400, 8800, After d ou ble clickin g on an LST
install the HC11 and (if desired) the 9000, A000 or C000. At each of these (list) file, Win d ow s Exp lorer w ill ask
memory d evice in th eir sockets. Fit addresses, perform a write test using you which application it should open.
two jumpers on pinheader JP1. This d ifferen t valu es every tim e, an d at Select Notepad from the list. Windows
causes the MODA and MO DB lines least once the value $55 followed by Exp lorer w ill create a lin k w h ich is
to be p u lled to grou n d an d selects $AA. m em orised an d u sed for all files w ith
bootstrap m od e (in test m od e, th e th e exten sion .LST. Do th e sam e w ith
Talker performs this mode selection Testing large-scale memory access to one file having the extension .ASC, and
by means of software). external memory on e .S19 file if you w an t to be able to
✓ Fit a jumper on K3, allowing a Talker Load the program Second e.S19 (path: read these, too. Next, for ASC files you
to employ XIRQ (of extra interest for C:\m 11d isk\sam p les\F1) an d its sym - will want to see the assembler pop up
interrupt-based programming). bols file Seconde.LST. Display the pro- besid es Notep ad (th e ch oice betw een
✓ Install the cable between the RS232 gram variables by w ritin g 100 101 103 ed itor an d assem bler is as follow s:
p ort on th e PC an d th e d evelop - 105 107 into the memory address areas. right-click the mouse > menu local).
m en t board (9-w ay serial lin k). Once you have loaded the symbols file, Th is m ay be a bit com p lex. Men u
Power up the board. th e n am es of th e variables sh ou ld Display -> option -> file types (locate
✓ Launch the M11 software on the PC. ap p ear. Click on PC, en ter 8000, click ASC and place checkmark) -> modify
✓ Look at the two ‘set’ menus: on ‘*’ at th e PC sid e (d isassem blin g). -> new -> write ‘assembler ’ in the title
✓ In the serial_set menu, most d efault N ext, verify th at th e p rogram is p re- line (above) and
values will be okay. You may have to sen t in th e extern al m em ory (qu it by
make some ad justments to account ESC). c: \ m11di sk\ asmhc11. EXE %1; x
for the quartz crystal frequency used Start a stop w atch or look at you r
on the board. watch and do ‘Go’. From time to time, in the command line.
✓ In the hc11_set menu, select FE00 to press the ‘R’ key to refresh the display Finally, provide a link between M11
FFFF for th e H C11 EEPRO M, an d w ith ou t h altin g th e p rogram . In th is and its working directory, for example,
FF0 to FF0 (yes, a d u mmy ad d ress) w ay, you can verify th at th e SEC an d samples. Win d ow s Exp lorer offers a
for the HC11 EPROM because there SEC_BCD variables ‘tick’ like seconds. very sim p le m eth od to create su ch a
is no such device! Finally, enter 8000 link: click on M11.EXE and drag it into
to 9FFF for th e 28Cxx if IC2 is a Testing w rite access to Port A and th e fold er called samples. N ext, righ t-
28C64. Altern atively, stick to th e Port G. click on M11.EXE to access its Proper-
default range 8000 to 8000 if IC2 is a Load th e p rogram Led F1.S19 (p ath : ties. Select and set the following: close
RAM. C:\m11disk\samples\F1) and its symbol on exit, full screen, low idle sensitivity,
✓ From th e Men u select file LedF1.LST. Display the values 1000 no screen saver.
(re)start= > file.BO O -> HC11. and 1002 in the address area. The porta Note: if you set up a link between M11
✓ Type c:\m11disk\m11\TKF1XTST.BOO an d portb sym bols w ill be d isp layed . and its working directory, you have to leave
an d th en p ress Retu rn . Th is selects Next, proceed with the same sequence the ‘working directory’ line in the Program
a Talker for th e F1 version emp loy- as d iscu ssed w ith th e p reviou s p ro- Properties sheet empty. In this way, the
ing XIRQ and auto-switching in test gram. If you have an oscilloscope or a default working directory is the one you are
mod e. When the software prompts frequ en cy m eter available, th en th e in when running Windows Explorer.
you to d o so, reset th e system by level ch an ges on th e p ort ou tp u ts are Once set up, all this will also function
actuating push-button S1, then press easily m on itored . If you d o n ot h ave from the desktop, so you can choose any
Retu rn . If M11 d isp lays ‘Waits for su ch equ ip m en t, in sert a breakp oin t utility you want (see the directory
ech o’ or ‘bad ech o’, read th e rele- into the loop and measure the port line \M11DISK\Win95 for more information).
vant help notes (in this menu and in levels with a voltmeter. The files with the extension .LST help
serial_set). Everyth in g is all righ t if you locate assembly errors (if there are any,
M11 displays a single line with ‘OK’. THE M11 of course). An LST file also provides a table
In fact, M11 ech oes th e rep ly C O N T R O L S O F T WA R E of all symbols defined for the assembly
received from th e PC. Th e Talker is The M11 software utility and the pro- process.
then safely stored in RAM. gram exam p les d iscu ssed above are The assembler will only work if two
✓ Launch the communication with the supplied on a diskette with order code files, offset.ASC and codes.ASC, are pre-
Talker (9,600 baud if the HC11 runs 996005-1. This diskette may be ordered sen t in th e cu rren t d irectory (th e on e
at 8 MHz). If everything works as it from ou r Read ers Services. Altern a- you are working in).
sh ou ld , five m em ory areas w ill be tively, it may be included in a kit if you M11 does not work on a networked
displayed (upper left) plus the HC11 bu y th e p roject from a kit su p p lier computer and has to be used with the
registers (u p p er righ t). Th e H C11 advertising in this magazine (Stippler, ‘fu ll screen ’ op tion en abled in Win -
functions normally. If external mem- Viewcom or C-I Electronics). The basic dows 95.
ory is n ot available, sw itch off th e op eration an d featu res of th e M11 N ote: the full-screen mode still allows
system, insert the memory device in package are discussed below. you to return to Windows — simply press
its socket and restart. M11 stores the Alth ou gh it ru n s u n d er DO S, M11 Alt-TAB.
system configuration in M11.TXT. d oes p rovid e a grap h ic u ser in terface O n slow PCs, or w h en u sin g h igh
✓ N ow verify access to th e extern al based on (sim p le) w in d ow s an d th e d ata sp eed s on th e RS232 p ort (say,
memory. Display $8000 in a memory mouse. If you are conversant with the 38k4), th e serial lin k m ay get over-
address area (upper left), click in the Windows Explorer, it is possible to link load ed or it m ay n ot fu n ction at all,
correspond ing d ata area, and write th e assem bler an d ed itor ap p lication despite the ‘low idle sensitivity ’ you set
40 41 42 43 44 45 46 47. If this works, programs to source code files, the editor earlier on in the program Properties. If
the equivalent ASCII characters @ A to list files, and M11 itself to a working this happens, restart the PC and select
B C D E F G will be displayed to the directory. With these links in operation, MS-DO S mode. Similarly, because the
righ t. Click on ’*’ n ext to 8000 an d you can w ork m u ch faster: p rogram sp ecial op eration of th e w atch d og
verify that this character string is not assem bly/ed itin g by righ t-clickin g on resu lts in a rath er h igh w orkload on
repeated anywhere else. By using a the mouse. th e PC, it d oes n ot w ork very w ell
secon d area, also m ake su re th is Follow this proced ure to configure under Windows 95.

Elektor Electronics 6/99 41


M11 d ow n load s a sm all u tility Th ose of you w h o h ave th e p reviou s tains the external EEPROM addresses,
called Talker in to th e H C11 w h en th e version of M11 (version found on pro- so it will be too long. M11 will propose
micro runs in bootstrap mode. The ser- ject disk supplied for ‘68HC11 Emula- to rewrite a default version of this file.
ial lin k is em p loyed for th is fu n ction . tor ’) should note that new Talkers are You h ave to accep t th is an d review
Next, the Talker provides access to the in clu d ed (version s for K1/K4 version s you r system con figu ration in th e tw o
memories and registers, which, in turn, of th e 68H C11, th ese are 84/80-p in set menus.
allows M11 to create ‘debug’ functions d evices w ith 1-Mbyte m em ory Note: each project in its own folder will
and program all of the HC11’s internal ad d ressin g cap ability an d on -ch ip have its very own file M 11.TXT. Each of
m em ories (RAM, EEPRO M or PWM). these may need to be reviewed.
EPRO M). Th e board d escribed h ere emp loys
In principle, M11 can adapt itself to P RO GRAM M I N G a Talker called TKF1XTST.BO O
all version s of th e H C11 m icrocon - E XTE RN AL E P RO M S (ju m p er fitted betw een XIRQ an d
troller (except the D versions which do Some h elp p ages h ave been mod ified RXD). Although this Talker switches to
n ot h ave su fficien t in tern al memory), from the February 1997 article (Ref. [2]). test mode to provide access to external
in all functional mod es and with very A few simple suggestions are given memories, it does not change the vec-
modest cabling requirements. For addi- for experiments with the watchdog. tors set up by the bootstrap mode.
tion al in form ation on th e M11 soft- O n ce u p d ated from an old er ver- Th e com m u n ication sp eed u sed
w are, p lease con su lt th e article sion, M11 will pop up an error message w ith th is Talker is 19,200 bits/s w h en
‘68HC11 Emulator ’ (Ref. [2]). ‘size problem with file M11.TXT’. Actu- using a 16 MHz quartz crystal (or 9,600
Updating M11 from an older version ally, th is con figu ration file n ow con - at 8 MHz, 14,400 at 12 MHz).
Given its arch itectu re, th e H C11F1
w ill ru n w ith m ost Talkers for th e A1
and E1 versions of the micro. So, if you
require a fairly special Talker not specif-
Table 1. Jumper functions (K7) ically geared to the F1, it is usually pos-
The table below shows the jumper positions on 5-way pinheader K7 as a function of the sible to p ick on e for th e E1 or A1 an d
memory device type fitted in position IC2. Pin 1 of the pinheader is marked by a bev- alw ays h ave th e in stru ction
elled edge. LDS #$3FF at th e start of you r p ro-
gram.
1–2 2–3 3–4 4–5
EPROM 8 K (2764) – – – – M I S CE LLAN E O U S
EPROM 16 K (27128) – – – – Quartz crystal frequency for the HC11
EPROM 32 K (27256) – X – – At a clock of 16 MH z, th e m em ory
EPROM 64 K (27512) – X – X access frequency is 4 MHz or 250 ns. As
EEPROM 8 K (28C64) X – – – a rule of thumb, the access time speci-
EEPROM 32 K (28256) X – X –
fied for th e m em ory d evice h as to be
about half the memory access time. So,
RAM 8 K (6264) X – X –
a sp ecification of 125 n s is requ ired
RAM 32 K (62256) X – X – w h en a 16-MH z crystal is u sed , an d
X = jumper fitted 250 ns (maximum) when you clock the
– = no jumper fitted micro at 8 MHz. This last value allows
m an y cu rren tly available m em ory
EPROM 2764 / 27128 EEPROM 2864 devices to be used.
V PP 1 28 VC C NC 1 28 VC C N ote: often , m em ory d evices con -
A12 2 27 PGM A12 2 27 WE tin u e to w ork ju st fin e at access times
A7 3 26 NC (A13) A7 3 26 NC w ell below th eir sp ecification . Th eir
A6 4 25 A8 A6 4 25 A8
cu rren t con su m p tion m ay in crease
A5 5 24 A9 A5 5 24 A9

A4 6
2764
23 A11 A4 6
2864
23 A11
beyond specified limits, however, rais-
A3 7 (27128) 22 OE A3 7 22 OE
in g th e d evice temp eratu re an d cau s-
A2 8 21 A10 A2 8 21 A10 ing erratic behaviour of the memory.
A1 9 20 CE A1 9 20 CE

A0 10 19 O7 A0 10 19 I/O7
Using the assembler to program EEP-
O0 11 18 O6 I/O0 11 18 I/O6
ROMs for other applications
O1 12 17 O5 I/O1 12 17 I/O5

O2 13 16 O4 I/O2 13 16 I/O4
K7 It is possible to generate an S19 file con-
GND 14 15 O3 GND 14 15 I/O3
1
WR tain in g any cod e an d em p loy th e
A14/WR assem bler ’s FCB, FDB or FCC d irec-
A14
tives at th e en d of an O RG statem en t
RAM 6264 / 62256
EEPROM 28256 EPROM 27512 / 27256
A14/A15
which is offset with respect to the base
(NC) A14 1 28 VC C (VPP) A15 1 28 VC C ad d ress of th e m em ory d evice on th e
A15
A12 2 27 WE A12 2 27 A14 HC11 board.
A7 3 26 A13 (CS2) A7 3 26 A13
990042 - 14 (990042-1)
A6 4 25 A8 A6 4 25 A8

A5 5 24 A9 A5 5 24 A9

A4 6
62256
23 A11 A4 6
27512
23 A11
References:
(6264)
A3 7 22 OE A3 7 22 OE/VPP (OE)
(27256)
A2 8 28256 21 A10 A2 8 21 A10 [1] Motorola: Microcontrollers 68HC11,
A1 9 20 CE (CS1) A1 9 20 CE 68HC12, 68HC16 & M PC500 Families
A0 10 19 I/O7 A0 10 19 O7
(CD-RO M)
I/O0 11 18 I/O6 O0 11 18 O6

I/O1 12 17 I/O5 O1 12 17 O5

I/O2 13 16 I/O4 O2 13 16 O4
[2] 68HC11 Emulator, Elektor Electronics
GND 14 15 I/O3 GND 14 15 O3 February 1997, pages 22-27.
990042 - 15

Elektor Electronics 6/99 43


ROTKELE )C( PC2 992035-1 1-530299 COMPONENTS LIST
IC2 PC1 IC1
C2 C3
Capacitors:
C6 C4 C1 = 100nF
C5 C2 = 22µF 10V tantalum bead
C1
C3-C6 = 4µF7 10V tantalum bead

Semiconductors:
K1 IC1,IC2 = DS2107 (Dallas
Semiconductor)

Miscellaneous:
50-way socket, IDC (for flatcable
connection).

(C) ELEKTOR 992035-1

Figure 4. The single-sid ed b oa rd d esigned for the SCSI term ina tor. Grea t c a re is req uired
in sold ering!

trac k layout and c omponent mounting b oa rd . As with the SMA ICs, the fine c a se, g rea t c a re should b e ta ken to
p la n a re g iven in Figure 4. This PCB is d eta il of the c op p er tra c ks req uires a p revent a ny p a rt or c op p er tra c k
not a va ila b le rea d y-ma d e throug h stea d y ha nd , a low-p ower sold ering touc hing the c ase.
Elektor Elec tronic s’ Rea d ers Servic es. iron with a sma ll b it, a nd g ood eye- (992035-1)
The two SMA (surfac e-mounted assem- sight. Note that pin 37 is not connected
b ly) ICs a re c a refully sold ered to the to g round (the c op p er ‘fing er’ is very Literature:
underside of the board. As shown, the c lose to the ground plane). [1] Produc t & Applic ations handbook 1995 –
other p a rts g o to the top sid e. Do not The pins that make up the other c on- 1996, Unitrode, Merrim ac k, USA.
forg et the wire links, they a re ea sily nec tor row (pins 1 through 25, exc ept [2] 1998 Short From Catalog, Dallas Sem i-
overlooked! pin 13) are joined with a horizontally c onduc tor, Dallas, Texas, USA.
One c ontac t row of the 50-way soc ket running wire which is soldered to ground [3] SCSI, the ins and outs, Elektor Elec tronic s
(pins 26 through 50) is soldered direc tly on the board (see c irc uit diagram). (Publishing), ISBN 905705-44-0.
to the trac ks at the c opper side of the If the b oa rd is fitted into a meta l p lug

CORRECTIONS
& updates
Evaluation System for 80C166 gested solutions are (1) to use a 40-MHz bus K1. Likewise pin 3 of D9 is connected
(parts 1 and 2) crystal oscillator module, (2) use a differ- to pin 3BC via bus K1. The correct con-
March & April 1999, 990028 ent 40-MHz crystal or (3) adapt the value nections are shown in the illustration.
of C18 and C19 until oscillation occurs at
Errors in Components List the third overtone. Development System for
IC9 and IC10 should be type 74HC573, not The battery may be a 3.6-V NiCd type, but 68HC11F1
HCT573. note that this is very slowly charged by the June 1999, 990042
C1 and C2 should be 10µF 16 tantalum MAX690. A better solution is to use a Lithi- JP1 is a simple jumper. In the text and parts
bead. um battery. list, it is erroneously referred to as K3.
R20 should be an 8-way SIL array, value The circuit diagram does not make it clear Part K3 is a 4-way SIL pinheader. In the text
4kΩ7. how the serial connection is made via D9. and parts list, it is erroneously referred to
The crystal frequency mentioned with C18, Pins 2 and 3 of this as JP1
C19 should be 40MHz, not 100MHz. connector 10µ
5V6
10µ R4 is erroneously listed as a SIL array with
IC3, MAX690 should be listed as MAX690 should not be a value of 10kΩ. The PCB however only
11B
(BATT), not MAX690 (I/O) connected D9 10A accommodates eight discrete resistors.
TxD1 and 1
10BC
14BC
These are numbered R4 and R6-R12.
Miscellaneous RxD1 (i.e. 6 15BC Resistor R13 in the circuit diagram equals
2 2BC
Pull-up resistors R1-R4 need not be mount- the TTL 7 R4 on the PCB.
ed with the serial channels. side of the 3
8
3BC

When a 40-MHz crystal is used for X1, it MAX232), 4 PC-Controlled Model Railway:
may oscillate at the fundamental frequen- but to the
9
5 EEDTS Pro
cy (13.333 MHz) instead of the third over- other June 1999, 990082-2
tone. If this happens the system baudrate (RS232) side of On page 60, the text references t S3, D1 and
990028-11
will not be correct and the serial commu- the MAX232. Pin 2 S4 should read S2, D2 and S1 respectively.
nication will fail to work as described. Sug- of D9 is therefore connected to pin 2BC via

12 - 10/99 Elektor Elec tronic s EXTRA —————————————— PC TOPICS


CORRECTIONS
& updates
EVALUATION S YSTEM FOR not be mounted with the se- MAX690. A better solu-
80C166 ( PARTS 1 AND 2) rial channels. tion is to use a Lithium 10µ
5V6
10µ

March & April 1999, 990028 When a 40-MH z crystal is battery.


used for X1, it may oscillate The circuit diagram 11B
10A
Errors in Components List at the fundamental frequen- does not make it D9
10BC
IC9 and IC10 should be type cy (13.333 MH z) instead of clear how the seri- 1 14BC
74H C573, not H CT573. the third overtone. If this al connection is 6 15BC
C1 and C2 should be 10µF happens the system baudrate made via D9. Pins 2 2BC
16 tantalum bead. will not be correct and the 2 and 3 of this 7
R 20 should be an 8-way SIL serial communication will fail connector should 3 3BC

array, value 4kΩ7. to work as described. Sug- not be connected 8


4
The crystal frequency men- gested solutions are (1) to TxD 1 and R xD 1
9
tioned with C18, C19 use a 40-MH z crystal oscilla- (i.e. the TTL side 5
should be 40MH z, not tor module, (2) use a differ- of the MAX232),
100MH z. ent 40-MH z crystal or (3) but to the other
IC3, MAX690 should be list- adapt the value of C18 and (R S232) side of the
ed as MAX690 (BATT), C19 until oscillation occurs MAX232. Pin 2 of D 9 is 990028-11
not MAX690 (I/O) at the third overtone. therefore connected to pin
The battery may be a 3.6-V 2BC via bus K1. Likewise
Miscellaneous NiCd type, but note that this pin 3 of D 9 is connected to rect connections are shown
Pull-up resistors R 1-R 4 need is very slowly charged by the pin 3BC via bus K1. The cor- in the illustration.

D EVELOPMENT S YSTEM FOR to as JP1. PC-CONTROLLED MODEL


68HC11F1 R 4 is erroneously listed as a RAILWAY: EEDTS PRO
June 1999, 990042 SIL array with a value of June 1999, 990082-2
10kΩ. The PCB however O n page 60, the text refer-
JP1 is a simple jumper. In only accommodates eight dis- ences to S3, D 1 and S4
the text and parts list, it is er- crete resistors. These are should read S2, D 2 and S1
roneously referred to as K3. numbered R 4 and R 6-R 12. respectively.
Part K3 is a 4-way SIL pin- Resistor R13 in the circuit di-
header. In the text and parts agram equals R 4 on the
list, it is erroneously referred PCB.

BASIC S TAMP PROGRAMMING should be taken directly to A batterypack consisting of voltage regulator to be re-
COURSE (1) the Vin pin of the Stamp four 1.5 V batteries should placed by a low-drop type
Septem ber 1999, 990050-1 module. The circuit diagram be used instead of the 9-volt like the 4805.
The positive battery voltage and PCB are modified as battery originally indicated.
behind the on/off switch shown in the illustrations. This also requires the 7805

5V
2
S2
1
-
H2

6 Bt1
2 ROTKE
Sout 1 24 Vin +
7
Sin 2 23 K1
3 IC2 D1
ATN 3 22 R1 K5 K4
G

8 + +
C2 4 21
4 P15
P0 5 20 P15 P14
9 0 S1 P13
100n P1 6 BASIC 19 P14
C3 C4 P12
5
P2 7 STAMP 18 P13 P11
C1 K2 P10
P3 8 II 17 P12 P9
P4 9 16 P11 P8
100n P7
1-050099
P5 10 15 P10 P6
IC1
P5
P6 11 14 P9
P4
P7 12 13 P8 P3
P2
990050-1 P1
S2 S1
P0 +
C2 C1 Vin K3 K6
5V
K7
IC2
H1

K1 4805 R1
Bt1 2k2
C3 C4
9V D1

47µ 1µ
40V 25V

Elektuur 2/97 37
GENERAL INTEREST

Titan 2000
Part 5: half-bridging
two single amplifiers

In the introduction to
Part 1 it was stated
that the Titan 2000
could deliver up to
2000 watts of ‘music
power’, a term for
which there is no stan-
dard definition but
which is still used in
emerging markets.
Moreover, without
elaboration, this state-
ment is rather misleading, since the reader will BRIDGING:
P RO S AN D CO N S
by now have realized that the single amplifier Bridging, a technique that became fash-
cannot possibly provide this power. That can ion able in th e 1950s, is a w ay of con -
n ectin g tw o sin gle ou tp u t am p lifiers
be attained only when two single Titan ampli- (valve, transistor, BJT, MOSFET, push-pull,
complementary) so that they together
fiers are linked in a half-bridge circuit. The true con trol th e p assage of an altern atin g
power, that is, the product of the r.m.s. voltage current through the loud speaker. This
article d escribes wh at is strictly a h alf-
across the loudspeaker and the r.m.s current brid ge configuration, a term not often
flowing into the loudspeaker, is then 1.6 kilo- used in audio electronics. When audio
en gin eers sp eak of brid ge mod e, th ey
watts into a 4-ohm loudspeaker. m ean th e fu ll-brid ge m od e in w h ich
four amplifiers are used.
In early tran sistor au d io p ow er
am p lifiers, brid gin g w as a m ean s of
achieving what in the 1960s were called
Design by T. Giesberts public-address power levels as high as,

Elektor Electronics 6/99


46
1

T35

T39

T36

T40

T37

T41

T38

T42
T29

T32

T31

T34
T30 T33

R39

R42

R36

R40

R37

R43

R41

R44
R38
R45

R49

R46

R50

R47

R51

R48

R52
- +
C43

C46

C44

C47

C45

C48
R79

R74
R75
0 0

LS+
++

--
R78
P-LS

C42
T27 T28
T
+5V I

D15
D14
R53
C28 C34 LS+ C41 C35

C15

T24

IC2
*
R56

R65
LS-

R76
C27

L1
R33 R35

R11
990001-1
R77
T21

LS-
IC1 R34 T18 C19

D17
C17 T15 C23

JP2
C21

D19
R24 P3
RE4 R27

R30

R10

T25
C24

C36
T16 C26 T19

1R
K1
C29 D10 D13

T50
C14
T46 R25 R31 R32 R28
R57

R66
C37
C30

T22

C33 T17 C6 R8 T20 C40


R62

R71
C3
D9

R9

D12
R26 RE3 C22 R29

P2
C20

D16
R18 JP1 C7 R20

LS+

T26
T43 T47 T52 T48

C5
T11 D1 R14 T8
T45 R12 P1 T51
C4
R63

R72
R16 T7 T5 T6 R17

T
T3 T4
R60

R13 T12 R15


R58

R61

T23

R69

R70

R67
R5 R7
D8

D11
D18
T2 D2 RE2
C32 R19 R54 R4 T1 C12 R21 C39
R6 C1

C1
C31 D5 C2 D7 C38

3
D4 C25 R55 D6
R59 R2
R64

R73
C16 C9 C18 R68
mute

T44 C10 R3
D3

T RE1 T49
C8 R22 R1 R23 C11
P4 T10 P5

P-IN
T9
T13 T14
T

* JP2 niet plaatsen


* do not use JP2
1
3 * ne pas implanter JP2
2
* JP2 nicht stecken
P-IN

T
T14 T13
P5 T10 T9 P4
C11 R23 R1 R22 C8
mute

RE1
T
D3

T49 T44
R3 C10
R73

R64
R68 C18 C9 C16 R59
R2
D6 D7 C2 R55 C25 D5 D4 C31
C38
3

C1 R6
C1

C39 R21 C12 T1 R4 R54 R19 C32


D18
D11

RE2 D2 T2
R67

R70

R69

T23

R61

R58

D8
R7 R5

R60
R15 T12 T4 T3 R13
R72

R63
T

R17 T6 T5 T7 R16

C4
T51 T8 P1 R12 D1 T45
R14 T11
C5

T26

T48 T52 T47 T43


D16

C7
LS+

R20 JP1 C20 R18


D12

P2

R29 C22 RE3 R26


R71

R62
R9

D9
C3
T22

C30
T20 T17
C37
R66

R57
C40 R8 C6 C33
R28 R32 R31 R25 T46
T50

C14
C36

K1

D13 D10 C29


1R

T19 C26 T16


T25

C24
R10

R30
D19

P3
JP2

R27 RE4 C21 R24


D17

C23
T18 C19 C17 T15
LS-

R34 IC1
T21

R77
R11

990001-1
R35 R33
R76
R65

R56
L1

LS- C27

*
IC2

T24

C15

R53

LS+
D14
D15

C35 C41 C34 C28


C42

I +5V
R78

T P-LS T28 T27


--

++
LS+

0 0
R75
R74
C48

C45

C47

C44

C46

C43

R79
+ -
R52

R48

R51

R47

R50

R46

R49

R45
R38
R44

R41

R43

R37

R40

R36

R42

R39

T33 T30
T34

T31

T32

T29
T42

T38

T41

T37

T40

T36

T39

T35

990001 - 4 - 11

Figure 17. The interlinking required to form a half-bridge


amplifier from two single Titan 2000 units. Note that the
resulting balanced input may be reconverted to an unbal-
say 50–80 W in to 8 Ω. anced one with the Brangé design (Balanced/unbalanced 260 V. The power supply
Such power levels were converters for audio signals) published in the March for th is w ou ld be qu ite a
th en w ay beyon d of 1998 issue of this magazine. The PCB for that design d esign . An d w h ere
w h at th e voltage rat- (Order no. 980026) is still stocked. w ou ld a d esign er fin d
in gs of ou tp u t tran sis- th e d rivers an d ou tp u t
tors would permit. transistors for this? Advo-
Brid gin g is con sid ered by man y to Opponents also claim that bridging cates point out that bridging amplifiers
be a good thing, since it automatically am p lifiers is ted iou s an d requ ires too have the advantage of requiring a rel-
p rovid es a balan ced in p u t (d rive). much space. It is, however, not simple atively low su p p ly voltage for fairly
However, opponents will quickly point either to design a single amplifier with high output powers.
ou t th at it h alves ou tp u t d am p in g, the same power output and the requi- Brid gin g ju st abou t d ou bles th e
doubles the circuitry and virtually can- site p ow er su p p ly. A sin gle 2 kW rated ou tp u t p ow er of th e sin gle
cels even -ord er h arm on ics created in amp lifier requ ires a symmetrical su p - amplifier. Again, opponents point out
the amplifier. ply voltage of ± 130 V, that is, a total of that loudness does not only depend on

Elektor Electronics 6/99 47


Figure 18. Test setup for the
prototype half-bridge amplifier
(centre). Note the large power
supplies at the left and right of
the amplifier, but the amplifier. mon enclosure. F I N AL LY
also on th e lou d - Th e in ter- When all interconnections between the
sp eaker. Bear in w irin g is sh ow n board s as ou tlin ed h ave been m ad e,
m in d , th ey say, th at ju st ch an gin g a in Fig-ure 17. Make su re th at th e the single amplifiers form a half-bridge
lou d sp eaker w ith a sen sitivity of, say, p ow er su p p lies are sw itch ed off an d am p lifier. If all w ork h as been carried
90 dBSPL per watt per metre to one with th at th e sm ooth in g cap acitors h ave ou t as d escribed , th ere sh ou ld be n o
a sen sitivity of 93 d BSPL p er w att p er been d isch arged before an y w ork is problems.
m etre is equ al to d ou blin g th e am p li- carried out. In the design stages, network R9-P1,
fier power rating. Start by in terlin kin g th e n egative in serted in to th e circu it w ith p in
Clearly, bridging two amplifiers is a su p p ly lin es (term in als 0) w ith in su - jumper JP1 (see Part 1), was considered
m ixtu re of good an d bad au d io en gi- lated 40/02 m m w ire. Rem ove th e necessary for common-mode suppres-
neering and sonics. in su lation at th e cen tre of th e len gth sion . H ow ever, d u rin g th e testin g of
of wire since this will become the cen- the prototype, the network was found
INTERCONNECTING tral earth in g p oin t for th e n ew (bal- to be superfluous. It may be retained if
It is, of course, necessary that two com- anced ) input. Link the ⊥ terminals on th e h alf-brid ge amp lifier is to be u sed
pleted single Titan 2000 amplifiers are both board s to th e n ew cen tral earth with a second half-bridge amplifier for
available, each w ith its ow n p ow er w ith 24/02 mm in su lated w ire. stereo purposes, when it may be used
su p p ly. It sh ou ld th en be p ossible to Connect the loudspeaker terminals to equ alize th e am p lification s of th e
sim p ly in terlin k th e earth s of th e tw o to the LS+ terminals on the two boards two half-bridge amplifiers.
units, use the inputs as a common bal- with 40/02 mm insulated wire. [990001]
an ced in p u t, an d con n ect th e lou d - Link pins 2 and 3 of the XLR connec-
speaker between terminals LS+ on the tor to the input terminals on the boards
two amplifier. However, a few matters w ith tw o-core screen ed cable. Sold er
must be seen to first. the screening braid to pin 1 of the XLR
Owing to the requisite stability, it is con n ector an d to th e n ew cen tral
imperative that the two amplifiers are earthing point.
ju xtap osed w ith th e sp ace betw een Fin ally, on both board s rem ove
th em n ot exceed in g 5 cm (2 in ). Th ey jumper JP2 from the relevant pin strip.
should, of course, be housed in a com-

48 Elektor Electronics 6/99


Pa r a m e t e r s
With a supply voltage of ± 70 V (quiescent ± 72 V) and a quiescent current of 200–400 mA

Input sensitivity 2.1 V r.m.s.


Input impedance 87 kΩ
True power output for 0.1% THD 950 W into 8 Ω; 1.5 kW into 4 Ω
True power output for 1% THD 1 kW into 8 Ω; 1.6 kW into 4Ω
Power bandwidth 1.5 Hz – 220 kHz
Slew limiting 170 V µs–1
Signal+ noise-to-noise ratio (at 1 W into 8 Ω) 97 dB (A-weighted
93 dB (B= 22 kHz)
Total harmonic distortion (B= 80 kHz)
at 1 kHz 0.0033% (1 W into 8 Ω)
0.002% (700 W into 8 Ω)
0.0047% (1 W into 4 Ω)
0.006% (700 W into 4 Ω)
at 20 kHz 0.015% (700 W into 8 Ω)
0.038% (1200 W into 4 Ω)
Intermodulation distortion
(50 Hz:7 kHz = 4:1) 0.0025% (1 W into 8 Ω)
0.0095% (500 W into 8 Ω)
0.004% (1 W into 4 Ω)
0.017% (500 W into 4 Ω)
Dynamic intermodulation distortion
(square wave of 3.15 kHz and 0.0038% (1 W into 8 Ω)
sine wave of 15 kHz) 0.0043% (700 W into 8 Ω)
0.005% (1 W into 4 Ω)
0.0076% (1200 W into 4 Ω)
Damping (with 8 Ω load) ≥ 350 (at 1 kHz)
≥ 150 (at 20 kHz)
Open-loop amplification ×8600
Open-loop bandwidth 53 kHz
Open-loop output impedance 3.2 Ω

4k

2k

1k

500

200

100
W
50

20

10

20 50 100 200 500 1k 2k 5k 10k 20k


Hz 990001 - 4 - 12

A comparison of these parameters with the specifications given in Part 4 ((May 1999 issue) show that they are gener-
ally in line. In fact, the intermodulation distortion figures are slightly better. Because of this, no new curves are given
here other than power output (1 kW into 8 Ω and 1.6 kW into 4 Ω) vs frequency characteristics for 1 per cent total har-
monic distortion.
During listening tests, it was not possible to judge the half-bridge amplifier at full volume, simply because there were
no loudspeakers available that can handle this power output. However, up to 200 W true power output, the half-bridge
amplifier sounds exactly the same as the single amplifier. Instrument test figures show no reason to think that the per-
formance at higher output powers will be degraded.

Elektor Electronics 6/99 49


The content of this note is based on information received from manufacturers in the
electrical and electronics industries or their representatives and does not imply prac-
APPLICATION NOTE tical experience by Elektor Electronics or its consultants.

Bridge-tied-load
(BTL) amplifier
Type TDA8552
high voltage on chip
The TDA8552 from Philips Semiconductors is a two-channel audio
power amplifier that provides an output power of 2×1.4 W into an 8 Ω
load with a 5 V power supply. The circuit contains two BTL power ampli-
fiers, two digital volume controls and standby/mute logic. Volume and
balance of the amplifiers are controlled via two digital input pins which
can be driven by simple push-buttons or by a microcontroller. It is con-
tained in a 20-pin small outline package (SOP).

INTRODUCTION p ow er su p p ly.
Th e TDA8552T is a Brid ge-Tied Load The gain of the amplifier can be set
(BTL) au d io p ow er am p lifier cap able by the digital volume control. The gain
of d eliverin g 2×1.4 W in to an 8 Ω in th e m axim u m volu m e settin g is
A Philips Semiconductors load at a Total H arm on ic Distortion 20 d B (low gain ) or 30 d B (h igh gain ).
Application (TH D) of 10% op eratin g from a 5 V The maximum gain is selected via the

PINNING
SYMBOL PIN DESCRIPTION 1
GND1 1 ground 1, substrate/leadframe
OUT2+ 2 positive loudspeaker terminal output channel 2
VDD1 3 supply voltage 1
HPS 4 digital input for headphone sensing
MODE 5 digital trinary input for mode selection (standby, mute and operating)
UP/DOWN1 6 digital trinary input for volume control channel 1
UP/DOWN2 7 digital trinary input for volume control channel 2
VDD2 8 supply voltage 2
OUT2- 9 negative loudspeaker terminal output channel 2
GND2 10 ground 2, substrate/leadframe
GND3 11 ground 3, substrate/leadframe
OUT1+ 12 positive loudspeaker terminal output channel 1
VDD3 13 supply voltage 3
GAINSEL 14 digital input for gain selection
IN2 15 audio input channel 2
SVR 16 half supply voltage, decoupling ripple rejection
IN1 17 audio input channel 1
VDD4 18 supply voltage 4
OUT1- 19 negative loudspeaker terminal output channel 1 Figure 1. Pin configuration of
GND4 20 ground 4, substrate/leadframe the TDA8552.

Elektor Electronics 6/99


52
gain selection pin. must be hard-wired to ground (20 dB) in a change in gain of 80/64 = 1.25 d B
Th e h ead p h on e sen se in p u t (HPS) or to VDD (30 dB). Gain selection during (typical value).
can be used to detect if a headphone is operation is not ad vised since switch- In th e basic ap p lication , th e
plugged into the jack (socket) connec- ing is not guaranteed plop-free. UP/DO WN pin is switched to ground
tor. If a headphone is plugged into the or VDD by a double push-button. When
socket, the amplifier switches from the I N P U T AT T E N U AT O R th e su p p ly voltage is con n ected in i-
BTL to th e Sin gle En d ed (SE) m od e The volume control operates as a digi- tially, after a com p lete rem oval of th e
an d th e BTL lou d sp eakers are tally con trolled in p u t atten u ator su p p ly, th e in itial state of th e volu m e
sw itch ed off. Th is also resu lts in a betw een th e au d io in p u t p in an d th e control is an attenuation of 40 dB (low
reduction of quiescent current drain. power amplifier. In the maximum vol- volume), so the gain of the total ampli-
Th e d evice can be sw itch ed to th e ume control setting, the attenuation is fier is –20 dB in the low gain setting or
standby condition, mute condition, or 0 dB and in the minimum volume con- –10 d B in th e h igh gain settin g. After
n orm al op eratin g con d ition via th e trol settin g, th e typ ical atten u ation is p ow er-u p , som e p ositive p u lses h ave
MO DE pin. 80 dB. The attenuation can be set in 64 to be applied to the UP/DOWN pin for
The device is protected by an inter- steps via the UP/DOWN pin. turning up to listening volume.
n al th erm al sh u td ow n p rotection Both attenuators for channels 1 and
mechanism. 2 are sep arated from each oth er an d AU T O R E P E AT
are con trolled via th eir ow n If the UP/DOWN pin is low or high for
P O WE R AM P L I F I E R UP/DO WN pin. the wait time (t wait in seconds) (one of
Th e p ow er am p lifier is a brid ge-tied Balance control can be arranged by th e keys is p ressed ), th e d evice starts
load amp lifier w ith a comp lemen tary ap p lyin g UP/DO WN p u lses to p in s 6 m akin g u p or d ow n p u lses by itself
CMO S output stage. The total voltage and 7. with a frequency given by 1/t rep repeat
loss for both output power MO S tran- function). The wait time and the repeat
sistors is within 1 V and with a 5 V sup- VO LU M E C O N TR O L frequ en cy are set w ith an in tern al RC
ply and an 8 Z loudspeaker an output Each atten u ator is con trolled via its oscillator with an accuracy of ± 10%.
p ow er of 1.4 W can be d elivered . Th e UP/DO WN pin (trinary input):
total gain of the power amplifier can be VO LU M E S E T TI N G S I N
set at 20 dB or 30 dB via the gain selec- • Floatin g UP/DO WN p in : volu m e S TAN D BY M O D E
tion pin. remains unchanged Wh en th e d evice is sw itch ed via th e
• Negative pulses: decreasing volume MO DE select p in to th e m u te or
GAI N S E LE CTI O N • Positive pulses: increasing volume standby condition, the volume control
Th e gain selection can be u sed for a atten u ation settin g keep s its valu e,
fixed gain settin g, d ep en d in g on th e Each p u lse on th e p rovid ed th at th e volt-
ap p lication . Th e gain selection p in UP/DO WN p in resu lts Figure 2. Test and age on th e VDD p in
application diagram
of the TDA8552.

Elektor Electronics 6/99 53


Table 1. DC characteristics.
SYMBOL PARAMETER CONDITIONS MIN. MAX. UNIT
VDD supply voltage operating -0.3 + 5.5 V
Vi input voltage -0.3 VDD + 0.3 V
IORM repetitive peak output current - 1 A
Tstg storage temperature -55 + 150 °C
Tamb operating ambient temperature -40 + 85 °C
Vsc AC and DC short-circuit safe voltage - 5.5 V
Ptot maximum power dissipation SO20 - 2.2 W
SSOP20 - 1.1 W

does not fall below the minimum sup- th e m u te con d ition w h ile th e in p u t that the slave power amplifiers at out-
ply voltage. capacitor is being charged. This can be puts OUT1 and OUT2 are switched to
After the device has been switched achieved by holding the MODE pin at the standby mode. This results in float-
back to the operating mode, the previ- a level of 0.5 VDD, or by w aitin g abou t in g ou tp u ts: th e lou d sp eaker sign al is
ou s volu m e settin g is m ain tain ed . In 100 m s before ap p lyin g th e first vol- th en atten u ated by abou t 80 d B an d
the standby mode, the volume setting is ume-UP pulses. only the headphone can operate.
m ain tain ed as lon g as th e m in im u m O ne of the benefit of this system is
supply voltage is available. The current H E AD P H O N E S E N S I N G that the loudspeaker current does not
drain is very low: about 1 µA (typical). A headphone can be connected to the flow th orou gh th e socket sw itch ,
In battery-op erated ap p lication s, amplifier by using a coupling capacitor which could cause some power loss. Te
the volume setting can be maintained for each channel. The common ground other benefit is that the quiescent cur-
d u rin g battery exch an ge if th ere is a p in of th e h ead p h on e is con n ected to ren t is red u ced w h en th e h ead p h on e
supply capacitor available. th e grou n d of th e am p lifier—see Fig- plug is inserted into the socket.
ure 2. Wh en th e H PS p in is u sed as [990012]
MODE SELECTION illu strated in th is d iagram , th e
Th e d evice is in th e stan d by m od e TDA8552T detects if a headphone plug
(w ith a very low cu rren t d rain ) if th e is inserted into the socket.
voltage at th e MO DE p in is betw een When no headphone is plugged in,
VDD an d VDD –0.5 V. At a m od e select th e voltage level at th e H PS p in w ill
voltage of ≤ 0.5 V, the amplifier is fully remain low. A voltage ≤ VDD–1 V at the
operational. H PS p in w ill keep th e d evice in th e
In th e ran ge betw een 1 V an d BTL mode: the loudspeakers can then
VDD –1 V, th e am p lifier is in th e m u te be op eration al. If th e H PS p in is n ot Source: Data sheet ‘TDA8552T; TDA8552TS
con d ition . Th e mu te con d ition is u se- con n ected , th e d evice w ill rem ain in 2×1.4 W BTL audio amplifiers with digital
fu l for u sin g it as a ‘fast m u te’; in th is the BTL mode. volume control and headphone sensing’
mode, the output signal is suppressed, When a headphone is plugged into Philips Semiconductors, 276 Bath Road,
w h ile th e volu m e settin g retain s its th e socket, th e voltage at th e HPS p in Hayes, England UB3 5BX; telephone + 44 181
value. w ill be set to VDD . Th e d evice th en 730 5000; fax + 44 181 754 8421;
It is advisable to keep the device in switches to the SE mode, which means Internet: www.semiconductors.philips.com

Table 2. AC characteristics.
SYMBOL PARAMETER CONDITIONS MIN. TYP. MAX. UNIT
Po output power THD = 10%; RL = 8 Ω 1.0 1.4 - W
THD = 10%; RL = 16 Ω - 0,8 - W
THD = 0,5%; RL = 8 Ω 0.6 1.0 - W
THD = 0,5%; RL = 16 Ω - 0.6 - W
THD total harmonic distortion Po = 0.1 W; note 1 - 0.15 0.4 %
Po = 0.5 W; note 1 - 0.1 0.3 %
Vo(n) noise output voltage GAINSEL. = 0 V; note 2 - 60 100 µV
GAINSEL. = VDD ; note 2 - 100 - µV
SVRR supply voltage ripple rejection note 3 50 55 - dB
Vi(max) a maximum input voltage THD = 1%; - - 1.75 V
Gv = –50 to 0 dB
asup channel suppression VHPS = VDD ; note 4 70 80 - dB
acs channel separation 50 - - dB

Notes
1. Volume setting at maximum.
2. The noise output voltage is measured at the output in a frequency band from 20 Hz to 20 kHz (unweighted), Rsource = 0 Ω.
3. Supply voltage ripple rejection is measured at the output, with a source impedance of Rsource = 0 Ω at the input. The ripple voltage is
a sine wave with a frequency of 1 kHz and an amplitude of 100 mV (RMS) is applied to the positive supply rail, gain select pin is LOW
(0 V).
4. Channel suppression is measured at the output with a source impedance of Rsource = 0 Ω at the input and a frequency of 1 kHz. The
output level in the operating single-ended channel (OUT+ ) is set at 1 V (RMS).

Elektor Electronics 6/99 55


GENERAL INTEREST

PC-controlled
model railway:
EEDTS Pro
Part 1: the hardware
The Elektor Electron-
ics Digital Train Sys-
tem published in this
magazine in 1989/90
was warmly received
by the regrettably
declining core of
model train enthusi-
asts. Now, almost ten
years later, much of
the electronics tech-
nology has changed
and it is, therefore,
felt necessary to
update a number of
key elements of that
system. One of the
more important
changes is the promi-
INTRODUCTION etary systems: locomotives fitted with
nent role given to the Mod ern electron ics an d m od el train a Märklin decoder may be readily inte-
personal computer systems get along well together. This is
primarily because most electronic com-
grated into the EEDTS. This means that
th e u ser h as all th e freed om h e/sh e
(PC). This develop- p on en ts h ave becom e so sm all th at wants in building up a model train sys-
they can easily be fitted into a locomo- tem.
ment also opens the tive, turnouts (points; USA: switches), EEDTS Pro con tin u es alon g th ese
way to a number of or sign als to give th ese som e in telli- lines by replacing those components of
gence. Developments in this field were th e earlier system th at h ave become a
new applications. the subject of an article in the May 1999 little long in the tooth, technologically
issue of this magazine. speaking.
Th e sn ag w ith m an y p rop rietary In the design, great importance was
m od el train system s is th at th ey are attached to retaining or obtaining com-
fairly exp en sive. Th e EEDTS of yester- p atibility w ith existin g system s. Th e
year showed that it is possible to build result of this policy is that many items
a much less expensive alternative. As a of th e EEDTS, su ch as th e booster, an d
bon u s, th e system is tran sp aren t so th e d ecod ers for tu rn ou ts (sw itch es)
Design by S van de Vries that it can be incorporated into propri- an d sign als, can be u sed w ith EEDTS

Elektor Electronics 6/99


56
1 Figure 1. Block diagram of a
simple configuration of a model
2
train
railway. detector

return
signal
module
up to eight
manual controls
up to eight
manual controls buffer
buffer return signallers switch/signal
return signallers decoder
manual
manual control
control

microcontroller
microcontroller booster
booster

locomotive
decoder
optoisolator locomotive
optoisolator RS-232 decoder
RS-232 super engine decoder

super engine decoder

980085 - 2 - 11 PC software
control
980085 - 2 - 12

Figure 2. Block diagram of a digi-


Pro. Prop rietary p rod u cts from , say, month’s instalment. tal model railway based on the
Märklin an d Len z m ay also be u sed new controller. All requisite func-
without any problems. B LO CK D I AGRAM S tions are readily found in the cir-
A n ew asp ect of EEDTS Pro is th e A block diagram of the control system cuit diagram in Figure 3.
integration in the control unit of a PC of the model train is shown in Figure 1.
in terface to en able m on itorin g an d Th e solid p arallel lin es betw een th e
gu id in g th e train s on th e track on th e booster an d th e locom otive d ecod er
VDU (Visu al Disp lay Un it) of th e PC. rep resen t th e rails. At th e left of th ese
The software necessary for this will be lines is the control section which, in the Figure 3. Circuit diagram of the
d iscu ssed an d d issected in n ext stan d -alon e con figu ration , con sists of controller which is based on a
Motorola microprocessor.

5V 5V
3 5V R2 5V
C7 C4, C9...C12 = 47µ / 25V
100k

C9
100n

8 10 15
14 C6 2
S1 C1 VRH VPP6
IC2 C10 1 V+
18 19 C1+ 16
7 100n RESET IRQ
100n K6
22 IC3
RESET K2 TCAP1 3
39 23 C1–
PB0 TCAP2 11 14
38 52 T1IN T1OUT
PB1 TDO 10 7
IC2 = 74HCT04 37 IC1 50 T2IN T2OUT
PB2 RDI 12 13
36 R1OUT R1IN
PB3 9 8
R3 1 8x 47k 35 2 R2OUT R2IN C12
PB4 TCMP1 C11 4
34 1 C2+
PB5 TCMP2
33 40 MAX232 15
PB6 VPP1 5
32 51 C2– K8
PB7 SCLK 8 V-
2 3 4 5 6 7 8 9 IC2d
K4 MC68HC705B16 6
49 C4
PC0 1
48
PC1
47 9
PC2 R5
46
PC3 4k7
45
PC4 PA0
31 5V
44 30 IC2a
PC5 PA1
43 29 1 2 5V
PC6 PA2 1
42 28 K7
PC7 PA3
27
PA4 IC2e IC2b
14 26
PD0/AN0 PA5 11 10 3 4
13 25 1 1
PD1/AN1 PA6
12 24
PD2/AN2 PA7
11 IC2c
PD3/AN3
9 20 5 6
PD4/AN4 PLMA 1
5 21
PD5/AN5 PLMB
4
PD6/AN6 IC2f
3 7
PD7/AN7 VRL 12 13
1
2 3 4 5 6 7 8 9 OSC1 OSC2
16 17 41
R1 K1
K5 D3 D4 IC4
1M5
7805 5V
X1
5V R4 1 8x 47k

D2 D1
C2 4MHz C3 C5 C8

22p 22p 2200µ 25V 22µ 25V

4x 1N4001 980085 - 2 - 13

Elektor Electronics 6/99 57


K8 on printed circuit board up to eight functional controls, a micro-
4 1 2 3 4
controller, and booster. The digital con-
trol sign als are con veyed to th e track
via the booster. With this simple system
S1
u p to eigh t in d ep en d en t locom otives
can be used on the track.
R1
Th e en gin e d ecod er con verts th e

12k
D1 d igital sign als on th e track in to an a-
logu e con trol voltages for th e en gin e.
K1
8V2 Th is m ay take tw o form s: on e th at is
3 Re1 D3 fitted in the locomotive during manu-
5
facture, or one that is built at home and
2
12V then fitted into the locomotive.
4
1
D2 1N4148 Those readers who use Märklin equip-
ment may note that the EEDTS Pro sup-
ports the C80, C81, and C90 decoders (old
S2 M otorola format) and the 60901, 60902,
C95, and C95/2 decoders (new M otorola
format). Compatible decoders and Lenz
980085 - 2 - 14 decoders are also supported.
A n ew su p er en gin e d ecod er is in
Figure 6. Circuit dia-
Figure 4. Circuit dia- gram of the manual
gram of the booster control: potentiometer
interface. 6 R1
1k
P1
and six switches.

Parts lists BOOSTER INTERFACE: K1 10k

8
Resistors:
R1 = 12 kΩ 15
7 S1
F0
Semiconductors: 14
manual control
D1 = zener, 8.2 V, 400 mW 6
S2
D2 = LED 13 F1 DB15 connector:
D3 = 1N4148 5
12 pin 1: to K4 pin 1
S3 pin 2: to K4 pin 2
Miscellaneous: 4 F2 pin 3: to K4 pin 3
S1 = push-button switch with break 11
pin 4: to K4 pin 4
contact 3 pin 5: to K4 pin 5
S4
S2 = push button switch with make 10 F3 pin 6: to K4 pin 6
contact 2 pin 7: to K4 pin 7
pin 8: to K2 pin 1...8 (up to eight manual controls)
K1 = 5≠ pole DIN connector for board 9
S5
mounting 1 F4 pin13: GND (e.g., K5 pin 9)
Re1 = relay, 12 V pin14: to K5 pin 1...8 (up to eight manual controls)
pin15: + 5V (e.g., K5 pin 10)
S6
TURN

980085 - 2 - 16

to K7 on printed circuit board

5 Parts lists MANUAL CONTROL

the design stages and will be described Resistors:


in a future issue of this magazine. R1 = 1 kΩ
An en gin e d ecod er d esign ed P1 = 10 kΩ
u n d er th e old Motorola form at
en ables con trollin g th e sp eed an d Miscellaneous:
S1–S6 = push button switch with make
direction of a locomotive. There is also
contact
4 2 5 a p ossibility for a th ird fu n ction , su ch K1 = 15-pole female sub-D connector
as in terior ligh tin g, a steam w h istle or
1 3
d ecou p lin g.

to Edits returnsignallers E XPAN S I O N


980085 - 2 - 15 The simple system in Figure 1 may be all, even a com p u ter is able to con trol
exp an d ed to th at in Figure 2. Th is is th e traffic on th e track on ly if it
based on th e u n its w ith in th e d ash ed kn ow s w h ere th e train s are. N ote
Figure 5. Simple adap- lines: buffer monitors, microcontroller, th at con trol is p u rely on th e basis of
tor to enable the moni- optoisolator, and optional serial link to th e location of train s. Th e p osition of
tor units to be con- a com p u ter. A com p u ter m ay ad d a tu rn ou ts (sw itch es) or sign als is n ot
nected to the 6-way new dimension to the model railway. m on itored . Th ey can , h ow ever, be
header on the con- A com p u ter-con trolled track can con trolled by softw are, as is to be
troller. w ork on ly, h ow ever, if th ere is feed - exp ected from a sop h isticated system
back from it to th e com p u ter. After like EEDTS Pro.

58 Elektor Electronics 6/99


980085-1
Parts lists CONTROLLER
7 K4

B1
B2

1-580089 Resistors:
K1 K5 ROTKELE )C(
R3 R1 = 1.5 MΩ

R4
IC1
K2 R2 = 100 kΩ
C7 R3, R4 = SIL array, 8×47 kΩ
R5 = 4.7 kΩ
D3
D2

Capacitors:
C2
C1, C6, C7 = 0.1 µF
C2, C3 = 0.022 µF
D4
D1

X1 C4, C9–C12 = 47 µF, 25 V, radial


R1 K6 C5 = 2200 µF, 25 V, radial
C5 R5 C8 = 22 µF, 25 V, radial
C3 C9
C1
Semiconductors:
C10

IC3
C12 D1–D4 = 1N4001
R2

S1 K8
IC2

C6
Integrated circuits:
IC4 IC1 = MC68HC705B16 (available via
C4 C11 our Reader Services, Order No

B3
B4

K7
C8 986518-1
IC2 = 74HCT04
IC3 = MAX232
IC4 = 7805

Miscellaneous:
X1 = crystal, 4 MHz
S1 = single-pole switch with make con-
tact
K1 = 2-fold SIL header
K2, K4 = 8-pole SIL header
K5 = 10-pole SIL header
K6 = 3-pole SIL header
K7 = 6-pole SIL header
K8 = 4-pole SIL header
Diskette, 3.5”, with Windows software,
available via our Reader Services,
Order No 986027-1a+ b

(C) ELEKTOR
980085-1

Figure 7. Printed-circuit
board for the controller.

DECODERS ( MICRO) CONTROLLER n als is raised by IC 3 to en able th e sig-


nals to be used by the RS232 interface.
A d igitally con trolled railw ay n eed s a Th e circu it d iagram of th e n ew con - Th e com p u ter is lin ked to h ead er K6
number of decoders to control the traf- troller is sh ow n in Figure 3. It is com- via on e of com m u n ication p orts
fic on the tracks. Apart from the mov- pact and wholly digital and is based on CO M 1–CO M 4.
ing trains, there are turnouts (switches), a Motorola microcon troller, IC 1. Th is Th e sin gle 5 V su p p ly lin e is con -
sign als, d ecou p lin g u n its, an d oth er device provides eight analogue inputs, verted to the requisite voltage levels by
components that need to be controlled AN 0–AN 7, three 8-bit I/O ports, a serial capacitors C4, C9, C10, and C11.
remotely. Th en th ere are fu n ction s connector and an integral oscillator. Th ere is a secon d serial ou tp u t on
w ith in th e carriages, su ch as ligh tin g, Th e oscillator is con figu red , h ead er K8, w h ich carries fou r sign als:
which it is nice to control remotely. togeth er w ith crystal X1, resistor R1, th e booster sign al at RS232 an d TTL
Furthermore, it is important for the an d cap acitors C 2, C 3 to gen erate a level; the supply voltage; and earth.
con troller to kn ow w h ere th e variou s clock signal of 4 MHz. The pulse-shaped signals are put on
trains are located. Monitor units signal Th e con troller commu n icates w ith to the track via the booster. The circuit
th e p assin g of a train an d sen d back th e com p u ter via an RS232 in terface, diagram of the requisite booster inter-
this information to the controller. which is why the level of the TTL sig- face is shown in Figure 4. The interface

Elektor Electronics 6/99 59


R1 R2 R3 R4

15

14

13

12

11

10

15

14

13

12

11

10

15

14

13

12

11

10

15

14

13

12

11

10
8

2
9
1

2
9
1

2
9
1

2
9
1
1
2
K2
3
4
5
6
7
8

1
2
K4
3
4
5
6
7
8

1
2
K5
3
4
5
6
7
8
9
10
15

14

13

12

11

10

15

14

13

12

11

10

15

14

13

12

11

10

15

14

13

12

11

10
8

2
9
1

2
9
1

2
9
1

2
9
1
R5 R6 R7 R8
K6
2
3
1
13
25
12
24
11
23
10
22

21

20

19

18

17

16

15

14
9

980085 - 2 - 17

RS232 Figure 8. Interconnection dia-


gram of the controller.

ad d s a start-stop fu n ction to th e sig- GN D term in als. Th e w ip ers are in d i- th e Märklin booster w ill also be su p -
n als. Wh en th e booster is actu ated by vid u ally con n ected to a relevan t an a- ported . The TTL signals on head er K8
briefly closin g sw itch S3, th e relay is logue input on the microcontroller. are intended for this booster.
energized, whereupon diode D 1 lights. Each m an u al con trol con tain s six
The relevant data is then passed by the fu n ction keys an d a w ire brid ge. Tw o CONSTRUCTION
controller to the booster. of the function keys – reverse and F0 – Th e con troller is best bu ilt on th e
Wh en sw itch S4 is p ressed briefly, are u sed w ith both th e old an d th e p rin ted -circu it board sh ow n in Fig-
the relay is deactuated, whereupon the n ew Motorola form at. F0 is in d ep en - ure 7. Carefu l atten tion to th e d raw -
booster is d ecou p led from th e con - d en t of th e d irection of travel an d is in gs an d p arts list sh ou ld en su re th at
troller. m ostly u sed for con trollin g th e fron t no problems will be encountered.
When the short-circuit protection of lights of the locomotive. Figu re 8 sh ow s h ow th e m an u al
th e booster is actu ated , th e relay is Th e oth er fou r keys can be u sed controls are interconnected and linked
automatically deenergized. on ly w ith en gin e d ecod ers th at su p - to the various headers.
Con n ection s PA0–PA (p ort A) are p ort th e n ew Motorola form at. Th is
u sed for com m u n ication w ith th e format is selected by a wire link on the R A I L WA Y M O D E L L I N G
m on itor u n its. Th e lin ks betw een th e h ead er betw een p in s 7 an d 8. Wh en IN THE UK
p ort an d th e u n its are 6-core cables, this link is in place, the manual controls Th ere are a n u mber of mod el railw ay
conforming to the Märklin design. The m ay be con n ected as relevan t by a magazin es, bu t th ese may n ot alw ays
EEDTS monitor units may also be used, 10-core flatcable. The wire link enables be available from newsagents without
bu t th ey m u st be lin ked via a sp ecial en gin es d riven via th e old form at or being ordered.
ad ap tor cable, sin ce th ey u se a 5-core the new format to be used on the same
cable. How this cable is converted to a track. Railway Modeller • Peco Publications &
6-w ay on e is sh ow n in Figure 5. If a Th e in d ivid u al term in als of th e Pu blicity Ltd • Un d erleys • Beer •
mixture of EEDTS and Märklin monitors function keys are linked to the C-port Seaton • Devon EX12 3NA.
is u sed , in sert th e Märklin d ecod ers as relevant, while their common termi-
betw een th e EEDTS m on itors an d n als are con n ected to th e B-p ort. Th is M odel Railway Journal • Wild Sw an
header K7 on the controller. arrangement enables cyclical scanning Pu blication s Ltd • 1–3 H agbou rn e
of the manual controls. Road • Didcot • O xon OX11 8DP.
M AN UAL CO N TRO LS It is clear th at if on ly th e old
Ports B, C, and D, on the controller are Motorola form at is goin g to be u sed , Model Railway Enthusiast • Link House
used for communication with the eight function keys F1–F4 may be omitted. Magazin es Ltd • Lin k H ou se • Din g-
manual controls. The circuit diagram of wall Ave • Croydon • Surrey CR9 2TA.
such a control is shown in Figure 6. BOOSTER
Each m an u al con trol con sists of a Th e booster, th at is th e am p lifier th at Fu rth er in form ation m ay be glean ed
potentiometer, with which the speed of con verts th e d igital sign als to an an a- from:
th e associated locom otive is varied , logu e voltage w h ich is sw itch ed http://www.geocities.com/CapeCanaveral/
and a number of switches. betw een + 15 V an d –15 V, w ill n ot be 7045/railmodel.html
Th e VCC term in als of all p oten - discussed in this part of the article, but [980085]
tiom eters are in terlin ked , as are th e in the next. It is intended that in future

60 Elektor Electronics 6/99


ROTKELE )C( PC2 992035-1 1-530299 COMPONENTS LIST
IC2 PC1 IC1
C2 C3
Capacitors:
C6 C4 C1 = 100nF
C5 C2 = 22µF 10V tantalum bead
C1
C3-C6 = 4µF7 10V tantalum bead

Semiconductors:
K1 IC1,IC2 = DS2107 (Dallas
Semiconductor)

Miscellaneous:
50-way socket, IDC (for flatcable
connection).

(C) ELEKTOR 992035-1

Figure 4. The single-sid ed b oa rd d esigned for the SCSI term ina tor. Grea t c a re is req uired
in sold ering!

trac k layout and c omponent mounting b oa rd . As with the SMA ICs, the fine c a se, g rea t c a re should b e ta ken to
p la n a re g iven in Figure 4. This PCB is d eta il of the c op p er tra c ks req uires a p revent a ny p a rt or c op p er tra c k
not a va ila b le rea d y-ma d e throug h stea d y ha nd , a low-p ower sold ering touc hing the c ase.
Elektor Elec tronic s’ Rea d ers Servic es. iron with a sma ll b it, a nd g ood eye- (992035-1)
The two SMA (surfac e-mounted assem- sight. Note that pin 37 is not connected
b ly) ICs a re c a refully sold ered to the to g round (the c op p er ‘fing er’ is very Literature:
underside of the board. As shown, the c lose to the ground plane). [1] Produc t & Applic ations handbook 1995 –
other p a rts g o to the top sid e. Do not The pins that make up the other c on- 1996, Unitrode, Merrim ac k, USA.
forg et the wire links, they a re ea sily nec tor row (pins 1 through 25, exc ept [2] 1998 Short From Catalog, Dallas Sem i-
overlooked! pin 13) are joined with a horizontally c onduc tor, Dallas, Texas, USA.
One c ontac t row of the 50-way soc ket running wire which is soldered to ground [3] SCSI, the ins and outs, Elektor Elec tronic s
(pins 26 through 50) is soldered direc tly on the board (see c irc uit diagram). (Publishing), ISBN 905705-44-0.
to the trac ks at the c opper side of the If the b oa rd is fitted into a meta l p lug

CORRECTIONS
& updates
Evaluation System for 80C166 gested solutions are (1) to use a 40-MHz bus K1. Likewise pin 3 of D9 is connected
(parts 1 and 2) crystal oscillator module, (2) use a differ- to pin 3BC via bus K1. The correct con-
March & April 1999, 990028 ent 40-MHz crystal or (3) adapt the value nections are shown in the illustration.
of C18 and C19 until oscillation occurs at
Errors in Components List the third overtone. Development System for
IC9 and IC10 should be type 74HC573, not The battery may be a 3.6-V NiCd type, but 68HC11F1
HCT573. note that this is very slowly charged by the June 1999, 990042
C1 and C2 should be 10µF 16 tantalum MAX690. A better solution is to use a Lithi- JP1 is a simple jumper. In the text and parts
bead. um battery. list, it is erroneously referred to as K3.
R20 should be an 8-way SIL array, value The circuit diagram does not make it clear Part K3 is a 4-way SIL pinheader. In the text
4kΩ7. how the serial connection is made via D9. and parts list, it is erroneously referred to
The crystal frequency mentioned with C18, Pins 2 and 3 of this as JP1
C19 should be 40MHz, not 100MHz. connector 10µ
5V6
10µ R4 is erroneously listed as a SIL array with
IC3, MAX690 should be listed as MAX690 should not be a value of 10kΩ. The PCB however only
11B
(BATT), not MAX690 (I/O) connected D9 10A accommodates eight discrete resistors.
TxD1 and 1
10BC
14BC
These are numbered R4 and R6-R12.
Miscellaneous RxD1 (i.e. 6 15BC Resistor R13 in the circuit diagram equals
2 2BC
Pull-up resistors R1-R4 need not be mount- the TTL 7 R4 on the PCB.
ed with the serial channels. side of the 3
8
3BC

When a 40-MHz crystal is used for X1, it MAX232), 4 PC-Controlled Model Railway:
may oscillate at the fundamental frequen- but to the
9
5 EEDTS Pro
cy (13.333 MHz) instead of the third over- other June 1999, 990082-2
tone. If this happens the system baudrate (RS232) side of On page 60, the text references t S3, D1 and
990028-11
will not be correct and the serial commu- the MAX232. Pin 2 S4 should read S2, D2 and S1 respectively.
nication will fail to work as described. Sug- of D9 is therefore connected to pin 2BC via

12 - 10/99 Elektor Elec tronic s EXTRA —————————————— PC TOPICS


CORRECTIONS
& updates
EVALUATION S YSTEM FOR not be mounted with the se- MAX690. A better solu-
80C166 ( PARTS 1 AND 2) rial channels. tion is to use a Lithium 10µ
5V6
10µ

March & April 1999, 990028 When a 40-MH z crystal is battery.


used for X1, it may oscillate The circuit diagram 11B
10A
Errors in Components List at the fundamental frequen- does not make it D9
10BC
IC9 and IC10 should be type cy (13.333 MH z) instead of clear how the seri- 1 14BC
74H C573, not H CT573. the third overtone. If this al connection is 6 15BC
C1 and C2 should be 10µF happens the system baudrate made via D9. Pins 2 2BC
16 tantalum bead. will not be correct and the 2 and 3 of this 7
R 20 should be an 8-way SIL serial communication will fail connector should 3 3BC

array, value 4kΩ7. to work as described. Sug- not be connected 8


4
The crystal frequency men- gested solutions are (1) to TxD 1 and R xD 1
9
tioned with C18, C19 use a 40-MH z crystal oscilla- (i.e. the TTL side 5
should be 40MH z, not tor module, (2) use a differ- of the MAX232),
100MH z. ent 40-MH z crystal or (3) but to the other
IC3, MAX690 should be list- adapt the value of C18 and (R S232) side of the
ed as MAX690 (BATT), C19 until oscillation occurs MAX232. Pin 2 of D 9 is 990028-11
not MAX690 (I/O) at the third overtone. therefore connected to pin
The battery may be a 3.6-V 2BC via bus K1. Likewise
Miscellaneous NiCd type, but note that this pin 3 of D 9 is connected to rect connections are shown
Pull-up resistors R 1-R 4 need is very slowly charged by the pin 3BC via bus K1. The cor- in the illustration.

D EVELOPMENT S YSTEM FOR to as JP1. PC-CONTROLLED MODEL


68HC11F1 R 4 is erroneously listed as a RAILWAY: EEDTS PRO
June 1999, 990042 SIL array with a value of June 1999, 990082-2
10kΩ. The PCB however O n page 60, the text refer-
JP1 is a simple jumper. In only accommodates eight dis- ences to S3, D 1 and S4
the text and parts list, it is er- crete resistors. These are should read S2, D 2 and S1
roneously referred to as K3. numbered R 4 and R 6-R 12. respectively.
Part K3 is a 4-way SIL pin- Resistor R13 in the circuit di-
header. In the text and parts agram equals R 4 on the
list, it is erroneously referred PCB.

BASIC S TAMP PROGRAMMING should be taken directly to A batterypack consisting of voltage regulator to be re-
COURSE (1) the Vin pin of the Stamp four 1.5 V batteries should placed by a low-drop type
Septem ber 1999, 990050-1 module. The circuit diagram be used instead of the 9-volt like the 4805.
The positive battery voltage and PCB are modified as battery originally indicated.
behind the on/off switch shown in the illustrations. This also requires the 7805

5V
2
S2
1
-
H2

6 Bt1
2 ROTKE
Sout 1 24 Vin +
7
Sin 2 23 K1
3 IC2 D1
ATN 3 22 R1 K5 K4
G

8 + +
C2 4 21
4 P15
P0 5 20 P15 P14
9 0 S1 P13
100n P1 6 BASIC 19 P14
C3 C4 P12
5
P2 7 STAMP 18 P13 P11
C1 K2 P10
P3 8 II 17 P12 P9
P4 9 16 P11 P8
100n P7
1-050099
P5 10 15 P10 P6
IC1
P5
P6 11 14 P9
P4
P7 12 13 P8 P3
P2
990050-1 P1
S2 S1
P0 +
C2 C1 Vin K3 K6
5V
K7
IC2
H1

K1 4805 R1
Bt1 2k2
C3 C4
9V D1

47µ 1µ
40V 25V

Elektuur 2/97 37
O . Box
P. 14
14

We can only answer questions or remarks of general interest to our readers, concerning projects not older than
two years and published in Elektor Electronics. In view of the amount of post received, it is not possible to
answer all letters, and we are unable to respond to individual wishes and requests for modifications to, or addi-
tional information about, Elektor Electronics projects.

PCB design and mains voltage is laudable, but cannot be defended by any fested itself as sh ort rep etitive w h istles
(April 1999) regulation or standard. But, again, even if superimposed as it were on the music.
Dear Ed itor—In th e article ‘PCB d esign there are no legal requirements to do so, it is More recently, I listened to a MiniDisc
and mains voltage’ you state that the dis- always advisable to maximize spacings. recorder in a hi-fi retail shop. This system
tance between the mains termination on u ses ATRAC com p ression , w h ich is also
a board to an y oth er con d u ctor m u st be similar to MP3. I was perhaps even more
n ot less th an 6 m m . H ow ever, I w ou ld Joystick and MIDI interface aston ish ed th an th e salesm an th at I
not like to be responsible for the d esigns (December 1998) cou ld h ear th e com p ression straigh t-
sh ow n . In Figu re 4, th e circu it is m ad e Dear Ed itor—I h ave n oticed th at on aw ay. In th is case, it m an ifested itself in
u n n ecessarily d an gerou s by sp ecifyin g a qu ite a few sou n d card s, su ch as several very sh ort in terru p tion s at certain fre-
minimum d istance of 3 mm between the from Yam ah a, th e MIDI-IN d oes n ot quencies. For instance, in normal speech,
m ain s term in als an d th e secon d ary cir- w ork if R10 at p in 4 of K4 h as a valu e of th e s- or f- sou n d is seam less, bu t in th e
cu it. It m ay w ell be th at th e in ten tion 220 Ω as sp ecified . If th e valu e is in - case of th e Min iDisc it sou n d s as if th ey
h ere is to u se a 3-core m ain s cable w ith creased to 470 Ω, all work well. are su bd ivid ed in to m an y p arts w h ich
the protective earth securely connected. G, Huizinga are not connected seamlessly. In the con-
Although the concept behind the arti- sequent ‘seams’ the high frequencies that
cle is correct and useful, I would suggest Thanks for this tip, which many readers will should be there are all but absent.
th at it is better (an d safer) to sp ecify a no doubt find very useful. MP3 sou n d s id en tical if th e comp res-
d istan ce betw een m ain s-carryin g tracks sion takes p lace w ith less th an 256 kbp s
and terminals of at least 10 mm. (6:1); at that compression, I don’t hear it,
G. v. Hamersfeld Digital audio formats bu t at 128 kbp s (12:1) it is qu ite au d ible
(February 1999) (at least to me). I don’t know anyone else
We have indicated in the article that the legal Dear Ed itor—In the article ‘Digital aud io w h o can h ear th e com p ression th at
regulations must be seen (as intended) as formats’ MPEG 1 Layer 3 (MP3) is d is- clearly (without an A/B comparison).
minimum dimensions. That is why the draw- cu ssed an d it is in tim ated th at th is for- I sh ou ld like to h ear from oth er read -
ings show > 3 mm and > 6 mm respectively. m at u ses lossy com p ression w h ich is, ers with similar experiences at
Any constructor or designer is, of course, free h ow ever, n ot au d ible. I can n ot agree lweekers@yahoo.com
to increase these minimum spacings. This is with this. L. Weekers
particularly so if there is a likelihood that the Some years ago, I had a DCC recorder
minimum spacings may be inadequate (such w h ich u ses PASC com p ression . Th is is Compression always affects the signal. In
as use in a damp atmosphere). It is, of course, sim ilar to MP3 in th at it u ses a m askin g MP3 and other systems, a method was sought
sensible to make the layout of a printed-cir- effect, combined with loss-free reduction, and found in which the inescapable effect is
cuit board so that the spacings between tracks based on th e th resh old of h earin g. I inaudible for virtually everybody. Your expe-
are not reduced needlessly. cou ld d efin itely h ear th e com p ression . riences show that there are people with such
Your suggestion of a minimum of 10 mm With complex pieces of music, this mani- good hearing that they can discern the effect.

Elektor Electronics 6/99 63


electronics
electronica on line
DIY audio CDs
manuals, hardware and software descriptions

As a perfect complement to the articles


in this month’s Supplement, this Elec-
tronics On-Line page is devoted to
making your own music CDs. What
does the Internet have on this subject?

Naturally, every self-respecting manu- area, and lots of addi-


facturer of hardware or software has a tional information.
website where extensive product Beginners, too, should
descriptions may be found. For exam- find this webzine useful
ple, if you need information on sound- because it tells you,
cards of the Soundblaster type, all you among other things,
have to do is type www.soundblaster.com which basic equipment
into the addressbar of web browser is required.
and what you were looking for is deliv- The Internet being
ered ‘free’ to your PC screen. such a vast repository of
However, besides a staggering information, it is not surprising to see homepages.nildram.co.uk/~abcomp/
number of product-related websites, that it also supplies good descriptions lp-cdr.htm
there are many other addresses where of the process of copying audio tracks For an overview of PC soundcards and
useful information may be found on from a CD to a CD-R, or what you their main characteristics we’d advise
the subjects ‘computer audio’ and ‘dig- have to do if you want to record a you to have a look at the Digital Expe-
ital audio recording’. whole LP. The address resource.sim- rience website. Although mainly
The Internet magazine (‘webzine’) plenet.com/primer/primer.htm is good for aimed at working with DAT recorders,
called The Tapeless Studio an extensive Primer on CD-R, of which the website also offers lots of informa-
(www.tapeless.com) is a pretty good a large section is devoted to comput- tion on soundcards
starting point. As indicated by its erised audio-recording. If you want to (www.digitalexperience.com/cards.html)
name, the webzine covers anything to know everything about making a dig- and recording software
do with computerised recording of ital (last-forever) copy of your favourite (www.digitalexperience.com/recsoft.html)
audio material, including descriptions LP on a CD-Rewriteable then a more (995051-1)
of new hardware and software for this than useful story may be found at

64 Elektor Electronics 6/99


Elektor Electronics

AT90S2313 AT90S2313

Integrated circuits Integrated circuits


Microcontrollers Microcontrollers
D ATA S H E E T 6 /9 9 D ATA S H E E T 6 /9 9

can sink 20 mA. As inputs, Port D pins that are exter- AT90S2313 ➥ Programmable Watchdog Timer with On-Chip
nally pulled low will source current if the pull-up resis- 8-bit AVR® Microcontroller with 2K bytes In-System Oscillator
tors are activated. Port D also serves the functions of Programmable Flash ➥ On-Chip Analog Comparator
various special features of the AT90S2313 (see full ➥ Low Power Idle and Power Down Modes
datasheet, page 43). Manufacturer ➥ Programming Lock for Software Security
Atmel. ➥ 20-Pin Device
RESET Website: www.atmel.com
6/99

Reset input. A low on this pin for two machine cycles Application Example
while the oscillator is running resets the device. Wave File Player, Elektor Electronics February 1999
Description
XTAL1 The AT90S2313 is a low-power CMOS 8-bit micro-
Input to the inverting oscillator amplifier and input to controller based on the AVR enhanced RISC architec-
the internal clock operating circuit. ture. By executing powerful instructions in a single
Features clock cycle, the AT90S2313 achieves throughputs
XTAL2 ➥ AVR® - High Performance and Low Power RISC approaching 1 MIPS per MHz allowing the system
Figure 3. External clock drive configuration.
Output from the inverting oscillator amplifier. Architecture designer to optimize power consumption versus pro-
➥ 118 Powerful Instructions — Most Single Clock cessing speed.
Crystal Oscillator Cycle Execution The AVR core combines a rich instruction set with 32
automatic pre-decrement and post-increment, the
XTAL1 and XTAL2 are input and output, respectively, of ➥ 2K bytes of In-System Repro-
address registers X, Y and Z are used and decrement-
an inverting amplifier which can be configured for use grammable Flash
ed and incremented.
as an on-chip oscillator, as shown in Figure 2. Either a – SPI Serial Interface for Pro-
The 32 general purpose working registers, 64 I/O reg-
quartz crystal or a ceramic resonator may be used. To gram Downloading
isters and the 128 bytes of data SRAM in the
drive the device from an external clock source, XTAL2 – Endurance: 1,000 Write/Erase
AT90S2313 are all directly accessible through all these
should be left unconnected while XTAL1 is driven as Cycles
addressing modes.
shown in Figure 3. ➥ 128 bytes EEPROM
– Endurance: 100,000
Write/Erase Cycles
➥ 128 bytes Internal RAM
The SRAM Data Memory ➥ 32 x 8 General Purpose Work-
Figure 4 shows how the AT90S2313 Data Memory is ing Registers
organized. ➥ 15 Programmable I/O Lines
65

The 224 Data Memory locations address the Register ➥ VCC : 2.7 - 6.0V
file, I/O Memory and the data SRAM. The first 96 loca- ➥ Fully Static Operation
tions address the Register File + I/O memory, and the – 0 - 10 MHz, 4.0 - 6.0V
next 128 address the data SRAM. – 0 - 4 MHz, 2.7 - 6.0V
The five different addressing modes for the data mem- ➥ Up to 10 MIPs Throughput at
ory cover: Direct, Indirect with Displacement, Indirect, 10 MHz
Indirect with Pre-Decrement and Indirect with Post- ➥ One 8-Bit Timer/Counter with
Increment. In the register file, registers R26 to R31 Separate Prescaler
feature the indirect addressing pointer registers. ➥ One 16-Bit Timer/Counter with
The Direct addressing reaches the entire data address Separate Prescaler and Com-
space. pare and Capture Modes
The Indirect with Displacement mode features 63 ➥ Full Duplex UART
address locations reach from the base address given ➥ Selectable 8, 9 or 10 bit PWM
by the Y and Z register. ➥ External and Internal Interrupt
When using register indirect addressing modes with Figure 4. SRAM organization. Sources
Figure 1. AT90S2313 block diagram.

AT90S2313 AT90S2313

6/99
Integrated circuits Integrated circuits
Microcontrollers Microcontrollers
D ATA S H E E T 6 /9 9 D ATA S H E E T 6 /9 9
general purpose working registers. All the 32 registers provide internal pull-up resistors (selected for each I/O Memory
are directly connected to the Arithmetic Logic Unit
The I/O space definition of the AT90S2313 is shown in the following table.
(ALU), allowing two independent registers to be
accessed in one single instruction executed in one Address Hex Name Function
clock cycle. The resulting architecture is more code $3F ($5F) SREG Status Register

Elektor Electronics
efficient while achieving throughputs up to ten times $3D ($5D) SPL Stack Pointer Low
faster than conventional CISC microcontrollers. $3B ($5B) GIMSK General Interrupt MaSK register
The AT90S2313 provides the following features: 2K $3A ($5A) GIFR General Interrupt Flag Register
bytes of In-System Programmable Flash, 128 bytes $39 ($59) TIMSK Timer/Counter Interrupt MaSK register
EEPROM, 128 bytes SRAM, 15 general purpose I/O $38 ($58) TIFR Timer/Counter Interrupt Flag register
lines, 32 general purpose working registers, flexible $35 ($55) MCUCR MCU general Control Register
$33 ($53) TCCR0 Timer/Counter 0 Control Register
timer/counters with compare modes, internal and exter-
$32 ($52) TCNT0 Timer/Counter 0 (8-bit)
nal interrupts, a programmable serial UART, program-
$2F ($4F) TCCR1A Timer/Counter 1 Control Register A
mable Watchdog Timer with internal oscillator, an SPI $2E ($4E) TCCR1B Timer/Counter 1 Control Register B
serial port for Flash Memory downloading and two $2D ($4D) TCNT1H Timer/Counter 1 High Byte
software selectable power saving modes. The Idle Pin configuration
$2C ($4C) TCNT1L Timer/Counter 1 Low Byte
Mode stops the CPU while allowing the SRAM, $2B ($4B) OCR1H Output Compare Register 1 High Byte
timer/counters, SPI port and interrupt system to contin- bit). PB0 and PB1 also serve as the positive input $2A ($4A) OCR1L Output Compare Register 1 Low Byte
ue functioning. The power down mode saves the regis- (AIN0) and the negative input (AIN1), respectively, of $25 ($45) ICR1H T/C 1 Input Capture Register High Byte
ter contents but freezes the oscillator, disabling all other the on-chip analog comparator. The Port B output $24 ($44) ICR1L T/C 1 Input Capture Register Low Byte
chip functions until the next interrupt or hardware reset. buffers can sink 20mA and can drive LED displays $21 ($41) WDTCR Watchdog Timer Control Register
The device is manufactured using Atmel’s high density directly. When pins PB0 to PB7 are used as inputs and $1E ($3E) EEAR EEPROM Address Register
non-volatile memory technology. The on-chip In-Sys- are externally pulled low, they will source current if the $1D ($3D) EEDR EEPROM Data Register
tem Programmable Flash allows the program memory internal pull-up resistors are activated. Port B also $1C ($3C) EECR EEPROM Control Register
to be reprogrammed in-system through an SPI serial serves the functions of various special features of the $18 ($38) PORTB Data Register, Port B
interface or by a conventional nonvolatile memory pro- AT90S2313 (see full datasheet, page 38). $17 ($37) DDRB Data Direction Register, Port B
grammer. By combining an enhanced RISC 8-bit CPU $16 ($36) PINB Input Pins, Port B
with In-System Programmable Flash on a monolithic Port D (PD6..PD0) $12 ($32) PORTD Data Register, Port D
chip, the Atmel AT90S2313 is a powerful microcon- Port D has seven bi-directional I/O pins with internal $11 ($31) DDRD Data Direction Register, Port D
$10 ($30) PIND Input Pins, Port D
troller that provides a highly flexible and cost effective pull-up resistors, PD6..PD0. The Port D output buffers
$0C ($2C) UDR UART I/O Data Register
solution to many embedded control applications.
$0B ($2B) USR UART Status Register
The AT90S2313 AVR is supported with a full suite of $0A ($2A) UCR UART Control Register
program and system development tools including: C $09 ($29) UBRR UART Baud Rate Register
compilers, macro assemblers, program debugger/sim- $08 ($28) ACSR Analog Comparator Control and Status Register
ulators, in-circuit emulators, and evaluation kits.

66
All the different AT90S2313 I/O and peripherals are placed in the I/O space. The different I/O locations are
accessed by the IN and OUT instructions transferring data between the 32 general purpose working registers and
Pin Descriptions the I/O space. I/O registers within the address range $00 - $1F are directly bit-accessible using the SBI and CBI
instructions. In these registers, the value of single bits can be checked by using the SBIS and SBIC instructions.
VCC Refer to the instruction set chapter for more details. When using the I/O specific commands, IN, OUT, SBIS and
Supply voltage pin. SBIC, the I/O addresses $00 - $3F must be used. When addressing I/O registers as SRAM, $20 must be added to
this address. All I/O register addresses are shown with the SRAM address in parentheses.
GND The different I/O and peripherals control registers are explained in the following sections. When using the I/O spe-
Ground pin. cific commands, IN, OUT, SBIS and SBIC, the I/O addresses $00 - $3F must be used. When addressing I/O regis-
Port B (PB7..PB0) ters as SRAM, $20 must be added to this address. All I/O register addresses are shown with the SRAM address
Port B is an 8-bit bi-directional I/O port. Port pins can Figure 2. Oscillator connections in parentheses.

You might also like