Issue
112 November 1999
Tuning
into the HA Channel
Color
Made Easy and More
Changing
character or background colors is simple. The PIC-TV
grabs the color number from the HCS-II command and converts
it to a BOB-II color command, which is sent out via
the hardware UART. Reformatting color commands is simple,
but using them can be a bit more involved.
Color
can only be used when the PIC-TV is in local mode. When
you set the screen color, the entire screen changes
color. However, you can use a background color to paint
the entire character grid. When you do this, you can
create a two-color screen with the character grid set
to the cell background color and the border set to the
original screen color.
In
two-color mode, you can still change the character cell
background color by using the outline color command.
The background color will remain the same for all characters.
Photo 2 shows a screen display using internally generated
color backgrounds.
|

(Click
here to enlarge)
|
Photo 2The PIC-TV can generate detailed color backgrounds
at the screen, grid, or character cell level.
This allows it to draw attention to urgent information.
|
You
can change the color of the characters and character
outlines. However, the characters are somewhat pale
compared to the background.
During
development, I used a cheap modulator and TV for testing.
The characters all looked white no matter what color
I set them to. I spent hours trying to find the "bug"
that was breaking the color commands.
Turns
out, it wasnt the code after all. When I used
my 32 Sony TV and fed the video into it or my
DISH receiver, the character colors were much more defined.
Some
combinations of character and outline colors cause instability
in the display or make the characters look jagged. But
who wants a blue character with a magenta outline anyway?
Leaving the outline black gives the best character definition.
One
feature of the BOB-II is the ability to change character
background colors on-the-fly. If you set the PIC-TV
to only color the character cell background (\m), you
can have different characters with different color backgrounds.
One
trick is to use cell backgrounds to display different
color blocks. Send a space with a specific color background
and you can display status levels with a tiny bargraph
as in Photo 2.
One
of the nicest features of the BOB-II is its ability
to overlay monochrome text onto an existing video signal
(see Photo 3).
|
(Click here to enlarge)
|
Photo 3The BOB-II can generate its own backgrounds
if no external video signal is used. All text
is monochrome when overlaid on an existing video
signal. An ideal application of this mode is to
use a security camera image as a background.
|
But
why stop there? When the motion detectors outside detect
movement at night, the HCS-II turns on the IR illuminators
and the video camera. Using an MCIR-Link, your TV jumps
to a dedicated channel with the feed from the camera
and PIC-TV.
Chimes
alert you if youre not sitting in front of the
TV. The HCS-II then displays all relevant security and
alarm info on the screen and the video camera displays
a picture of
your dog.
OK,
thats a bit extreme, but how about having the
PIC-TV let you know when a car comes in the driveway?
You can easily insert the PIC-TV between your cable
box and TV. Because the PIC-TV display can be turned
on and off by the HCS-II, you can decide when text is
displayed on top of your favorite sitcom.
When
the HCS-II senses a car in the driveway, it flashes
a message in the corner of the screen. Pressing a specific
button on the remote switches the TV to the security
camera.
If
you connect a caller-ID modem to your HCS-II, you can
use the PIC-TV to show the callers number when
the phone rings.
Looking
Ahead
Most
of the I/O in the PIC-TV is serial so there were many
unused I/O pins. With an eye towards the future, I brought
them out to a 14-pin header.
The
PIC-TV only uses about 45% of the 16C63A ROM,
so theres plenty of room to add code for whatever
add-ons anyone comes up with. Swap the 16C63A
for a 16C73A and it could read analog values.
Add more code to the 16C63A and allow 8 bits on the
expansion header to be accessible like a DIO-Link port.
Using
an off-the-shelf OSD module saved me development time
and aggravation, and enabled me to concentrate on features
instead of core operations of the character display.
Although
it increased the cost, I think it made for a more stable
design. And because the HCS-II network protocol is so
straightforward, the PIC-TV can be used in just about
any system with an RS-485 network.
Next
time, Ill cover how to use the PIC-TV in your
HCS-II system in more detail. The PIC-TV can do some
neat tricks, so stay tuned.