I am thinking through how I could turn my analog oscilloscope with X-Y mode and Z input in the back into a simple computer monitor. I am learning about generating a proper sawtooth with a constant current circuit and a capacitor, so that's good for X, horizontal line sweep. Now for the Y I thought I'd do a sweep, but that would give me slightly upward slanted lines. If I do 1000 lines, which should be easy with a 20 MHz oscilloscope (for 60 Hz refresh it should just be 60 kHz for the line sweep and 6 MHz for the Z input), then the slight slope it's probably not noticable. But then I thought, how do I divide the Y ramp sawtooth into a step waveform? And that's how I discovered I could just use a counter, and then some resistor network, and I discovered the analog to digital converter. Haha, some 70 years too late to patent it.
But anyway, I'm looking at various videos on YouTube about this and it seems to me that everyone is talking about Arduino and other microcontrollers, where I am not sure if they actually sink current in the 0/low/off state like good old 74LS161 TTL counter would do? I have the feeling they don't. And I have the feeling that if I want to do the R-2R resistor network to create my up to 2048 lines step waveform with 3 74LS161 chips, then I should probably put a diode on each output pin to prevent the pin from sinking any current, right? Because if not my neighboring pins would sink current away from the intended ladder and would cause distortions. Is that right?
Since you probably only have to answer "yes, diodes please" or "no, no diodes necessary, because ...", and I am pretty sure the answer is "yes", here are a 2 bonus questions:
- I am in a place where I can't get a lot of exotic things, and I found that resistors come in a limited selection 1, 2.2, 3.3, 4.7, 5.6, ... 8.2 or so odd numbers so it'll be a bit difficult to find 1kΩ, and 2kΩ exactly. Any suggestion what I should do? Or not care about the 0.2 difference? UPDATE: oops, I was wrong, I can just use the same resistors everywhere. UPDATE AGAIN: no, as one respondent said: it's not called an R-2R network for nothing.
- Since I need a pixel counter anyway, I wonder if I should just not even bother with the analog horizontal sweep, just say 9 bit horizontal and 10 bit vertical should really be all I would need, right? Any reason why pixel monitors are not built in this very simple way? (Haha, now I really blew the scope of the question.)
I already got 2 answers, but I figured I don't wait and just start building the circuit up, only to notice that I don't have enough diodes that aren't LEDs. So, without diodes, all resistors 1kΩ I want to show what I am getting:
There are nasty jumps on the even 4s and 8s.
Now I just plugged in a second 1 kΩ resistor instead of those diodes (which in my breadboard build-up I had replaced with mere bridges, so now I have 2 x 1kΩ from each pin and 1 kΩ across, and now the steps are a lot more evenly spaced.
(sorry for the bad photo as exposure time must have been way too low to see the full tracing. But it's clear enough.)
One thing I noticed is that I get fuzz on the higher values, you can see it pretty clearly from 10 to 15, while 1,2,3 are pretty sharp.
UPDATE: Adding a buffer (74LS245) indeed works wonders. Here after throwing in a second counter to get to 64:
always fighting with instability on the breadboard and the clock being weird (I run it through 2 Schmitt-trigger inverter in order to, I suppose, straighten out the edges, since without it the counter was counting nonsense.
Finally here 128 lines in X-Y mode, with fake horizontal timing, just a triangle wave created by running the clock over 10 kΩ and a 100 nF capacitor.) Anyway it gives the idea how it can actually work to an extent.
The lines are a little thin on the scope and even with the intensity dialed to the maximum it tends to flicker even at 100 Hz. I suppose a raster screen has a little more long lasting phosphorescence than an oscilloscope.
UPDATE: I have removed unnecessary components from the power and cleaned up the power supply as good as I could get, hooked up my final set of counters with one CMOS 4040 12 bit counter and adding 4 lesser significant bits with a 74LS93 (hooked up in an odd way B-C-D-A just because I can).
Then I threw in a 4 MHz crystal on the simple double inverter oscillator, and that gives me a screen refresh rate at just over 60 Hz.
I bought two DAC 0808 chips, but I couldn't get them to work, so I just re-built my fine R-2R resistor network again, this time with 1% resistors at very odd values around 1 and 2 kΩ. Since output goes to scope (high impedance) I use no further op-amp buffers (even just to avoid the headache of rail-to-rail op amp).
My result is very satisfying! No more fuzz on the upper lines. And it proves that the oscilloscope display might be the easiest display to create from scratch! I have all the counters ready to address the bitmap and shift the pixels into the Z-input (which I'm still learning how to do.). But here is a demo of how nice it works:
PS: for those who said it can't be done ... here it is.