PDA

View Full Version : Minimal TV or VGA pins



Toby Seckshund
04-04-2009, 10:42 PM
I wonder if there has been any work done on the absolute minimum number of output pins tha are required to get basic black and white pics?
I realize that sync outputs would leave it at 2 for tv and 2(?) probably 4 for vga.

I am trying to bolt a Z80 with ram onto the side of a prop (Nascom dream) and would like to start with max free pins. Black and white would be in keeping too!

(Please be kind too my probable ignorance)

Toby Seckshund.

Brian Fairchild
04-04-2009, 11:01 PM
For VGA you'll need three pins.

H, V and Video. Drive R, G and B from the Video pin via 3 x 150R resistors.

Ale
04-05-2009, 04:11 AM
If you multiplex the addresses using a pair of 74HCT157 you can save some 7 pins.

Toby Seckshund
04-05-2009, 04:42 AM
Thanks for the replies. As soon as i had posted, I realized that I couldn't count, hey-ho.
I am trying to nail a Z80 to a prop doing a ULA sort of thing and wanted to keep all pins available for my enevitable lack of thinking here at the start.
I have started by a very basic multiplex of the data and addr and will try to use the /busack etc to DMA.
I know I could use Triblade or its original i8080 but I am determined to get down to learning myself, instead of using other peoples good work and wishing it actually did what I wanted.
A couple of pins for a debug screen and eventually the 48x16 real screen would be required, it always seems they come in bunches of 4 pins or 8.

Phil Pilgrim (PhiPi)
04-05-2009, 04:54 AM
You can do VGA with two pins. The trick is to composite the /hsync and /vsync signals onto one pin. This is done by tri-stating the pin when neither sync is present and using the following external circuit:

http://forums.parallax.com/attachment.php?attachmentid=59824

When the pin is floating, both /hsync and /csync will be high. When driven low, /vsync will be low; when driven high, /hsync will be low. You will need to use XOR gates that can source at least 15mA at 3V.

-Phil

_

Post Edited (Phil Pilgrim (PhiPi)) : 4/4/2009 8:59:47 PM GMT

ericball
04-05-2009, 08:00 AM
I seem to recall a one pin composite solution - High, Low & Tri-state for white, sync & black (I think).

Dr_Acula
04-05-2009, 08:25 AM
Hmm - bolting a Z80 onto a propeller? Something I've been playing with too, though all these efforts are about to be rendered redundant by the superb efforts of cluso99 and heater et al.

One solution, tried and true, is a N8VEM Z80 CP/M board talking via standard RS232 to a PockeTerm propeller vga/keyboard board.

This uses serial, and of course this is slow. Loading a 30k program via serial at 38400 baud is about 100x slower than loading it via parallel from a 'ram disk'.

So if you want to connect the two together, the very best solution is to use 16 address lines, 8 data lines and some handshaking lines. Unfortunately, this leaves you with hardly any propeller pins left.

Then there are compromise solutions. You could use an 8 bit 'data bus' between the two, plus maybe a couple of handshaking lines. You could latch the data out into an octal latch eg an HC373 from the Z80. The propeller can latch a byte out directly. You *might* be able to trap an OUT on the Z80 lines by the propeller directly as the prop is running 20x faster than the Z80. But a latch would be more robust. Then perhaps some 245 bidirectional bus transceivers to control the direction. I'd probably go for this sort of 10 line compromise, as it leaves enough prop pins free to do vga/keyboard/serial, ie the clever stuff a prop can do, but still gives you fairly fast parallel data transfer to the Z80.

How far along are you with a schematic etc?

Phil Pilgrim (PhiPi)
04-05-2009, 08:48 AM
Here's a one-pin NTSC solution:

http://forums.parallax.com/attachment.php?attachmentid=59829

White is logic high; sync, logic low; blank level, CTRB programmed for DUTY mode with FRQB set to $4924_0000. The advantage of this over tri-stating for the blanking level is that the Propeller's video generator can be used to generate the visible stuff while CTRB is active. When the video output is high, it's ORed with the DUTY output to yield a high; when low, the DUTY-mode value takes over. CTRB is simply turned off during the syncs, which has to be handled in software.

The resistor values have an output impedance of 75 ohms and will drive a 75-ohm load at 1V P-P. The cap is there to filter the DUTY doody.

-Phil

_

Cluso99
04-05-2009, 09:36 AM
Nice one Phil http://forums.parallax.com/images/smilies/smile.gif
If it involves another chip, in my opinion it may as well be another prop with all the benefits it has, and just communicate over 2 pins at 14Mbps.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:

· Home of the MultiBladeProps: TriBladeProp (http://forums.parallax.com/showthread.php?p=786418), SixBladeProp (http://forums.parallax.com/showthread.php?p=780033), website (Multiple propeller pcbs) (http://bluemagic.biz/cluso.htm)
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator) (http://forums.parallax.com/showthread.php?p=790917)
· Prop Tools under Development or Completed (Index) (http://forums.parallax.com/showthread.php?p=753439)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index (http://forums.parallax.com/showthread.php?p=778427))
· Search the Propeller forums (via Google) (http://search.parallax.com/search?site=parallax&client=parallax&output=xml_no_dtd&proxystylesheet=parallax&proxycustom=<HOME/>&ie=&oe=&lr=)
My cruising website is: ·www.bluemagic.biz (http://www.bluemagic.biz)·· MultiBladeProp is: www.bluemagic.biz/cluso.htm (http://www.bluemagic.biz/cluso.htm)

virtuPIC
04-05-2009, 07:08 PM
Okay Phil, you've won this contest. But what about adding a few gates / a 16V8 / a small memory as hardware palette? Okay, this would also be an idea for a many-pin-video-output.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Airspace V - international hangar flying!
www.airspace-v.com/ggadgets (http://www.airspace-v.com/ggadgets) for tools & toys

Toby Seckshund
04-05-2009, 07:33 PM
I have gone for 8 lines for all data and addr using latches and bi-directional buffers etc. These will steared by the prop which will supply the clock to the Z80. Hopefully this will give me a chance to trap "magic" locations in memory mapping ie video map and i/o ie kbd and serial. I know that the more multiplexing gives speed hits and so will unravel more and more when/if it gets going. I have a cmos Z80 and only sram so bringing the Z80 to a stop for housekeeking should olny screw up the k.i.p. figures. All this heart ache due to stupidity 10 years ago when I chucked out my Nascom2, it was probably the last time I was completely ok with machine code upwards hence my wish to get fully into a truly flexible proc. Now I have started to get interested in the prop1 they are going to change to Prop2. I yearn for the days when there was a visible gap between the pins, Heater is right "The past is not ...

Toby Seckshund
04-05-2009, 07:52 PM
Cluo99

I have done much as you say hc573's hc245 and a few glue gates. Only one 32k sram so far as I seem to have a load of "pulls" (even a 6116, I tremember going green with envy when a mate got some of those back in the early 80@'s.

If it is not a total whast of space I'll try to get it out

ericball
04-09-2009, 11:06 PM
Phil Pilgrim (PhiPi) said...
Here's a one-pin NTSC solution:

White is logic high; sync, logic low; blank level, CTRB programmed for DUTY mode with FRQB set to $4924_0000. The advantage of this over tri-stating for the blanking level is that the Propeller's video generator can be used to generate the visible stuff while CTRB is active. When the video output is high, it's ORed with the DUTY output to yield a high; when low, the DUTY-mode value takes over. CTRB is simply turned off during the syncs, which has to be handled in software.

The resistor values have an output impedance of 75 ohms and will drive a 75-ohm load at 1V P-P. The cap is there to filter the DUTY doody.

Cool!· No reason you couldn't vary FRQB for some low resolution greyscale (maybe a background color with a white text overlay).
·

mikediv
04-10-2009, 12:19 AM
Phil will all the regular TV objects and drivers still work with this one wire setup???

Phil Pilgrim (PhiPi)
04-10-2009, 12:49 AM
No. They would have to be modified, since they use a resistor DAC to get the different voltage levels. To get the minimum three levels this way you need two pins.

-Phil

Cluso99
08-07-2009, 07:30 PM
@Phil: I have just been looking at your schematic for H & V sync for VGA. I realised the top exclusive or gate can be replaced by a buffer (2 inverters in series) and the lower exclusive or gate with an inverter.

Your output series resistors are 150R whereas the prop circuits use 240R for H & V sync. I presume the value is not that critical ???

For the composite 1-pin video, what would be your suggestions if 2 pins were available?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:

· Home of the MultiBladeProps: TriBladeProp (http://forums.parallax.com/showthread.php?p=786418), RamBlade (http://forums.parallax.com/showthread.php?p=810753), TwinBlade (http://forums.parallax.com/showthread.php?p=806697),·SixBlade (http://forums.parallax.com/showthread.php?p=780033), website (http://bluemagic.biz/cluso.htm)
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator) (http://forums.parallax.com/showthread.php?p=790917)
· Prop Tools under Development or Completed (Index) (http://forums.parallax.com/showthread.php?p=753439)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index (http://forums.parallax.com/showthread.php?p=778427)) ZiCog (Z80), MoCog (6809)
· Search the Propeller forums (via Google) (http://search.parallax.com/search?site=parallax&client=parallax&output=xml_no_dtd&proxystylesheet=parallax&proxycustom=<HOME/>&ie=&oe=&lr=)
My cruising website is: ·www.bluemagic.biz (http://www.bluemagic.biz)·· MultiBladeProp is: www.bluemagic.biz/cluso.htm (http://www.bluemagic.biz/cluso.htm)

Phil Pilgrim (PhiPi)
08-08-2009, 12:22 AM
Cluso99,

240R is actually closer to the mark for all the resistors (including the RGB outputs). I had mistakenly assumed that the output level into a 75R load should be 1V P-P when, in fact, the specs call for 0.7V P-P. Neither value provides the correct 75R source impedance, though. To do that you'd have to combine a series resistor (of a different value) with a resistor to ground. But for short cables, it seems not to matter.

BTW, good catch with the buffers and inverters!

-Phil

Cluso99
08-08-2009, 07:58 AM
Thanks Phil. Analog is not my speciality :-(
I am using your concept in an upcoming project and I already require an inverter. I did not want to use a 74xx86 exclusive or so I was working out the truth table and discovered it was only an inverter and buffer. I thought it worthwhile posting.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:

· Home of the MultiBladeProps: TriBladeProp (http://forums.parallax.com/showthread.php?p=786418), RamBlade (http://forums.parallax.com/showthread.php?p=810753), TwinBlade (http://forums.parallax.com/showthread.php?p=806697),·SixBlade (http://forums.parallax.com/showthread.php?p=780033), website (http://bluemagic.biz/cluso.htm)
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator) (http://forums.parallax.com/showthread.php?p=790917)
· Prop Tools under Development or Completed (Index) (http://forums.parallax.com/showthread.php?p=753439)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index (http://forums.parallax.com/showthread.php?p=778427)) ZiCog (Z80), MoCog (6809)
· Search the Propeller forums (via Google) (http://search.parallax.com/search?site=parallax&client=parallax&output=xml_no_dtd&proxystylesheet=parallax&proxycustom=<HOME/>&ie=&oe=&lr=)
My cruising website is: ·www.bluemagic.biz (http://www.bluemagic.biz)·· MultiBladeProp is: www.bluemagic.biz/cluso.htm (http://www.bluemagic.biz/cluso.htm)

Phil Pilgrim (PhiPi)
08-08-2009, 10:06 AM
Cluso99,

Just make sure that the inverters you use can source enough current to drive a 75-ohm load adequately, if necessary. I've even seen HYSYNC and VSYNC driver circuits that completely omit the series resistors from logic gate outputs, along with docs that claim the sync outputs need to be TTL compatible. Also, bear in mind that your RGB output pin needs to source about 30mA to drive all three VGA color inputs.

-Phil

Cluso99
08-08-2009, 01:56 PM
Thanks Phil. Yes I am planning on using 74LVCxx.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:

· Home of the MultiBladeProps: TriBladeProp (http://forums.parallax.com/showthread.php?p=786418), RamBlade (http://forums.parallax.com/showthread.php?p=810753), TwinBlade (http://forums.parallax.com/showthread.php?p=806697),·SixBlade (http://forums.parallax.com/showthread.php?p=780033), website (http://bluemagic.biz/cluso.htm)
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator) (http://forums.parallax.com/showthread.php?p=790917)
· Prop Tools under Development or Completed (Index) (http://forums.parallax.com/showthread.php?p=753439)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index (http://forums.parallax.com/showthread.php?p=778427)) ZiCog (Z80), MoCog (6809)
· Search the Propeller forums (via Google) (http://search.parallax.com/search?site=parallax&client=parallax&output=xml_no_dtd&proxystylesheet=parallax&proxycustom=<HOME/>&ie=&oe=&lr=)
My cruising website is: ·www.bluemagic.biz (http://www.bluemagic.biz)·· MultiBladeProp is: www.bluemagic.biz/cluso.htm (http://www.bluemagic.biz/cluso.htm)

blittled
10-06-2009, 07:09 AM
Toby: Are you willing to share your Z80 project? I have been thinking along the same lines in using a propeller for an ULA for a ZX81 clone. I've got a bunch of Z80s and sram I was planning to use. Thanks!

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
What electronics need - MORE POWER!!!!!!!

Cluso99
02-19-2010, 10:39 AM
Here is a modified 1-pin TV demo.

Parameters currently·fixed to 40x25 text NTSC using·5MHz xtal PLLx16 Text only Inverse video using top bit=1 ($8x) Font 8x8 in cog (Ai Atari) 128 characters Text buffer in hub (other programs could access directly if required e.g. Preditor?) VT100 subset in cog (later - IIRC about 120 longs free)

The old calculation code is still there but commented out. If you want to run this to get the parameters calculated for a different size/clock, then you will need to temorarily·comment out half the fonts for space. I am working on doing the calcs in spin (if required).

I have found that 270R is a brighter display. The code is set to use pin 14 which lines up with the 270R. It is fine to test with an existing TV circuit.

I would appreciate any feedback regarding how it displays on various monitors/TVs.

Original 1-pin TV by Eric Ball http://forums.parallax.com/showthread.php?p=862419· (thread appears to have lost it's subject)

My 1-pin Keyboard thread http://forums.parallax.com/showthread.php?p=862504

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:

· Home of the MultiBladeProps: TriBlade (http://forums.parallax.com/showthread.php?p=786418),·RamBlade (http://forums.parallax.com/showthread.php?p=849265),·SixBlade (http://forums.parallax.com/showthread.php?p=780033), website (http://bluemagic.biz/cluso.htm)
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator) (http://forums.parallax.com/showthread.php?p=790917)
· Prop Tools under Development or Completed (Index) (http://forums.parallax.com/showthread.php?p=753439)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) (http://forums.parallax.com/showthread.php?p=778427) ZiCog (Z80) (http://forums.parallax.com/showthread.php?p=788511) , MoCog (6809) (http://forums.parallax.com/showthread.php?p=811043)·
· Prop OS: SphinxOS (http://forums.parallax.com/showthread.php?p=819353)·, PropDos (http://www.orrtech.us/propdos/) , PropCmd (http://obex.parallax.com/objects/440/)··· Search the Propeller forums (http://search.parallax.com/search?site=parallax&client=parallax&output=xml_no_dtd&proxystylesheet=parallax&proxycustom=<HOME/>&ie=&oe=&lr=)·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz (http://www.bluemagic.biz)·· MultiBlade Props: www.cluso.bluemagic.biz (http://www.cluso.bluemagic.biz)

Post Edited (Cluso99) : 2/19/2010 2:49:39 AM GMT

Cluso99
02-19-2010, 01:40 PM
Here is the standalone program to calculate the fixed parameters for the 1-pin TV I just posted.

Note ochrev is not calculated nor required. I will remove the definition from the 1-pin TV code next update.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:

· Home of the MultiBladeProps: TriBlade (http://forums.parallax.com/showthread.php?p=786418),·RamBlade (http://forums.parallax.com/showthread.php?p=849265),·SixBlade (http://forums.parallax.com/showthread.php?p=780033), website (http://bluemagic.biz/cluso.htm)
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator) (http://forums.parallax.com/showthread.php?p=790917)
· Prop Tools under Development or Completed (Index) (http://forums.parallax.com/showthread.php?p=753439)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) (http://forums.parallax.com/showthread.php?p=778427) ZiCog (Z80) (http://forums.parallax.com/showthread.php?p=788511) , MoCog (6809) (http://forums.parallax.com/showthread.php?p=811043)·
· Prop OS: SphinxOS (http://forums.parallax.com/showthread.php?p=819353)·, PropDos (http://www.orrtech.us/propdos/) , PropCmd (http://obex.parallax.com/objects/440/)··· Search the Propeller forums (http://search.parallax.com/search?site=parallax&client=parallax&output=xml_no_dtd&proxystylesheet=parallax&proxycustom=<HOME/>&ie=&oe=&lr=)·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz (http://www.bluemagic.biz)·· MultiBlade Props: www.cluso.bluemagic.biz (http://www.cluso.bluemagic.biz)

Cluso99
02-19-2010, 11:52 PM
I·located the 1-pin TV thread so I am continuing there.

One Pin TV Text driver· http://forums.parallax.com/showthread.php?p=822453

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:

· Home of the MultiBladeProps: TriBlade (http://forums.parallax.com/showthread.php?p=786418),·RamBlade (http://forums.parallax.com/showthread.php?p=849265),·SixBlade (http://forums.parallax.com/showthread.php?p=780033), website (http://bluemagic.biz/cluso.htm)
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator) (http://forums.parallax.com/showthread.php?p=790917)
· Prop Tools under Development or Completed (Index) (http://forums.parallax.com/showthread.php?p=753439)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) (http://forums.parallax.com/showthread.php?p=778427) ZiCog (Z80) (http://forums.parallax.com/showthread.php?p=788511) , MoCog (6809) (http://forums.parallax.com/showthread.php?p=811043)·
· Prop OS: SphinxOS (http://forums.parallax.com/showthread.php?p=819353)·, PropDos (http://www.orrtech.us/propdos/) , PropCmd (http://obex.parallax.com/objects/440/)··· Search the Propeller forums (http://search.parallax.com/search?site=parallax&client=parallax&output=xml_no_dtd&proxystylesheet=parallax&proxycustom=<HOME/>&ie=&oe=&lr=)·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz (http://www.bluemagic.biz)·· MultiBlade Props: www.cluso.bluemagic.biz (http://www.cluso.bluemagic.biz)