PDA

View Full Version : PIO interface with t.v. help


UncleBinary
December 15th, 2006, 07:37 PM
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?

Terry Yager
December 15th, 2006, 09:26 PM
Ummn, mebbe I'm crazy but, didn't the ELF use an 1802 CPU? I dunno if anyone ever interfaced any Z80-centric hardware to it, but who knows?

--T

sjv
December 15th, 2006, 09:43 PM
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

Thrashbarg
December 15th, 2006, 09:58 PM
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.

carlsson
December 16th, 2006, 05:34 AM
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).

UncleBinary
December 16th, 2006, 10:04 AM
I meant how to interface a z80a with a PIO to a t.v. without enormous cicuitry.I dont know the timings for the NTSC format.

Thrashbarg
December 16th, 2006, 01:05 PM
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.

bbcmicro
December 16th, 2006, 04:07 PM
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.

UncleBinary
December 16th, 2006, 05:41 PM
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?

sjv
December 16th, 2006, 06:49 PM
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

Thrashbarg
December 16th, 2006, 06:55 PM
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.

sjv
December 16th, 2006, 07:06 PM
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

UncleBinary
December 16th, 2006, 08:46 PM
I have tried to read up on NTSC but there is almost nothing on the web.any sites?

UncleBinary
December 20th, 2006, 10:48 AM
thanks for the schematics but waht about the software?and the clock speed?and is it CMOS or TTL?

sjv
December 20th, 2006, 02:37 PM
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

UncleBinary
December 22nd, 2006, 10:57 AM
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.

sjv
December 22nd, 2006, 11:49 AM
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

modem7
December 22nd, 2006, 02:58 PM
Basic info on P8275H at:
http://members.dodo.com.au/~iamextinct/misc/P8275H.jpg

nige the hippy
December 22nd, 2006, 04:00 PM
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!

grant
December 22nd, 2006, 06:34 PM
The 8275 is still available. Just not from Intel. Unicorn Electronics has them.

UncleBinary
December 22nd, 2006, 08:10 PM
If you think its obsolete then what other CRT controllers are there that don't smash my bank.

Thrashbarg
December 22nd, 2006, 10:46 PM
I asked for information on the 8276 ages ago here, but the closest I got to it was the 8275. A member was kind enough to scan the datasheet.

http://kaput.homeunix.org/~thrashbarg/8275-1.pdf 5MB

grant
December 23rd, 2006, 02:59 AM
Why does it matter if its obsolete? This is the Vintage Compuer forums...

nige the hippy
December 23rd, 2006, 03:38 AM
6845 or 6545 (pretty well equivalents) they were so well used that when there aren't any real ones left, there are verilog descriptions available for making your own from a PLD.

UncleBinary
December 23rd, 2006, 11:17 AM
thrashbarg your link sends me to the page but its blank.

mbbrutman
December 23rd, 2006, 12:25 PM
The link worked for me - it took a while, but it finally succeeded. It is a PDF file, so make sure you have a suitable reader.

Now, onto something less pleasant.

I need to remind everybody to use the private message system for messages that are not of general interest to the rest of the group. The last post about the page being blank probably should have been sent privately, and if it truely was blank then a correction could be publicly posted.

Also, if you .sig is longer than your message, you probably shouldn't have posted the message.

Lets try to keep the noise to signal ratio to something tolerable.

Thrashbarg
December 24th, 2006, 05:43 AM
I'm only on a 64k upload here. Give me a break.

I've taken the datasheet down because a bot decided to download it a few dozen times, if someone wants it please PM me.