• Please review our updated Terms and Rules here

PIO interface with t.v. help

UncleBinary

Experienced Member
Joined
Sep 25, 2006
Messages
96
Location
Monroe,Michigan
Does anyone know how to interface a z80a PIO with a t.v.?I think cosmac elf could do it but I dont have one and there sold out.Oh ya my t.v. format is NTSC.Anyone with a light bulb above their head?
 
Does anyone know how to interface a z80a PIO with a t.v.?I think cosmac elf could do it but I dont have one and there sold out.Oh ya my t.v. format is NTSC.Anyone with a light bulb above their head?

The Ohio Scientific C1P and Superboards used a simple and inexpensive video circuit. These were 6502 based, but could easily be adapted to a Z80. It used a pair of 2114 SRAMs that were crudely dual ported, giving 1K of video memory. One port connected to the system bus, the other connected to a set of counters. The counters ran through memory and read ASCII from the SRAM. The ASCII went through a character generator rom, and out to a shift register to a simple resistor mixer. H and V pulses were generated from taps off the counter through a one-shot.

When the CPU accessed the video SRAM, it would blank the video output. As long as the CPU wasn't accessing memory all the time, you didn't notice it too much.

Ahhh. The early days of computers! The Apple1 did something similar, but used odd 1024 bit shift registers, 5 of them, instead of SRAM!

You can look over the schematics for the OSI board here:
http://www.osiweb.org/osiweb/manuals/600revD.pdf
video circuit is on page 4. The RevD added a 3rd 2114 for color.

-steve
 
There's info about interfacing to PIC microcontrollers here
http://www.rickard.gunee.com/projects/video/pic/howto.php

The principle is the same no matter what device you'll be controlling it with.

Instead of shifting the video signal out manually through software you could always use a 74LS166 shift register for the video data and some extra logic for the sync signal. This will lighten up the CPU load a little.

Edit: This tutorial is for PAL. NTSC in B&W is similar except for the timings.
 
Last edited:
I suppose you could look at the schematics for ZX-80 or ZX-81 (a.k.a. Timex Sinclair 1000) if they're available on the Internet. Those were Z80 based computers with no custom graphics hardware, i.e. the video is generated by the CPU and output onto a TV (through a RF modulator, I suppose).
 
I seriously doubt that the Z80a is fast enough to get a decent resolution and still be able to do other things. The PIC described in the website I posted operates at 12MHz.

Just some calculations, the Z80a uses 4 clock cycles per memory cycle (instruction fetch and execution) and some instructions take up to five memory cycles. That makes a memory cycle of 1MHz. The code requires at least one 'out' instruction (three cycles per pixel), a shift instruction (one cycle per pixel) and something to load the accumulator when it's done (two cycles per 8 pixels). Assuming that you only use these instructions and no loops, making one giant program which the CPU whizzes through, you'll get a horizontal speed of 1/(1MHz/(8*(3+1)+2)) = 34 microseconds. NTSC has a horizontal timing of 62 microseconds (I think, it's about that) so you'll get about two pixels per scan line and no horizontal synchronization.

Also, the PIC page doesn't have complicated circuitry. Just two resistors. To use it on a Z80 just attach them to the PIO.
 
Last edited:
Can't you use a terminal as video output without specific video circuitry, just an RS-232 interface of some sorts? I understand that it may not be what you want but it's just a thought.
I don't know myself.
 
Arrrgh.You still dont get it.I want a NTSC interface but not pixel to pixel
somewhere around where it sends 12 or 20 pixels but acts as though as its 1 pixel.
which should bog down the memory.Question.Didn't cosmac elf do the 20 or how many pixels to 1?
 
Arrrgh.You still dont get it.I want a NTSC interface but not pixel to pixel
somewhere around where it sends 12 or 20 pixels but acts as though as its 1 pixel.
which should bog down the memory.Question.Didn't cosmac elf do the 20 or how many pixels to 1?

Obviously, we are not understanding what you want. To generate NTSC, you need to serialize bits out at a specific rate. Either the CPU has to be fast enough to bit bang a GPIO pin, or you need external circuitry to do it. Since the Z80 is not fast enough, you will need something external.

The 1802 used a companion part, the 1861, to generate video. This part uses the DMA mode built into the 1802 to fetch bytes, and shifts them out.

Sorry, there is no free lunch. I would suggest you read up on NTSC and do it yourself. You seem to know what you want it to do.

-steve
 
http://www.sparetimegizmos.com/Downloads/Elf2k.pdf . This contains schematics derived from the original Elf.

Also there is no useful information available that I can find about the 1861 chip.

There is this, http://www.classicgaming.com/studio2/1861.htm which does give some description of the chip but not how it works.

Bob from Spare Time Gizmos has a design using a small number of parts that emulates an 1861. You can look at his schematic and PLD files linked to the link below. The 09/05 issue of Circuit Cellar had an article describing this.

http://www.sparetimegizmos.com/Hardware/Elf2K_Accessories.htm.

The datasheet also shows a block diagram and a description:

http://homepage.mac.com/ruske/cosmacelf/cdp1861.pdf

-steve
 
Last edited:
thanks for the schematics but waht about the software?and the clock speed?and is it CMOS or TTL?

I"m not sure what schematics you are referring to. The ELF video schematics are 1802 specific. The CDP1861 will not work with anything else as it is highly dependent on the 1802's built in DMA mechanism.

The OSI schematics I pointed you to earlier in this thread requires very little software support. It's a self contained circuit that will read ASCII out of it's video SRAM, send the ASCII through a character generator, and shift it out to the video connector. All the CPU has to do is write the ASCII characters to be displayed into the video ram. This circuit is mainly done in TTL, but could be CMOS or whatever. It could also easily be combined into a CPLD. It's a fairly simple circuit, even if there are a lot of discrete TTL logic parts. The OSI circuit uses a 3.993.6 MHZ crystal which drives the counters. I think it's cool to be able to generate honest to god video using off the shelf TTL parts.

By the way, I believe this OSI circuit is an adaptation from one of Don Lancaster's Cheap Video books. If you can find one of these books, it would be worth buying.

There are simple video controllers chips out there. This isn't my area of expertise, though. Spare Time Gizmos has a 80x24 video card for the Elf2K. It is using a 8275 chip. Something like that should be easy enough to interface to the Z80 since it's an Intel 8080 family part. Mike Riley made a different board for his Elf system that was more bit mapped graphics oriented. It uses a TMS9118/9918 controller.
http://www.elf-emulation.com/hardware.html

Maybe others can pipe in with any other simple old-tech video controller chips. Good luck!

-steve
 
Last edited:
I'm thinking of using the 8275 but I cant find any data sheets or anything on it.Intel doesn't have any info on it, its like it dissapeared.
 
I'm thinking of using the 8275 but I cant find any data sheets or anything on it.Intel doesn't have any info on it, its like it dissapeared.

I couldn't find any data sheets either. You can email Bob Armstrong (spare time gizmos guy) to see if he has one. He must, since he designed a board using it!

-steve
 
I do question the sensibility of designing a homebrew video board around a chip that is not only obsolete, but also virtually unavailable, and has a single page of data on an obscure website!
 
Last edited:
The 8275 is still available. Just not from Intel. Unicorn Electronics has them.
 
Back
Top