go to JCM - one calm and get cool stuff
everything else is done now it's time to
put color on the screen warm up the CRT
it's time for another episode
[Music]
in previous videos we built NTSC
compatible composite video timing now
it's time to put color on the screen so
today we'll be constructing a basic
pixel generator and the associated
analog circuits to make that happen much
of the design used here is informed by
the Lazarus 64 project by lucid science
link in the description in addition the
format of this video is a little bit
different the complexity of this part of
the circuit made it awkward to build on
camera trust me I tried 6 times so we'll
be showing it pre-built let's dig in
here are the major components the color
phase generator this determines what
color a pixel should be the pixel pusher
a rudimentary frame buffer for the sake
of demonstration that generates and
sends pixel data to the screen the
digital to analog converter the final
circuit that mixes all the signals
together to produce an image here are
the components we'll need to build it
[Music]
let's talk about color first to
understand how that works we'll review
how the TV draws to the screen if you
look closely at the color TV tube you'll
see that it's separated into bands of
red green and blue phosphors although
not exactly correct you can imagine that
these are spaced across the screen so as
the electron beam traces across each
triplet is illuminated for 279 point
three six nanoseconds or exactly one
cycle of three point five eight
megahertz so suppose we superimpose a
three point five eight megahertz signal
onto the video signal wherever the peak
of that signal is in relation to where
the electron beam is tracing across
those phosphors that's the color that
will show on the screen
[Music]
a reiterate that this is a pedestrian
view and not remotely correct but it
works to help you wrap your head around
the process to make colors we can feed
the 3.5 eight megahertz color reference
into a circuit that can delay the signal
in time so that the peak rests on the
color we want this is called phase
shifting a simple way to do that is with
a string of buffers a buffer takes an
input and pushes it to an output
bringing the signal back up to normal
levels however it has a phenomenon
called propagation delay that we will
exploit this is the delay between when
the signal is received and when the
semiconductor can saturate enough to
turn on the output if we use buffers
with a known propagation delay we can
select outputs to fit the phases we need
this is what I've done by cross
connecting 5 7 4 LS 2 4 5 octa levers to
get different phase values each buffer
has a typical propagation delay at 5
volts of 7 nanoseconds with 279 point
three six nanoseconds in a three point
five eight megahertz cycle we need about
40 buffers to cover 360 degrees of phase
so if we use five chips we can select
values to get hues evenly spread across
the color spectrum note that you can use
7/4 HC 2 for 5 buffers for a reduction
in current draw however the HC part has
a different response curve on fall times
than on rise times I found that using
the HC part causes colors at the end of
the chain to wash out let's take a look
at the circuit here you can see all of
the buffers chained together the first
buffer receives the 3 point 5 8
megahertz color reference signal and
passes it on down the chain in addition
the buffers are all connected to pixel
enable this ensures that they can only
output a signal during the active video
period and finally at the bottom you can
see the evenly spaced taps chosen to
give colors across the entire spectrum
now let's look at the pixel pusher the
pixel data generator or pixel pusher as
I call it is a simple circuit that
generates a sequential 8-bit number on
every pixel clock this was put together
for ease of demonstration in building
this our
is very simple it's another of our
favorite seven 4hc four zero four zero
timers with pixel clock as the counters
clock and not pixel enable tied to the
counters reset it counts from zero
through 251 then resets at the end of
each line this simulates a true pixel
generator that is fetching byte values
from memory and presenting them to the
rest of the circuit now that we are
generating a byte every pixel clock we
need to know what to do with it
what do each of these bytes mean and how
do we make a picture with it in this
design I have separated the bytes in
half where the lowest four bits are used
for color information called chroma and
the highest four bits are used for
brightness and permission called luma
this gives us sixteen hues x 16
brightness values for 256 distinct color
values so how does this all tie together
let's look at color first first I take
16 evenly spaced taps from the color
phase generator and feed those into 2 7
4 Hz 4 0 5 1 8 channel multiplexers
those multiplexers then receive the low
4 bits of the pixel value from the pixel
pusher depending on which bit value goes
into the multiplexer a particular phase
value will be chosen from the color
phase generator to be routed to the
output which puts that color on the
screen now there are two important
details on how this functions first
since the multiplexers are eight channel
but I'm feeding them 16 values we need
to ensure that the top bit is used as
the enable line so I use an inverter
here the first multiplexer gets the top
bit value directly the second one gets
it from the inverter second you'll
notice one of the inputs is tied
directly to ground this allows us to
have black grays and white in our color
palette at the end both multiplexers
outputs are tied together and sent out
finally the digital to analog converter
now we need to tackle brightness for
this we use a contraption called an R 2
R deck short for resistor 2 resistor
digital to analog converter using the
concept of a resistive voltage divider
we create a DAC with 4 inputs the binary
input directly dictates the voltage that
comes out in 16 discrete steps so we
feed this the high
four bits of our pixel generator and we
get brightness this signal is called
luma this is built using 200 ohm and 100
ohm resistors in the following manner
finally to mix all our color signals
together this is fully within the analog
domain with applications of Ohm's law
capacitive coupling another general
electron Theory skullduggery here it is
step by step luma is fed out through a
180 ohm resistor and goes directly to
the final output combined with the 75
ohm resistance of the TV and all the
other circuit resistances this provides
the right peak white voltage of a route
1 volt chroma is fed through a 560 ohm
resistor then coupled onto the output
with a 100 Pico farad capacitor the
resistor works in concert with the other
resistor values to reduce the maximum
voltage the chroma signal can produce to
keep it within the specification the
capacitor insures the chroma signal is
centered on the luma voltage composite
sync is passed through a 100 ohm
resistor then directly to the output
again the resistor limits the maximum
voltage color burst is passed through a
3300 ohm resistor and then coupled with
a 100 nano farad capacitor into the same
point as composite sync again the
resistor is chosen to keep the value
within the spec and the capacitor
ensures it's centered on the midpoint of
the signal voltage the final output is
our generated video signal
now let's play around a bit and see what
this circuit can do if we disconnect the
chroma output we'll see the shades of
gray the circuit can create if we
disconnect the luma output will see a
barely visible selection of color values
if we bypass the multiplexer we can
choose to output only a particular cue
[Music]
this rich orange is one of my favorites
and with that we have an NTSC signal
generator using jellybean logic as it is
you can use it as a pattern generator to
test televisions to ensure they work but
if you create a proper pixel data
generator you can feed it pixels from a
computer and make a television display
that's my final end goal thanks for
watching remember to Like subscribe and
ring the bell to stay up to date on my
latest adventures you can also support
me through patreon or by snagging some
merch links in the description well
that's all for today's episode while
you're here check out some other videos
and remember eight bits are all you need
[Music]
colorburst is past three 330 ohm
resistor then coupled with a 100 nano
farad capacitor this is a hardened this
one is hard to say