git @ Cat's Eye Technologies Electronics-Projects / checkpoint_1
Import electronics projects from website. Cat's Eye Technologies 12 years ago
21 changed file(s) with 422 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 $ 1 5.0E-6 16.14263188418817 50 5.0 50
1 r 112 160 112 240 0 1000.0
2 w 112 240 176 240 0
3 w 112 160 176 160 0
4 c 176 240 176 160 0 1.0E-8 0.012598935195574423
5 c 352 240 352 176 0 1.0E-7 0.5880087366960272
6 c 352 176 352 112 0 1.0E-8 -0.12494743160190372
7 t 176 160 256 160 0 1 0.4492024763789919 0.5741499079808956
8 w 256 144 256 112 0
9 w 256 112 352 112 0
10 w 256 176 352 176 0
11 w 352 112 432 112 0
12 w 352 240 432 240 0
13 r 432 240 432 112 0 500.0
14 w 432 240 432 304 0
15 v 256 304 352 304 0 0 40.0 5.0 0.0
16 r 352 304 432 304 0 4700.0
17 w 256 176 256 240 0
18 w 256 304 256 240 0
19 r 176 240 352 240 0 100.0
20 o 12 32 0 3 5.0 0.00625 0
0 $ 1 5.0E-6 111.36722712598126 57 5.0 53
1 t 256 256 288 256 0 1 0.5552026561955071 0.5743376800377079
2 t 320 240 368 240 0 1 -3.0777265582740294 0.019135023842200824
3 w 288 240 320 240 0
4 w 256 256 208 256 0
5 r 208 256 208 112 0 1000000.0
6 r 320 240 320 112 0 10000.0
7 r 208 256 208 368 0 5100.0
8 g 288 272 288 304 0
9 g 368 256 368 304 0
10 d 320 240 320 368 0
11 w 208 368 320 368 0
12 w 208 112 320 112 0
13 w 368 224 416 224 0
14 w 320 112 416 112 0
15 r 416 112 416 176 0 470.0
16 162 416 176 416 224 0 1.0 0.0 0.0
17 c 416 224 416 368 0 1.0E-5 1.3710591254692885
18 w 416 368 320 368 0
19 R 320 112 320 48 0 0 40.0 5.0 0.0
20 o 15 64 0 3 5.0 0.05 0
Binary diff not shown
0 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/xhtml1-strict.dtd">
1 <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
2 <head>
3 <title>Cat's Eye Technologies: The 'Kitsilano' Oscillator</title>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
5 <style type="text/css">
6 #figure1 {
7 float: right;
8 width: 270px;
9 padding: 0.5em;
10 }
11 #figure2 {
12 float: left;
13 width: 208px;
14 padding: 0.5em;
15 }
16 .caption {
17 font-size: 75%
18 }
19 </style>
20 <!-- begin html doc dynamic markup -->
21 <script type="text/javascript" src="/contrib/jquery-1.6.4.min.js"></script>
22 <script type="text/javascript" src="/scripts/documentation.js"></script>
23 <!-- end html doc dynamic markup -->
24 </head>
25 <body>
26
27 <h1>The 'Kitsilano' Oscillator Circuit</h1>
28
29 <h2>Introduction</h2>
30
31 <p><strong>Kitsilano</strong> is an oscillator circuit based on two NPN transistors
32 and a single capacitor. It is so named because it is the most interesting circuit
33 (really, the only significant circuit) that I
34 designed while I was living in the Kitsilano neighbourhood
35 of Vancouver, British Columbia, Canada.
36 Its design was a byproduct of a quest which I have since recognized as futile,
37 and abandoned: the design of a single-transistor, inductor-less oscillator.
38 The pursuit itself was somewhat interesting though, so I'll tell you about it
39 in the next section. In the third section, I'll describe the Kitsilano
40 oscillator itself.</p>
41
42 <h2>1Q0L</h2>
43
44 <div id="figure1">
45 <p><img src="1Q0L_oscillator.png" alt="The 'Kitsilano' Oscillator Circuit"
46 title="Figure 1. A single-transistor (and apparently inductor-less) oscillator."/></p>
47 <p class="caption">Figure 1. A single-transistor (and apparently inductor-less) oscillator.
48 (From <a href="#1">Sessions 1975</a>).</p>
49 </div>
50
51 <p>The notion of a single-transistor oscillator, built without an inductor,
52 tantalized me for a while after I came across what looked like such a circuit
53 in a book of somewhat older circuits that I checked out from the public library<sup><a href="#1">[1]</a></sup>.
54 It is shown in Figure 1. It clearly contains only one transistor and no coils, and
55 the caption claims that the tone it produces, though not loud,
56 is adequate for keying (that is, Morse code) practice.
57 Further, the circuit is organized in a way that coincides with
58 my understanding of how one might go about eliminating the inductor
59 from a Colpitts oscillator: by replacing it with a capacitor and
60 a resistor in parallel and in series with another resistor, an arrangement which
61 can be thought of as a very rough equivalent to an inductor.</p>
62
63 <p>However, every attempt I made at building it failed to produce
64 any results.
65 It was not until much later that I came up with a plausible theory for
66 why it didn't work. The audio
67 output in this circuit was shown as a pair of headphones labelled
68 "Hi-Z". This means "high-resistance", and indicates old-style
69 <em>piezoelectric</em> headphones rather than the more modern
70 magnetic-coil speakers.
71 What took me so long to realize is that piezoelectric elements are crystals, and
72 <em>crystals provide inductance</em> (which is why they can be
73 used in crystal oscillators!) In this circuit, the headphones are
74 apparently a critical component which acts as an inductor in the
75 oscillator. I haven't been able to hunt down a genuine
76 crystal-element earpiece yet, so I haven't been able to test this theory,
77 but it's the best idea I've come up with yet for why it doesn't work
78 without one.</p>
79
80 <h2>The Design of the Kitsilano Oscillator</h2>
81
82 <div id="figure2">
83 <img src="kitsilano.png" alt="The 'Kitsilano' Oscillator Circuit"
84 title="Figure 2. The 'Kitsilano' Oscillator Circuit."/>
85 <p class="caption">Figure 2. The 'Kitsilano' Oscillator Circuit.</p>
86 </div>
87
88 <p>Having given up on a single-transistor, inductorless oscillator,
89 and discovering in other library books several single-transistor, one-inductor
90 designs (such as the Colpitts oscillator), I concentrated my efforts on
91 designing a two-transistor, no-inductor oscillator.</p>
92
93 <p>I had encountered several two-transistor designs previously.
94 One is the "multistable multivibrator", which uses two transistors
95 of the same type, and two capacitors. Each transistor-capacitor pair
96 acts as a timer which triggers the other pair when it has discharged.
97 Another design involves only a single capacitor, but two transistors of
98 complimentary type (NPN and PNP.) Many circuits based on both
99 of these oscillator designs can be found in Mims<sup><a href="#1">[2]</a></sup>.</p>
100
101 <p>Well, what I wanted was an oscillator built from two transistors
102 of the <em>same</em> type, but incorporating only <em>one</em>
103 capacitor. This effort resulted in Kitsilano.</p>
104
105 <p>The theory of Kitsilano's design was adapted from a fairly standard
106 oscillator design that utilizes two CMOS inverters.
107 This is usually implemented with half of a 4001 chip (tying the inputs of
108 each NAND together to form an inverter.). One of the inverters is fed
109 its own output through an RC circuit, and the
110 other inverter is used to stabilize the feedback and "square off" the output.
111 Circuits incorporating this oscillator design can also be found in
112 Mims<sup><a href="#1">[2]</a></sup>.
113 <!--An article containing some sage
114 advice about their design can be found in ETI<sup><a href="#1">[3]</a></sup>.
115 --></p>
116
117 <p>(In fact, it's not required that such an oscillator be constructed from
118 CMOS gates. <a href="2NOR_oscillator.png">This figure</a> shows a
119 circuit along the same lines that I built from LSTTL NOR gates, driving
120 a series-resistor-less LED via a transistor. Measuring
121 the current usage shows why CMOS is preferable: LSTTL uses a lot.)</p>
122
123 <p>Kitsilano uses the fact that <strong>an inverter can be built with a single
124 transistor</strong> to replace the two CMOS inverters with two transistors of the
125 same type. The remainder of the circuit is officially a hack, since it was
126 designed "by dint of sheer building." The circuit is depicted in Figure 2.</p>
127
128 <p>For the construction itself, I chose two 2N4124 transistors — they're NPN
129 and they're about as cheap as they come. The requisite task of an oscillator,
130 as far as I'm concerned, is to blink an LED, so I chose C1 large enough to
131 make this action visible to the unaided eye.</p>
132
133 <p>R1 was not originally part of the circuit: there was no connection between
134 Q1's base and +5V. This oscillator would oscillate sometimes, while at
135 other times would fail to oscillate. I eventually discovered that it was very
136 sensitive to where my hands were placed above or around the circuit, so I
137 added to the high-resistance path to +5V to make sure there was always
138 some voltage at Q1's base, making its behaviour more stable.</p>
139
140 <p>D1 was originally a resistor (I forget the ohmage.)
141 The circuit worked fine with a resistor there, but I wanted something
142 stranger, so I experimented with replacing it with a diode. This worked
143 too, although I cannot quite tell you why (does the voltage drop across
144 the diode serve the same function as the resistance?) so I kept it in.</p>
145
146 <h2>References</h2>
147
148 <ol>
149 <li><a name="1">Kendall Webster Sessions, ed.
150 <i>Master handbook of 1001 practical electronic circuits.</i>
151 Blue Ridge Summit, Pa. : G/L Tab Books, 1975.</a></li>
152 <li><a name="2">Forrest Mims III.
153 <i>Getting Started in Electronics</i>.
154 Master Publishing, Inc., 2003. ISBN 0945053282.</a></li>
155 </ol>
156
157 </body>
158 </html>
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
0 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
1 <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
4 <title>Mildred</title>
5 <!-- begin html doc dynamic markup -->
6 <script type="text/javascript" src="/contrib/jquery-1.6.4.min.js"></script>
7 <script type="text/javascript" src="/scripts/documentation.js"></script>
8 <!-- end html doc dynamic markup -->
9 </head>
10 <body>
11
12 <h1>Mildred</h1>
13
14 <p><i>January 10 2003</i></p>
15
16 <p><img src="mildred_photo.jpg" alt="Photo of Mildred"/></p>
17
18 <p>Mildred is a homebrew computer.
19 Since it is continually changing, this document describes
20 both the current state of Mildred, and what it would be nice for it to
21 eventually be.</p>
22
23 <h2>Overview</h2>
24
25 <p>The core of Mildred resides on a single board,
26 and consists of a power supply, clock, central processing unit (CPU),
27 reset circuitry, address decoding circuitry, memory, built-in I/O
28 devices, and an external interface connector.</p>
29
30 <h3>Board</h3>
31
32 <p>The board is from Radio Shack and is a copper-pad-per-hole protoyping
33 board. Components are soldered to the board, with point-to-point wiring
34 and some fairly ugly solder bridges used to connect them. Sockets are
35 used for all ICs so that they can be extracted and replaced when needed.</p>
36
37 <h3>Power Supply</h3>
38
39 <p>The power supply consists of a 7805, which regulates the incoming
40 voltage (from a 6V-9V wall AC adapter) to 5V. The excess power is
41 disapated as heat. A diode serves two purposes: to protect Mildred if
42 a wall adapter with the wrong polarity is used (the wall adapter in this
43 case has switchable polarity, so it's always possible to make a mistake);
44 and to deliver 8.4V from a 9V wall adapter to lessen the heat on the 7805
45 (since it only needs 8V in to regulate 5V out - anything above that is
46 just wasted.) There are also a couple of capacitors around the
47 7805 intended to smooth out any power spikes to the board, and a red LED
48 indicating power-on.</p>
49
50 <h3>Clock</h3>
51
52 <p>The clock is a 6MHZ crystal oscillator circuit fashioned out
53 of a 6MHZ crystal, some small capacitors and resistors, and
54 3/4 of a 74LS00 chip. References: based largely on design #3 on
55 <a href="http://www.z80.info/uexosc.htm">this page</a> and design #13 on
56 <a
57 href="http://www.geocities.com/dsaproject/electronics/cook-book/cook_book_11_20.html">this
58 page</a>. The clock drives the CPU, which in turn drives everything
59 else. The clock should probably be jumpered to make debugging easier.</p>
60
61 <h3>CPU</h3>
62
63 <p>The CPU is a Z84000. This processor is essentially a Z80, and is being
64 treated as such in Mildred. It has an 8-bit data bus and a 16-bit address
65 bus. To keep things simple, interrupts, bus requests, and dynamic RAM
66 refresh are not used.</p>
67
68 <h3>Reset Mechanism</h3>
69
70 <p>Currently, Mildred must be manually reset after power-on by the
71 reset switch (which simply grounds the /RST line of the Z80.) Ideally, a
72 DS1223 reset circuit would be used as to consume neglible real estate on
73 the board.</p>
74
75 <h3>Address Decoding</h3>
76
77 <p>The address decoding circuit is very simple - it uses a single 74LS32 to
78 determine the chip select signals <code>/LOMEM, /HIMEM,
79 /IORD</code>, and <code>/IOWR</code> based on the
80 <code>/RD, /WR, /MREQ, /IOREQ, A15</code>,
81 and <code>/A15</code> lines from the CPU. (Actually,
82 <code>/A15</code> is generated by the remaining 1/4 of the
83 74LS00 used for the clock.)</p>
84
85 <h3>Memory</h3>
86
87 <p>Mildred's read-only
88 memory consists of a single 2864 EEPROM which can store up to
89 64 kilobits (8 kilobytes) of data. Like all chips on the board, it
90 is socketed so that it can be extracted and reprogrammed.
91 (Note: Mildred should have been given a good quality socket here, it would have
92 saved many moments of frustration.)
93 Since it is selected by /LOMEM, the 2864 resides at memory locations 0000-1FFF
94 and is mirrored at 2000-3FFF, 4000-5FFF, and 6000-7FFF.
95 It could also eventually
96 be replaced by a 27256 32K EPROM for larger programs
97 (and would then occupy 0000-7FFF).</p>
98
99 <p>Given that EEPROM is very slow to write to, and that it has a limit
100 to the total number of possible writes that can be made to it, it is
101 not write-enabled in Mildred and therefore acts as ROM. This may however
102 change in the future, to allow Mildred to become an EEPROM programmer.
103 The risk is that an accidental loop (or a messy power-down condition w/o the
104 DS1223) could munge boot code. Therefore, /WR should probably be jumpered
105 at the 2864.</p>
106
107 <p>Mildred's RAM consists of a single 55256 (although its socket is not
108 fully wired yet.) This chip is 32 kilobytes of fast (15 ns!) static
109 RAM. It allows programs to incorporate a heap, or a stack,
110 etc, and should make it possible to run more sophisticated programs.
111 It also puts the address decoding circuit to better use.
112 It is selected by /HIMEM and thus occupies memory locations
113 8000-FFFF.</p>
114
115 <h3>I/O Interface</h3>
116
117 <p>The external interface connector is a 40-pin IDC header which is
118 not yet connected. /MEMRQ, /IORQ, /RD, /WR, /IORD, /IOWR, the
119 8-line data bus and
120 at least the lowest 8 lines of the address bus (eventually, probably
121 all 16) will be brought down to it, so that
122 an I/O board and/or diagnostic equipment, may be attached to Mildred.</p>
123
124 <p>I/O device decoding would reside on the I/O board and would probably
125 consist of two 74LS138's, enabled by /IORD and /IOWR,
126 and driven by A5, A6, and A7, selecting one of eight input and eight
127 output devices.</p>
128
129 <h2>Block Diagram</h2>
130
131 <p><img src="mildred.png" alt="Block Diagram of Mildred"/></p>
132
133 <h2>Testing</h2>
134
135 <ul>
136 <li>Construct power supply and test output voltage. Result: multimeter
137 reads 5.00V +/- 0.01V between output of 7805 and ground.</li>
138
139 <li>Construct clock and test frequency. Result: multimeter reads 6.00 MHz
140 +/- 0.01MHz between clock and ground.</li>
141
142 <li>Construct CPU and EEPROM sockets and decoding logic,
143 wire busses, plug in CPU and test.
144 Result: CPU operation seems normal. At one point supply voltage to CPU
145 measures 5.5V for unknown reason, but problem seems to fix itself
146 momentarily (Hail Eris).</li>
147
148 <li>Program EEPROM with test program (in this case, using dipswitches
149 and LEDs on a breadboard):
150
151 <pre>
152 0000: OUT (0), A
153 0002: JP 0000
154 </pre></li>
155
156 <li>Run program and watch /IOWR line. Result:
157 programming seems fine (address lines conform to what would be expected
158 for instruction fetches) but /IOWR fails to strobe. Diagnosis: After several
159 re-programming attempts and diagnosis (using LEDs and a slow clock
160 as a makeshift logic probe) problem is discovered: two inputs to the
161 75LS32 chip were mistakenly swapped. Solution: desolder and resolder swapped
162 lines. /IOWR strobes fine at 120 Hz.</li>
163
164 <li>Attempt to run test program at higher clock speed. Result:
165 again, address lines strobe OK but /IOWR and /IORQ don't even budge. Diagnosis:
166 makeshift slow clock (4093-based) is not producing a
167 50% duty cycle. Solution: Replace with 4011-based oscillator.
168 /IOWR now strobes fine up to ~5 MHz.</li>
169
170 <li>Attempt to run at higest clock speed (from internal 6MHz crystal
171 oscillator.) Result:
172 once again, address lines are OK but not a peep from /IOWR or /IORQ. Diagnosis:
173 Crystal oscillator is not driving hard enough. Solution: add 470 ohm
174 pullup resistor from output to oscillator to +5V. /IOWR now strobes
175 fine at 286 KHz.</li>
176
177 <li>Construct RAM.</li>
178
179 </ul>
180
181 </body></html>
Binary diff not shown
0 ORG 0000h
1
2 START: LD A, 0FFh
3 LOOP: OUT 00h, A
4 JP LOOP
0 ORG 0000h
1
2 LOOP: OUT (00), A
3 JP LOOP
0 ORG 0000h
1
2 LOOP: OUT (00), A
3 INC A
4 JP LOOP
0 ORG 0000h
1
2 LD A, 035h
3 LOOP2: LD B, 0FFh
4 LOOP1: LD C, 0FFh
5 LOOP0: OUT (00), A
6 DEC C
7 JP NZ, LOOP0
8 DEC B
9 JP NZ, LOOP1
10 DEC A
11 JP NZ, LOOP2
12 STOP: JP STOP
0 ORG 0000h
1
2 LD A, 055h
3 LD HL, 0FFFFh
4 LOOP: LD (HL), A
5 LD B, (HL)
6 CP A, B
7 JP NZ, STOP
8 DEC L
9 OUT (00), A
10 JP LOOP
11 STOP: JP STOP