■ FIGURE 2. Schematic.
GND 4 CE 5 IO 6 SCLK 7 VCC1 8
MAX7456 mounted on DIP board
information easy. Additionally, the DS1302 timekeeping
chip makes keeping time easy. A PIC16F688 ties
everything together into a functional circuit. By inserting
the RTC OSD between the output of a CCTV camera
and the input of a VCR, it is possible to have a date/time
stamp written on all recordings.
THE REAL TIME CLOCK
Initially, I tried using a PIC12F683 with the
MAX7456 and no timekeeping chip. Certainly one of the
timers in the PIC would suffice, or so I thought. Basing
the timekeeping functions on an internal timer was not
optimal as program complexity increased. Trying to work
around the limitations of not interrupting
communications in progress to the MAX7456 while
keeping concise time was impractical.
Next, using the Microchip Application Maestro to
include an RTC seemed like a good idea, and it actually
worked quite well. I’d recommend giving it a try if you
have a project that has no other timing constraints as
the software RTC triggers interrupts causing slight
variations to other time-critical functions that require
accommodation. I briefly considered using a PIC24F*
series chip but decided against it as I already had a
PIC16F688, and it would do just fine with a little
help. Since a DS1203 is relatively cheap and it
simplifies battery backup, it just seemed easier than
fussing with software.
On-screen display can be challenging and in this
case, it was made reasonably easy by using the
MAX7456 for displaying the date and time. There are
circuits available online for displaying on-screen data,
plus other OSD chips are available, but I found the
MAX7456 chip to be the easiest of the available options
for the price. The connections are simple: video in and
video out with a small number of supporting
components. Four connections to the PIC16F688 are all
that is needed for the serial interface (SPI).
The MAX7456 is a 28-pin TSSOP package, thus the
pins are very close. I created the board for this project
using the laser toner transfer method, which worked
quite well. I was able to create the pad layout for the
28-pin TSSOP, lay the chip on it, and even solder it, but
not without trepidation.
After spending a great deal of time using solder wick
December 2011 39