VGA pin usage
Toby Seckshund
Posts: 2,027
I have tried to just not drive the whole lot of VGA pins, that is I want to use just the lower four, of the eight usually allocated.
So what I want to know is, are the unused pins useless whilst the VGA mode is selected or are they released for othe uses. I want to use just the lower four for VGA and the upper four for a SD card.
Or is it " go and read the Counters artical again, and .... "
It was this bit of PropBASIC (VGA Demo) that got me interested
'
'·················+
VMode 00=Disable, 01=VGA, 10=Baseband, 11=broadcast
'···· ············ |··· +
CMode 0=2color, 1=4color
'················ ·|····|····································+
Pin group 23..16
'··················|··· |···································· |·········· +
Drive all 8 video pins
VCFG = %0_01_1_0_0_000_00000000000_010_0_11111111 ' Setup video configuration
so I put the upper four driven bits to 0s and they do not output VGA info, as expected, but the SD card will not work on them ( having changed the pin allocations in the program )
Post Edited By Moderator (Bean) : 2/7/2010 4:19:37 PM GMT
So what I want to know is, are the unused pins useless whilst the VGA mode is selected or are they released for othe uses. I want to use just the lower four for VGA and the upper four for a SD card.
Or is it " go and read the Counters artical again, and .... "
It was this bit of PropBASIC (VGA Demo) that got me interested
'
'·················+
VMode 00=Disable, 01=VGA, 10=Baseband, 11=broadcast
'···· ············ |··· +
CMode 0=2color, 1=4color
'················ ·|····|····································+
Pin group 23..16
'··················|··· |···································· |·········· +
Drive all 8 video pins
VCFG = %0_01_1_0_0_000_00000000000_010_0_11111111 ' Setup video configuration
so I put the upper four driven bits to 0s and they do not output VGA info, as expected, but the SD card will not work on them ( having changed the pin allocations in the program )
Post Edited By Moderator (Bean) : 2/7/2010 4:19:37 PM GMT
Comments
If you put in "01_011", then only 4 pins would be used, pins %01000-%01011 (8-11).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
Post Edited (Rayman) : 2/7/2010 10:46:27 PM GMT
The video hardware will only drive the pins that have a 1.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Use BASIC on the Propeller with the speed of assembly language.
PropBASIC thread http://forums.parallax.com/showthread.php?p=867134
I tried the masking bits 0s for SD and 1s for VGA but that didn't seem to be what I wanted, but then as I am trying to bend the DracBlade design something else may be the problem. In the Prop manual it always states 8 bits.
Rayman also used the phrase " top bit " I wonder if it means that the top 4 could be used for the VGA and the lower bits for the SD ????
more playing required.
Edit.
I have just tried to simplify things by doing the same thing on PropComm(vga), just in case the DracBlade software was fighting me. I have the same results, although the upper four bits are masked off the card cannot use them.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
Post Edited (Toby Seckshund) : 2/7/2010 8:24:18 PM GMT
It seems a shame to blow the use of 1/8 of the pins, the single pin version just doesn't have the resolution I need.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
"Read and understand" is not easy for the hard of thinking.
It's a part of the pin harvest to try the SDRAM fiasco. I was also looking at switching out the EEPROM after bootup.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
I understand the basics of how the signal is generated. I can follow the horizontal and vertical syncs. What I don't quite yet follow is how the pins create the analog signal which means I cannot reduce the pins with any understanding.
I think to turn the pins off is as easy as making those lower bits "0" in the VCFG, but it's impact on the signal and hence display I don't understand. I think the VCFG is loaded in a number of places, so that could be your problem.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
The main problem I have is that all the good folks on this forum have laid such wonderful snippits of code and hardware before me that "pick-n-mix" gets you a ..... without having to get into the roots of the problem. I recon that is why I yearn for the Z80 days, there was little help and if you didn't do it yourself then it didn't happen, it made me learn. I will continue to experiment on PropCOMM and the hopefully take a crack at DracBlade (ish). There must be somebody out there who knows if it is possible or not (Chip).
I asked the same question about a year back but it went the way of other ways of generation. single pin Vid would be ok for debug etc but I want to have better resolution for a text/block graphics screen.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
manual·says it is·so to leve the options to use the other 3 pins for something else.
How do you turn them off so waitvid does not effect them, i'm not sure right now.
·
I have been looking at the 1-pin TV by ericball. That is a different method and uses single ended duty mode to generate the drive for the TV.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
Some of the relevant code in the dracblade (high res vga object) is here
But there is so much more that needs changing
To my way of thinking pins is proportional to speed. I use 12 and Cluso uses about 28 and yes his code is faster on pure ram access. But the zicog instructions still take time, so at the end of the day you can have a 3.5Mhz Z80 or maybe a 5Mhz one.
But you give up some colors. Oh no!
How many pins are you going to gain - maybe go from 12 to 16? It won't make much of a difference to the emulation speed.
I guess the question is what you intend doing with a board. For me, I'm using it for a wireless network and the long range needs slow baud rates it doesn't matter if the code is slower and Basic running in CP/M is more than fast enough. I can still log into a remote board and interact with it wirelessly in a normal sort of way.
But your application may help decide whether it is worth pulling the vga object to bits. (I know I wouldn't be game).
With external ram I don't think you can make it any faster than Cluso's matchbox computer.
But I think there might well be neater solutions, and the one that intrigues me is trying to reclaim up to 14k of hub ram lost from loading in cogs, then write a smart paging system that has the most used packets in hub ram and less used ones in external ram.
Pondering this more, that may still not be faster than cluso's ramblade, as there is still the overhead of checking if a packet is in hub or not. 14k could store a lot - it could store all the commonly used bits of CP/M (eg conin and conout) and it would end up storing 0-FFH and it would end up with the program from 100H up, and if that program were small, maybe 10k, then the system might never access external ram. So if you hardly ever accessed external ram then that ram could be serial ram.
But it involves a massive rewrite of the system. I spent 4 hours just trying to combine all the different spin objects in the dracblade into one spin object but there were so many variable names that then clashed that I gave up. And combining them all together could be the first step to making contiguous hub ram. I think cluso is trying to rewrite objects so they load their cogs through a common area of hub ram, but that is not easy either, and you probably need the source code for a spin compiler and/or a deep understanding of exactly how each object works.
I'm particularly interested in the idea of an SPI or I2C ram chip using just a couple of lines as it frees up lots of pins for analog I/O and sound and maybe another serial port. I'd sacrifice more speed to get those things, but I'm not sure how to get there.
Anyway, enough rambling. I suppose the question is what you would do with the ?3 pins you could save and which memory chip that could access.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller
But most of all I have to get deep into the code at some point, and this is my interest/excuse ( and now even work is conspiring against it )
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
'implant pin settings
reg_vcfg := $2000000F + (BasePin & %111000) << 6
i := $0F << (BasePin & %011000)
j := BasePin & %100000 == 0
reg_dira := i & j
reg_dirb := i & !j
I have taken $200000FF down to $2000000F, as expected and as suspected the DIRA bit required the i := $FF << (BasePin & %011000) needed to be i := $0F << (BasePin & %011000).
PropCOMM now runs H+V suncs with two "colour pins" P16,P17,P18 AND P19 with the SD on P20,P21,P22 and P23.
And DracBlade, with no ram. 18/20 free pins now for the experiments.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
Post Edited (Toby Seckshund) : 2/9/2010 9:43:46 PM GMT
I think I used dark blue for background and you might end up with a brighter blue but no problem. Re that screenshot, I see it is crashing out to the single step - ie zicog isn't loading or running so I presume you need to get that fixed (is that because you have no ram??)
I guess if you really wanted lots of pins you could just use one serial port and a terminal program on the PC, and that would free up almost all the propeller pins. Anyway, if you have enough to start experimenting with ram then it is all systems go. What I did was to write a driver in spin first and test it one line at a time and eventually got it to the point it stored a byte, read that byte back and then flashed a led if the bytes matched. It was easier to debug spin. Then I translated that spin to pasm and put it in the ram driver object. And finally when that was working I copied that code into the zicog.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller
Using only 6 pins.
128kB of fast memory in a 32k x 32-bit Organization
SEQUENTIAL read and writes are as fast as other solutions that are using 16 pins.
P.S. the 6 pins could share the pins with the SD card.
Now you have sussed it, maybe we can get reduce even further although the white on blue is nice
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
Hook up Blue vga pin to 3.3v for always on.
hook up Red prop pin to R+G vga pins.
Use red and black palette and you will now have a white and blue screen.
If you get VGA working successfully on the lowest four pins (greyscale or white on blue etc), we may be able to use the upper four pins for SD card via the HD15 connector of the proto board. One can envisage a small HD15M to HD15F adapter card with uSD in the middle and possibly TV out too.
It's possible to recover 4 outputs from the analog 'R' and 'G' pins using a LM339 or similar (ie recovering P20-23 on the other side of the VGA connector despite the fused 240 and 470 ohm resistors). Haven't had a chance to check for race conditions or how to incorporate the input data stream from the uSD card yet.
At the present it is H + V syncs on P16 and P17, as usuall. The two "colour options" are P18 and P19, the two "blue ones"
The White on Blue is actually a light grey. backgound blue, with the 270 Ohm red and greens added in. I haven't gone that deep into the real colours as the 470s and 270s seem to follow the Briel plan rather than the DemoBoard. Yes the crash is just because it can't see the ram, which isn't there, yet. The ram driver writings will follow your path.
Tonyp12
I tried the blue on all the time a while back, using the H sync signal rather than the +3.3 but the monitors clamps faught against it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
Toby, what value resistors are you using for that pic above?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
So with the saved pins - you are going to do cunning RAM things and, hmm, I'm already thinking of another serial port on the dracblade (especially since the serial obex can do up to 4 ports so it is just a matter of a few lines of glue spin). Or - some analog I/O. And I'm sure there will be other uses.
But, does this now give you enough spare pins for the ram experiments? How many pins do you have now?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
Using the tristate gating of the syncs will help the pincount but doesn't the polarity of the syncs tell the monitor what the rate is? The two XORs would naturally give both negative going syncs (or VGA feeds, through inverters), the syncs would be ok in the DracBlade case but might need more inverters for·others. I will think about that one a bit more.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz