Вы находитесь на странице: 1из 10

TEST& MEASUREMENT

GBDSO
Gameboy Digital Sampling Oscilloscope (1)

Convert a Nintendo games console


into a portable oscilloscope
By Steve Willis

The application of dedicated


games consoles to more varied
functions other than just
playing games is fraught with
difficulties. Not only do the
consoles contain highly
integrated and custom-made
components, there will often
be no publicly available
development tools or
applications manuals. However
the Nintendo Gameboy© is
one such system which has
received considerable
attention from the hobby
designer and enjoys a large
selection of both technical and
software support through a
network of websites.

34 Elektor Electronics 10/2000


TEST& MEASUREMENT

Key Features: FFT — the basics


Dual trace display The following details the specific implementation of the GBDSO FFT for those requiring a
Sampling Rate: DC to 1 Msps greater explanation of its operation. Initially, the input data is sampled using the standard
Time Base: 100 s to 5 µs/Div scope capture programs. The data is then passed through a Hamming window to reduce
Inputs: AC/DC 1 MegOhm
artefacts caused by the finite sample points (rectangular window). A Hamming window was
Input gain: 50 mV to 10 V/Div
Line or chart recorder trace chosen as it gives a good compromise between main lobe and side lobe widths. The win-
modes dowed data is recorded using a bit-reversal algorithm to suit the decimation in time (DIT)
Real-time FFT mode with dB scale process of the FFT. The data is then processed by a discrete Fourier transform (DFT),
Variable persistence XY mode which is implemented using a 256-point radix-2 fast Fourier transform (FFT).
PC link for screen or data transfer 16-bit arithmetic is used for the majority of the calculations, but since the GB has no multi-
5 hrs operation from NiMH bat- ply instruction this has to be calculated longhand by assembler software. The complex real
teries
and imaginary values of the DFT are combined to produce 128 x 32 bit values.
Averaging and Auto trigger func-
tions Finally, a logarithm is taken (1 bit = 6 dB) and the data is displayed on the screen. The entire
Reference trace storage processes (excluding sampling) takes 0.8 seconds of which the FFT accounts for 90% of the
time requiring 4096 signed 16-bit multiplications and 6144 signed 16-bit additions.

The attraction of using a mass pro- port. The PC software is MS Win- entire screen of data is captured before it is
duced console soon becomes clear dows 95 compatible. displayed (standard mode). The number of
when the time and cost involved in The oscilloscope has two input samples captured per scan may be set to
producing a general purpose portable channels CHA/B, with independent either 240 or 600 points per channel, allowing
instrument with processor, LCD dis- software-controlled variable-gain the visible screen window to be moved rela-
play and user interface, not to men- amplifiers. The inputs have a 1-MΩ tive to the initial trigger. Sampling of the two
tion the moulded case, sound system input impedance so they can be con- input channels occurs simultaneously, except
and serial port, are considered. nected directly to 1:1 or 10:1 scope for the 10 and 5 µS/DIV ranges, when the
probes or to an audio jack lead. (lim- channels are sampled on alternate traces rel-
The Gameboy itations on size made BNC type con- ative to the trigger (alternate mode). CHA
nectors impractical). The amplifiers may also be saved as an on-screen reference,
Oscilloscope can be AC or DC coupled by means thus allowing a total of three traces to be dis-
The GameBoy ‘GB’ digital sampling of a switch. The variable-gain ampli- played at once.
oscilloscope ‘GBDSO’ converts a fiers give an input sensitivity of
GBpocket or GBcolour into a multi- 50 mV to 10 V per division with 10:1 Gateway: the ROM
purpose test instrument which probes and an input bandwidth of
should prove invaluable to the hobby DC to 100 kHz.
cartridge interface
designer. Design of GBDSO posed The displayed trace has two All the signals required for the oscilloscope
many contrasting requirements: high modes of operation. For low frequen- are available on the external ROM cartridge
speed, low power, low cost, small cies (100 s to 100 ms/DIV), a chart slot, so no modifications need be made to the
size and versatility. In order to sim- recorder style of display is produced GB console itself.
plify the hardware as much as pos- with the trace scrolling across from The oscilloscope cartridge plugs into a
sible, real-time software is used to the right hand side. For high fre- custom 32-pin card edge connector on the
perform the majority of control func- quencies (50 ms to 5 µs/DIV), an underside of the GB and interfaces directly to
tions e.g., triggering and variable-
rate sampling. Once captured, the
sampled data is displayed using a
standard oscilloscope 10 by 8 screen
format that is designed to maximise RAM_CS top view
RD RESET
screen use. A simple four-position WR AUDIO IN
A0 - A15 D0 - D7
menuing system (one for each key) ECLK GND
+5V
in combination with the joypad pro-
vides easy setting of the standard
scope functions. 1 32
A number of advanced options
are also possible for the more expe-
rienced user, these include FFT
analysis, XY mode, averaging and
reference storage. A serial data link GAME BOY 990082 - 11

allows the displayed screen or trace


data values to be transferred to a PC
computer via the computer’s printer Figure 1. Gameboy card edge connector (end view of ROM cartridge).

10/2000 Elektor Electronics 35


TEST& MEASUREMENT

D1
5V 5VA
2V5 IC5
2
4 D5 5VA
C3 3 1D
BAV199 R7 5VC
7

4k7
5 D6
1p8 C17 6
S1 R5 C5 C14
3 2V5 10
K1 470k R6 1% 100n 12 D7
1 11
CH B C2 R1 1% IC1a 4k7 100n 100n
6 2 5 24 15 8 8
1M 0V 5VA 1% C7 13 D4
R2 7 MODE 14 IC1 IC3
100n 1% IC1b 14 6 D0
REF+ D0 5VC 4 4
1M

5 C5 220p
7 D1 C4 C12
1% D1
C9 1 IC4 8 D2 R
1
15p IN4 D2
100n 100n
2 9 D3 C1 9
R4 R3 1V25 IN3 D3
100n
C1 IC1 = MC33182D 3 17 D4
IN2 D4 74HC175D
1M

4k7

16 13 4 18 D5
IN1 D5
18p W0 5V
MAX114 19 D6
12 11 1V25 D6
5V H0 L0 23 CAG 20 D7
PD D7
P1 10
IC2 RD 11
10 15 INT
DX 5V
COUT WR 15 1 RD
2V5 100k 2V5 2 6 0 0 K3
16 22
CW C8 NC RESET CS A0 14 0 2 WR
1 7 13 21 1 G
VB CLK REF– A1 13 7 3 A13 1
15 9 D1 2 2 +5V
D2 100n NC DQ 12
3 IC6 2 ECLK
5V 5VA SOUT
14
12 11 74HC138D 3
DS1267S100 4 WR
10 4 A14 4
C13 5 RD
BAV199 3 4 9 5 ECLK 5
H1 L1 D1 6 & RAM_CS
7 6 A15 A0 6
1p8 W1 7 A0
S2
R12 2V5 A1 7 A1
8 5
K2 470k C15 A2 8 A2
CH A C11 R8 1% R14 A3 9
2 A3
15p 5V
4k7

1M A4 10
R9 1 C18 A4
100n 1% IC3a 6 A5 11
A5
1M

3 R13
0V 7 1% A6 12
IC3b 4k7 100n A6
1%
5 A7 13
1% C16 2 32 A7
A8 14
R11 R10 VPP A8
C1 IC3 = MC33182D 220p 11 A0 A9 15
A0 A9
1M

4k7

5VA 10 A1 A10 16
A1 A10
18p
9 A2 A11 17
D0 13 A2 A11
D0 8 A3 A12 18
D1 14 A3 A12
P2 R15 C20 D1 IC7 7 A4 A13 19
D2 15 A4 A13
D2
15k

L3 6 A5 A14 20
100n
5VC D3 18 A5 A14
2V5 100k 2V5 D3 5 A6 A15 21
CW R17 D4 19 EPROM A6 A15
100µH D4 4 A7 D0 22
100k D5 20 A7 D0
D5 29 A8 D1 23
2 8 1% C33 D6 21 27C256 A8 D1
C24 R16 D6 28 A9 D2 24
1 6 D7 22 PLCC A9 D2
IC8a 100k 2V5 D7 24 A10 D3 25
3 7 10µ A10 D3
10µ 1% IC8b 6V 27 A11 D4 26
6V D3 5 A11 D4
5V 3 5 5V 5V 3 A12 D5 27
C19 4 A12 D5
C– C+ 30 A13 D6
L1 L2 28
5VA A13 D6
2 IC9 1 100n 2V5 31 A14 D7 29
A14 D7
100µH C21 100µH 30
MAX828 ZR25D01 OE CS RESET
EUK IC8 = TLC27L2CD 25 16 23
31
AUDIO _IN
100n 16 16
C28 C29 C30 C31 RD A15 32
C22 C23 C25 C26 C27 GND
4 IC5 IC6
10µ 8 100n 8 100n 10µ
10µ 100n 10µ 10µ 100n 6V 6V
6V 6V 6V 5V

990082 - 12

Figure 2. Circuit diagram of the GBDSO cartridge. Stop playing games — turn the Nintendo Gameboy into a sampling oscilloscope with
a large clear display!

the data and address busses of the GB Z80 (- Address decoding consists of a values simultaneously. Once
like) main processor. The pin functions of the 74HC138 1-of-8 decoder, IC6, that updated, the values are held until
card edge connector are shown in Figure 1. decodes the address range down to the next update or the power is
A000-BFFF and provides two enable removed. A condensed datasheet of
Circuit diagram signals: this interesting IC may be found
1. A000./RD at pin 9 accesses the elsewhere in this issue.
As you can see from the circuit diagram in ADC and reads CHA/B 8-bit data The GBDSO analogue circuitry
Figure 2, the GBDSO cartridge, despite its value while reinitialising the ADC for requires ±5 V to operate, so an
rather complex function, contains a relatively the next sample. inverting capacitive charge pump
small number of integrated circuits. 2. A000./WR at pin 10 accesses the circuit is used to provide the nega-
The GB is controlled by an 8-bit Z80-like 74HC175 quad latch and writes data tive supply. The device used for this
processor that gives a direct addressing to the DS1267 gain control circuit, or is a MAX828EUK (IC9) which has an
range of 64 kB. However internal devices e.g., selects the input sampling channel internal oscillator that operates at
LCD, RAM, sound etc. use most of the top of the ADC. 12 kHz. This allows relatively small
32 KB leaving 0000-7FFF available for exter- capacitors to be used for smoothing.
nal ROM and A000-BFFF for external RAM. The DS1267 from Dallas Semicon- However, to prevent any high fre-
The GBDSO program is stored in a low power ductor is a dual channel 10-kΩ digi- quency noise being passed to the
27C256 32 kB EPROM, IC7, occupying lower tal gain control potentiometer with sensitive input amplifiers, additional
memory at 0000 to 7FFF which is executed 256 wiper positions per channel. LC filters are used.
upon power-on. The ADC and input gain con- Data is transferred to the device As already mentioned, the CHA/B
trol chips occupy a single memory location at through a serial interface via the input amplifiers are designed to be
A000. 74HC175 latch, this updates both pot compatible with 1:1 or 10:1 (0 or

36 Elektor Electronics 10/2000


TEST& MEASUREMENT

9 MΩ) probes, each input amplifier


having a relatively high input imped- Table 1. Key Function Menu
ance of 1 MΩ. This is achieved by
feeding the signal via a 1-MΩ resis-
tor (R1; R8) into the negative input of Highlighted Function Key
a CMOS opamp (IC1b/IC3a) type Joypad SELECT-‘TRIG’ START- ‘Timebase’ B - ‘CHB’ A - ‘CHA’
MC33182D. This device is marked by
 UP Trigger level  Screen window Y Position  Y Position 
low power, high slew rate and JFET  Down Position  
inputs. By utilising the negative
input of the amplifier, the signal is  Right Trigger mode1 Timebase scale2 Input gain Input gain
fed to a virtual ground, reducing  Left Scale3 scale3
bandwidth limitations imposed by
stray capacitance on the inputs. Notes.
Input protection is provided by 1. Trigger modes for CHA are Auto, Auto, Normal, Normal.
D1/D2, which are type BAV199 dual Auto trigger — produces a trace if a trigger has not occurred within a set time
low-leakage diodes. The negative Normal trigger — holds the trace until a trigger occurs
input also forms a current summing 2. Timebase scale range is 500,200,100,50S etc. up to 5 µS/DIV.
3. Gain scale range is 10,5,2,1V,500,200,100,50 mV/DIV,GND,OFF
junction for the DC zero preset
(P1/P2) which is adjusted to reduce
DC errors at high gain settings.
The variable-gain amplifier sec-
tion consists of IC1a/IC3b and the Gameboy software e.g., joypad, screen and sound generator. For
electronic potentiometer inside the The GBDSO software that resides in more information on software development
DS1267. The amplifier is configured the EPROM on the cartridge board have a look through the list of references
as an inverting amplifier with the was written in a mixture of assem- which will be given at the end of next
potentiometer forming the input and bler language and ‘C’, with assem- month’s concluding instalment.
feedback resistors (wiper is W0). By bler used for the real time data
changing the wiper position through acquisition and display and ‘C’ pro- User interface
software, the gain of the amplifier vides the user interface. The ‘C’ com-
can be varied between 0.004 and piler used was GBDK V. 2.17, which On power up the GB starts to execute the
255, considerably reducing the is a public domain program written GBDSO interface program that resides in
amount of input circuitry required by Pascal Felber and Michael Hope5. external EPROM. The program initially dis-
and eliminating the need for GBDK is an excellent means of plays an intro screen and a set of four prede-
mechanical switches. quickly developing dedicated soft- fined start options which initialise the scope
Interfacing to the 8-bit ADC type ware for the Gameboy, as it contains settings: Single/Dual/Logic/AC. The scope is
MAX114 from Maxim (IC4) requires many predefined functions for inter- now ready for use. Figure 3 shows a typical
an input signal in the range 0-2.5 V. facing to dedicated GB hardware display screen with both channels enabled,
To achieve a stable reference voltage
with varying supply, a 2.5-V
bandgap diode type ZR25D01 is
used. DC biasing of the CHA/B
amplified signal to match the ADC
input is achieved with two 4k7 resis-
tors which transform the ±2.5-V
amplifier signal into 0-2.5 V for the
ADC. The MAX114 is identified by
Maxim as a ‘1-Msps, 4 &8-Channel,
8-bit ADC with 1-µA Power-Down’.
The device is good for a conversion
time of 680 ns per channel, and fea-
tures internal track/hold circuitry
that does not require an external
clock.
Finally, the power supply is rigor-
ously decoupled to prevent high-fre-
quency noise affecting the operation
of the sensitive input circuitry. A
combination of electrolytic capaci-
tors and smaller solid ones of 0.1 µF,
plus two 100-µH chokes are 990082 - 13
employed to keep supply-borne
noise to a minimum. Figure 3. Typical view from dual trace screen.

10/2000 Elektor Electronics 37


TEST& MEASUREMENT

Standard menus
By pressing A/B/Start/Select, the appropriate
function will be highlighted on the bottom
Table 2. Advanced Menu Screens
line of the scope (note CHA is highlighted).
Once a function is highlighted, the joypad
control can be used to adjust the values asso- Function Key Advanced menu screens
ciated with that function, as shown in
Select
Table 1.
Start
Advanced menus
The function key menu provides a quick B Not used
means of changing the standard scope set-
tings with as few key presses as possible. A
However, if the highlighted function key is
pressed a second time then an advanced
menu will be displayed. The advanced menu
options may be found in Table 2.
Each advanced menu has three options
and an exit. When an option is selected with
the function key it will be enabled immedi- Time to XY

ately and the screen will return to normal


operation. Some options switch between one
of two modes e.g., average on/off. The normal
screen will display which of the two modes
is currently selected. The following section 10k

describes in greater detail the operation of


each option. 500Hz
6V pk-pk 100n
CHA CHB

‘A’ Advanced menu 990082 - 14

600/240pt, selects the number of points sam-


pled each trace scan. By moving the screen Figure 4. RC network and XY mode.
window position with the ‘timebase + ↑↓’
menu, it is possible to scroll through up to
three screens of data in 600pt mode. The cur- acknowledged, the GB will beep and Interface (part 2) for more details.
rent window position and size are shown in the progress indicator will change on ‘SELECT’ advanced menu
the top right corner of the screen. The default the PC. At the end of transfer the GB FFT, changes scope operation to FFT
mode is 240 points as this gives the fastest will beep again. The screen will be mode. FFT mode produces a spec-
screen update rate. In FFT mode this is fixed converted to a black and white trum analysis of the sampled data,
at 240 points. 160x144 .BMP format by the PC and where the horizontal axis represents
can be saved to disk. frequency and the vertical axis rep-
Auto Trigger calculates the average value of resents amplitude in dB (10 dB/DIV).
CHA relative to the current timebase setting, DATA⇒PC, The current data values See the FFT section for more infor-
the trigger is set to this value. (not screen) of CHA and CHB will be mation on the FFT mode.
transferred to the PC computer in a
Average, averages CHA (and CHB if enabled) similar method to that above. Data XY, changes the scope operation to
using previous trace scans. The average is can be saved to disk as raw data or XY mode with the horizontal trace
calculated from X=X+(Xnew–X)/8. This can in MathCad 6.0 format for import- deflection set by CHA and the verti-
be useful for removing uncorrelated noise ing back into the computer for analy- cal deflection set by CHB. The trace
from a trace, so the required signal can be sis. See the section on the PC Link persistence (how long each point is
measured.

‘START’ advanced menu


CHA⇒REF, Stores the current trace of CHA
to the reference channel and displays it
allowing up to three traces on the screen at
Time to FFT
once. Selecting this menu again will clear the
reference. The letter R will appear in the left-
hand column indicating a reference trace.

SCREEN⇒PC, The current scope screen will 990082 - 15

be transferred to the PC computer via the link


lead. When the start of transfer has been Figure 5. FFT of 1 kHz 0 dB sinewave.

38 Elektor Electronics 10/2000


TEST& MEASUREMENT

down. By comparison, the 1-kHz square wave


of Figure 6 contains a fundamental and odd
harmonics at 3, 5, 7 kHz, etc. which reduce in
Time to FFT amplitude as the frequency increases.
Closer observation of Figure 5 shows a
spurious spectral peak at 3 kHz which is
30 dB down on the fundamental, this is in fact
produced by the signal generator and repre-
990082 - 16
sents distortion of the pure sine wave. The
time response gives no indications of this
Figure 6. FFT of 1 kHz 0 dB squarewave. problem and it is clear that without the FFT
mode this imperfection would not be mea-
surable but it could cause problems when
displayed) can be set to 100 ms, 1 s, measuring slow changes. analysing circuits.
10 s, 100 s or OFF (infinite). The max- Using the FFT mode can often give unex-
imum number of points plotted on FFT Mode pected results and some experimentation and
the screen at any time is 600. See the experience is required to obtain meaningful
XY section for more information on Normally, signals are considered as results. Here are some points to consider.
the XY mode. varying in amplitude with time and
are therefore measured as a function Make full use of the 8bit samples, if possible
TIME, changes the scope operation of voltage versus time. However, all adjust the signal amplitude or reference
to normal scope mode with the hori- continuous signals can be con- marker so that the input signal is at its max-
zontal axis representing Time after structed from a fundamental and imum i.e.: the highest peak is just below the
an initial trigger point and the verti- harmonically related (Fourier) com- reference marker. The Reference Marker
cal axis representing amplitude in ponents which are best represented range is 35, 30, 20, 15, 10, 0, –5, –10 dB, GND.
Volts. logarithmically as magnitude (dB) Do not increase the signal above this point as
versus frequency (Hz). This is more this will saturate the scope amplifiers and
XY Mode commonly known as a spectral introduce spurious harmonics.
analysis and is often used in audio
The XY mode allows the horizontal systems to measure the performance If a signal contains a wide spectrum of fre-
and vertical deflection to be con- of an amplifier, or the purity of a sig- quencies, often the frequency components
trolled by CHA and CHB respec- nal. The GBDSO computes the spec- that extend beyond the FFT will be reflected
tively. This can be used to display tral analysis using an algorithm back so that they become visible again,
how one circuit parameter is chang- known as the fast Fourier transform which can be misleading. By increasing the
ing with respect to another. or FFT which is a mathematically timebase frequency you can reduce this
A simple RC network demon- intensive method, normally associ- effect. The Timebase scale range is 10, 25,
strates how phase shift is introduced ated with high speed digital signal 50 Hz etc., up to 100 kHz/DIV.
into a circuit by the capacitive com- processors – DSPs. Nevertheless, by
ponent, see Figure 4. The input coding the algorithm entirely in To lower the noise floor, use the averaging
sinewave moves the trace horizon- assembly language and optimising mode.
tally and the ‘phase advanced’ out- its performance, the FFT is per-
put from the RC network moves the formed in just 0.8 seconds. Measuring small signals with a large fun-
trace vertically resulting in a circular A full discussion on frequency damental, is possible if you use a notch filter
image. Changing the frequency and analysis is beyond the scope of this circuit (e.g., twin-T) to remove the fundamen-
waveform type gives some interest- article, but by considering a few tal component before the signal is applied to
ing effects. examples it will soon become clear the scope. This effectively increases the
In XY mode the trace persistence how useful the FFT mode is and in scope’s dynamic range.
(how long each point is displayed) what circumstances it should be (990082-1)
can be set from the timebase to used. Figure 5 shows a 1-kHz sine
100 ms, 1 s, 10 s, 100 s or OFF (infi- wave of amplitude 0 dBVrms or Next month we continue with the PC Link
nite). When the persistence is set to 1.414 Vpk (0 dB = 20log(1V rms), Interface, the construction of he cartridge,
OFF, the points plotted on the screen rms=pk x 0.707). The vertical scale testing and calibrating the instrument.
remain visible until the screen is is fixed at 10 dB/DIV and the refer-
cleared by pressing one of the func- ence marker (represented by a dot-
tion keys. When the persistence is
set to one of the time values, a max-
ted line near the top of the screen) is
determined by the ACH gain setting
Warning
When using 10:1 probes, the maximum input
imum of 600 points can be displayed in dB. Since the sine wave contains voltage applied to GBDSO must not exceed
at a time and they will remain visible only one frequency component (the ±50 V; with 1:1 probes the maximum input
for length of time defined by the fundamental), the frequency spec- must not exceed ±16 V. Under no circum-
timebase setting. Therefore, the 100- trum shows a single peak at 1 kHz. stances should 230/110 V mains voltages be
ms setting is used to measure fast With the reference marker set to applied to the GBDSO.
changes and the 100-s setting for 0 dB, the noise floor is about –45dB

10/2000 Elektor Electronics 39


TEST&MEASUREMENT

GBDSO
Gameboy Digital Sampling Oscilloscope (2)
Part 2: PC link, DSOGrab, construction and testing
Design by Steve Willis

PC reads an initiation byte from the


serial port via pin 10. The PC will
then write back to the GB via pin 2
and serial transfer commences. Two
modes of transfer are possible:

Screen transfer where the entire


screen is sent to the PC and saved
in a .BMP format.

Data transfer where the actual data


values of CHA/B are sent to the
PC.

The raw data format is as follows:

600 bytes of CHA data, 600 bytes of


CHB data.
CHA position, CHB position, CHA
gain, CHB gain, TIMEBASE setting
(1 byte each).

The CHA/B data values are the


actual screen points and have a
range between 7 and 127. The
The PC Link Interface must be taken when wiring the link CHA/B position bytes are where the
Data may be transferred from the GB to a lead to make sure all the connections trace zero reference markers are on
standard PC computer via a link lead, which are correct as errors could cause per- the screen, again between 7 and
connects the GB link port to the PC printer manent damage to the GB or PC 127. The CHA/B gain values are
port. The associated software utility to run on ports. The loop-back connection between 0 and 9, with 0=OFF and
the PC is called ‘DSOGrab’ and may be between pins 4 and 11 is used to 9=10V (see ‘Standard Menus’). In
obtained on floppy disk (see Software Items test if the software can see the con- FFT mode 0=OFF and 9=35dB (see
inset). The GB link port is in fact a serial data nector and is used for fault diag- ‘Getting the most out of the FFT’).
port but unfortunately the data format is non- noses. The TIMEBASE setting is between 2
standard and therefore has to be read as a The GB link port contains an 8-bit and 26, with 2=5uS and 26=500S
data stream by the PC and converted back shift register, which contains the (see ‘Standard Menus’). In FFT mode
into byte format. The connections of the GB current data byte to be sent or read. 2=100KHz and 12(max)=10Hz (see
link port are shown in Figure 7. Clocking of this register can be done ‘Getting the most out of the FFT’).
All outputs and inputs to the GB link port externally by pin 3 of the printer When data is saved as MathCad
are TTL compatible and can be connected port. Initial synchronisation between 6.0 format, data and position values
directly to the PC printer port. Extra care the GB and PC is achieved when the range between 0 and 127. The GAIN

12 Elektor Electronics 11/2000


TEST&MEASUREMENT

and TIMEBASE values are converted to float-


PC Centronics ing point values representing the actual scale
13
D25 plug
25 settings. A MathCad demonstration file is
12
included in the Windows 95/98 link software
24
11 disk supplied for this project.
23
Game Boy
link lead plug
front view
10
22
Assembly
9
DATA 21 Assembly will require a very steady hand and
GND 8
GND 20
some practice if you have never soldered sur-
DATA 7 face mount assembly (SMA) components
CLOCK 19
before. Soldering will require a fine tip iron
6
18 with a 1-mm tip, 26-gauge low melting point
5 solder or solder paste and pair of fine tweez-
17
4
ers. A solder wick is useful for removing
16 excess solder, but do not use a solder sucker
3 as this will probably break the PCB tracks.
15
2
There are two methods of building the circuit,
14 if you are competent at SMA handling then
1
you skip the step by step approach below.
990082 - 17

The following steps allow each semiconductor


to be soldered and tested in turn to check for
Figure 7. GB to PC link lead (view shows front of plugs).

COMPONENTS LIST C2,C4,C5,C8,C9,C11,C12,C14,C17- IC2 = DS1267S100 (Dallas Semiconductor)


C21,C23,C27,C29,C30 = 100nF IC4 = MAX114CAG (Maxim)
All components SMA (surface C3,C13 = 1pF8 NP0 IC5 = 74HC175D
mount assembly) C6,C15 = 15pF NP0 IC6 = 74HC138D
C7,C16 = 220pF NP0 IC7 = AT27C256R-12JC in PLCC44 case
Resistors: (programmed, Publishers’ order code 996528-
SMD case 0805, 0.1 watt Electrolytic capacitors 1) (Atmel)
R1,R2,R4,R8,R9,R11 = 1MΩ 1% SMD Case A IC8 = TLC27L2CD
R15 = 15kΩ C22,C24,C25,C26,C28,C31,C33 = IC9 = MAX828EUK (print on case: AABI)
R5,R12 = 470kΩ 1% 10µF 16V (Maxim)
R3,R6,R7,R10,R13,R14 = 4kΩ7
1% Inductors: Miscellaneous:
R16,R17 = 100kΩ 1% L1,L2,L3 = 100µH S1,S2 = ‘’Secme’ slide switch, 1 changeover
P1,P2 = 100kΩ preset contact, PCB mount
Semiconductors: K1,K2 = 3.5mm PCB mount stereo socket
Capacitors: D1,D2 = BAV199 (print on case: JY) (make sure it fits the board)
SMD case 0805 D3 = ZR25D01 (print on case: 25R) PCB, Publishers’ order code 990082-1
C1,C10 = 18pF NP0 IC1,IC3 = MC33182D (Motorola) Disk, Publishers’ order code 996035-1

K2 S2 K1 S1
C10

C1
R8
(C) ELEKTOR
C11 C2 R1 P1
C14

R10 C13 C5
C3 R4
C8 C9
R3
R12

P2 R5
R11

C30 D2 R2
C6
IC6 R9
C15
C12 IC3 C4 IC1
D1
IC5 IC2 R6 R7
C29 R13 R14 C20 C27
C26
R17 C31
L1
R15

C25
C19
L2
IC9

IC8 C24
C18 R16
C23

D3 C21 C33
C17
IC4 C22
C7
990082-1

IC7
L3
C16
C28

K3

Figure 8. PCB design for the double-sided through-plated cartridge board.

11/2000 Elektor Electronics 13


TEST&MEASUREMENT

Plastic Strip

990082- 19a
Cut Out

Bottom View Top View

CHA DC : AC CHB DC : AC

Digital Sampling
Oscilloscope

990082 - 18
990082- 19b

Figure 9. ROM case cut outs, and home made Figure 10. Calibrating the 50 mV/DIV range on CHA and CHB
metal film.

inductors and tantalum capacitors case, which can be obtained from an


Did you know are next, followed by the semicon- old game. It is held together with
that all hyperlinks printed in this maga- ductors. Note that the tantalum one tamperproof screw that can be
zine are directly accessible through the capacitors and semiconductors must undone with a pair of fine nose pliers
Hyperlinks page of our website at be soldered the correct way around. or cutters if the correct tool is not
http://www.elektor-electronics.co.uk ? Static precautions must be taken available. It is necessary to cut and
No need to type urls anymore, plus we’ll when soldering the sensitive input file out the back of the bottom plas-
do our best to keep track of websites amplifiers IC1 and IC3. Finally, sol- tic case to accommodate the jack
moved since publishing the magazine. der the jack sockets and AC/DC and AC/DC switches at the rear of
switches. It is advisable to cut the the ROM cartridge — see Figure 9
socket leads flush to the board and the photographs. The PCB
before soldering and then gently should now fit snugly into the bot-
short circuits during assembly. file/sand the joints to be flat to the tom of the case. Finally, the top case
1. Disassemble the plastic ROM case (see PCB. section must be cut to give enough
below) and place the PCB in the bottom. The ROM cartridge is a standard clearance for the jack sockets. It is
Carefully plug it into the GB. Switch on
and check the black scrolling start screen
appears. If not, there is a short on one of
the GB interface tracks.
2. Solder the EPROM onto the PCB taking the
usual static precautions. A good tip is to
solder just two corner pins first and get
the device aligned before soldering the
rest of the pins. Place the PCB back into
the case and switch on. The GBDSO intro
screen should now appear and all the
scope menus should work. If not, check for
shorts.
3. Now solder the MAX114 ADC and
74HC138 and check that the unit still
starts.
4. Finally solder the 74HC175 and DS1267
EPOT devices and capacitors C17, C30.
Check the unit still starts. If not, check for
shorts.
Start with the resistors and small capacitors,
taking care not to short any tracks or touch
the edge connector with solder. Some tracks
run under components, and care should be Figure 11. Completed cartridge board, ready for inserting into the Gameboy
taken not to short out these tracks. The console.

14 Elektor Electronics 11/2000


TEST&MEASUREMENT

Figure 12. Rear view of Gameboy console with GBDSO cartridge removed (left) and installed (right).

advisable to stick a thin sheet of the inputs to AC then the traces


plastic (1×17×55mm) along the top of should return to their zero position. Ready-Built
the cartridge for strengthening. To
improve the GBDSO performance Scope probes GBDSO Cartridge
when measuring small signals, a
thin sheet of metal (copper or alu- For normal operation, conventional
Boards
Please check our website http://www.elek-
minium) is bent around the case and scope probes with a 1:1 or 10:1 tor-electronics.co.uk for a readership poll
stuck with double-sided tape. This is switch give ideal performance and and other information on ready-made
grounded by the jack plug nuts. This extend the input voltage range by a GBDSO cartridge boards with all SMA parts
reduces interference caused by the factor of ten. The screen scale is cal- soldered in place.
LCD controller that can be picked up ibrated for 10:1 probes (9 MΩ resis-
by the high impedance input ampli- tance) and one should remember to
fiers. multiply the scale by a factor of ten
when using 1:1 probes (0 MΩ resis- 7. Dr Pan’s Gameboy technical documentation:
www.gbdev.org/news/dl.html
Test and calibration tance). Most commercial probes
8. Paul Robson’s GB97 emulator:
come with a BNC plug attached, http://users.aol.com/autismuk/
To test the scope, switch on with no which should be replaced with a gameboy.htm
inputs applied and select dual-chan- mono 3.5-mm jack plug to connect to
nel AC from the start screen. Set the GBDSO. Care must be taken when urls available as hyperlinks on the Hyperlinks page
AC/DC switches to DC (right), and selecting the probe to ensure that of the Elektor Electronics website.
both traces should appear in line the compensation network is in the
with their respective A/B marker on probe end and not the BNC connec-
the left-hand side. If not, adjust the tor. Often, soldering the inner wire is
DC zero level of the input amplifiers difficult and plated wire should be Project Software
with the presets P1/2 so the traces cleaned first. The following software items may be
are correctly aligned. If the traces are (990082-1) obtained through the Elektor Electronics
still not visible, check the DC volt- Readers Services:
ages around the input amplifiers and References:
1. Digital signal Processing – Ifeachor EPROM AT27C256, ready-programmed,
ADC and compare these with the cir-
Jervis, ISBN 0-201-54413-X order code 996528-1.
cuit diagram. Next increase the input Disk, contains DSOGrab utility and MathCad
sensitivity to 50 mV/DIV and adjust 2. Z80 Assembly Language Program-
ming – L.A. Leventhal, demonstration file, order code 996035-1.
the presets again to finely calibrate
ISBN 0-931988-21-7
the DC levels as shown in Figure 10. 3. Author’s Gameboy web page: Please note:
Set the sensitivity back to 1 V/DIV www-ev.phy.cam.ac.uk these software items are not available as
and apply a 1 kHz 1 Vpk sine wave to 4. Jeff Frohwein’s Technical Page: free downloads from our website because
the either input channel and check www.devrs.com/gb/ the author retains the copyrights. Also, by
that each trace responds to the sig- 5. Pascal Felber and Michael Hope’s contract he receives royalty payments for
nal. Next, apply a DC voltage to the GBDK: http://gbdk.sourceforge.net/ every copy sold of the project EPROM
6. Ian James GBDS: (996528-1) and disk (996035-1).
inputs (e.g., 5 V regulator) and check
the Y scale calibration. If you switch www.geocities.com/Eureka/9827/

11/2000 Elektor Electronics 15

Вам также может понравиться