Global Moderator
Melbourne, Australia
Offline
Shannon Member
Karma: 218
Posts: 13896
Lua rocks!
|
 |
« Reply #30 on: May 01, 2012, 05:24:28 pm » |
Try this: http://electronics.stackexchange.com/questions/4172/how-can-i-control-a-cga-screen-with-an-arduinoand: http://zone.ni.com/devzone/cda/tut/p/id/3020It looks like the vertical is the same (60 Hz) so Timer 1 would be unchanged. It also looks like the vertical sync pulses are the same (it still uses 525 lines). So I would be inclined to try and see. If what I read is correct the colour information is sent over 4 consecutive lines, I'm not too sure about that and don't have a CGA monitor to test it on. So you might get something to appear if you tweak delays a bit (eg. the delay at the start of each line).
|
|
|
|
|
Logged
|
|
|
|
|
Offline
God Member
Karma: 4
Posts: 873
|
 |
« Reply #31 on: May 02, 2012, 06:20:31 am » |
I have prepared this documentation file about CGA, it tells you about colors Type Digital, TTL Resolution H x V = 640 x 350 H-freq 15.7 or 21.8 kHz V-freq 60 Hz Colors 6-bit (64)
Pin assignments Pin Name Function 1 GND Ground 2 SR Secondary Red (Intensity) 3 PR Primary Red 4 PG Primary Green 5 PB Primary Blue 6 SG Secondary Green (Intensity) 7 SB Secondary Blue (Intensity) 8 H Horizontal Sync 9 V Vertical Sync
CGA Cabling Pin Assignments Pin Name Notation Description Direction ------------------------------------------------------------------------------------------------------------------------------- 1 Ground GND Bi-directional 2 Ground GND Bi-directional 3 Red R Red Component of a RBG-encoded video signal TTL* (TTL OFF Level for Red gun OFF or TTL ON Level for Red gun ON) To Monitor 4 Green G Green Component of a RBG-encoded video signal TTL* (TTL OFF Level for Green gun OFF or TTL ON Level for Green gun ON) To Monitor 5 Blue B Blue Component of a RBG-encoded video signal TTL* (TTL OFF Level for Blue gun OFF or TTL ON Level for Blue gun ON) To Monitor 6 Intensity I Intensity signal, giving each color an off, medium and high brightness level. The Intensity control affects all guns that are currently on. (TTL OFF Level for all guns OFF or MEDIUM, TTL ON Level for all guns OFF OR BRIGHT) To Monitor 7 +12 VDC +Most monitors do not utilize this supplied power and some computer makers do not provide it. Systems that can generate EGA video modes via the same connector do not provide this voltage. Monitors capable of accepting CGA and EGA can be damaged if this voltage is present. To Monitor 8 Hsync H 15.7Khz Horizontal Sync clock TTL* Positive Polarity To Monitor 9 Vsync V 60Khz Vertical Sync clock TTL* Positive Polarity To Monitor
*TTL signals operate in the range 0.0VDC to 5.0VDC. Levels from 0.0VDC to 0.8VDC are considered to be an "OFF" or "0" state. Levels from 2.0VDC and 5.0VDC are considered to be an "ON" or "1" state. Levels between 0.8VDC and 2.0VDC are not defined and their use is not predictable. Some vendors state that the TTL "ON" state begins at 2.4VDC
RGBI Monitor Color Table ------------------------------------------------ Color(s)* (I) (R) (G) (B) ------------------------------------------------ Black OFF OFF OFF OFF Blue OFF OFF OFF ON Green OFF OFF ON OFF Cyan OFF OFF ON ON Red OFF ON OFF OFF Magenta/Purple OFF ON OFF ON Brown/Orange/Yellow OFF ON ON OFF White/Gray OFF ON ON ON Black/Gray ON OFF OFF OFF Bright Blue ON OFF OFF ON Bright Green ON OFF ON OFF Bright Cyan ON OFF ON ON Bright Red ON ON OFF OFF Bright Magenta/Pink/Purple ON ON OFF ON Bright Brown/Yellow ON ON ON OFF Bright White ON ON ON ON
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
UK
Offline
Brattain Member
Karma: 136
Posts: 18991
I don't think you connected the grounds, Dave.
|
 |
« Reply #32 on: May 02, 2012, 06:33:37 am » |
Is it really a CRT (i.e. is it quite deep behind the screen?) or is it a plasma display?
|
|
|
|
|
Logged
|
Pete, it's a fool looks for logic in the chambers of the human heart.
|
|
|
|
Offline
God Member
Karma: 4
Posts: 873
|
 |
« Reply #33 on: May 02, 2012, 06:56:15 am » |
the toy pulled out from the heavy transportable ? it's a CRT made of glass with a cathode tube inside it's exactly like this: 
|
|
|
|
|
Logged
|
|
|
|
|
nr Bundaberg, Australia
Offline
Tesla Member
Karma: 70
Posts: 6803
Scattered showers my arse -- Noah, 2348BC.
|
 |
« Reply #34 on: May 02, 2012, 07:36:35 am » |
Wow, a genuine "luggable".
_______ Rob
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Melbourne, Australia
Offline
Shannon Member
Karma: 218
Posts: 13896
Lua rocks!
|
 |
« Reply #35 on: May 02, 2012, 03:42:09 pm » |
I warn you that you won't get that resolution. All you can expect is what I showed on the first page of this thread, scaled into the screen. The processor just can't output discrete pulses fast enough.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
God Member
Karma: 4
Posts: 873
|
 |
« Reply #36 on: May 03, 2012, 04:17:56 am » |
well, after evaluating the feature's borders i have converted this project into a cpld project: the cpld in use will be a XC95108 in PLCC84-package which will be added on the final circuit with a swift chunk of ram sram chip (ones pulled out from 486's caches that you can find on vintage pc motherboards), and finally the whole should be enough to have the proper resolution.
The Verilog language will be my best friend in order to describe the whole to the Xilinx ISE synthesizer, and at the end of story a swift "bitstream" will be put into the cpld flash.
This way the project is much similar to he ucVGA board which has a cpld on board.
The gameduino has a more powerful fpga where it has been implemented a J1 stack machine cpu which is justified by the need to have something to process graphical data for video array board in his second stage with no less of 20Mips of power, and this constraints makes the project much more complex cause it require a softcore in where you have to run somethig able to decone the Forth programming.
Fortunately I do not need any Forth (i am not good at Forth programming, it's too complicate for me) and fortunately i do not need any J1 soft core at all because I do not need any graphical stuff (Besides, why would i need something graphical if i have a CGA crt capable of just 1bit of color ?), also i do not need the power of 20Mips from my tiny graphical-adapter-toy, i only need text properly displayed with a good resolution.
=)
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 3
|
 |
« Reply #37 on: August 24, 2012, 03:05:18 pm » |
Hi Nick,
I have played with your color version, it works fine! But what about color text and communication part? Are you try to add all parts together?
|
|
|
|
|
Logged
|
|
|
|
|
Quebec, Canada
Offline
Newbie
Karma: 0
Posts: 39
|
 |
« Reply #38 on: October 29, 2012, 07:58:46 pm » |
what about using two arduino? one for rgb and other one for v sync and h sync? lol
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 64
|
 |
« Reply #39 on: October 30, 2012, 04:35:40 pm » |
Maybe I'm completely wrong but: It is not possible to use a screen with buffer??? Something like the latch on 75HC595 Shift register IC. So you put in the buffer what you want to write, then activate the latch pin, and there is no need for refresh unless you need to change what is shown on the screen.
A screen like this will be perfect, because you can use relative big screens/resolutions with the Atmega IC's without overloading.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 1
|
 |
« Reply #40 on: November 09, 2012, 12:15:30 pm » |
This was mentioned in a post above, but I want to ask the same question again, regarding combining Nick's work on generating sync (which seems to consume _most_ of the cycles of an UNO and Sebastian Tomczak's work ( http://little-scale.blogspot.com/2008/02/hacking-vga-lines-with-arduino.html ) which results in a very rudimentary but very cool "video synth". Sebastian was grabbing his sync from an external source (in his demo he is using the signal from a computer). So if one used a second UNO (or similar) could one use that to generate the RGB signals (which are actually being generated from an audio input source in Sebastian's project) and combine that with the sync being generated with Nick's project (on the first UNO) and merely "splice" the signals together at the actual cable socket? Or better yet, could it all happen on one Arduino? I doubt that given the timing tightness being described, but even if I had to run it on two boards... I have a few laying around, and it would make a cool little AV synth. Any thoughts?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 1
|
 |
« Reply #41 on: December 17, 2012, 02:06:56 pm » |
Hi nick...i'm trying to figure out how to overlay some text on a vga signal....if i understood well just need to detect the vertical sync, count horizontal sync pulses and out some text (video sygnal) over the actual signal on the right time...is this correct?...how can I do this? could you give me some ligth on it?...I don't understand the screenfont.h format...how can i distiguished a single letter from this code?...(sorry for my english)
|
|
|
|
|
Logged
|
|
|
|
|
Mumbai
Offline
Jr. Member
Karma: 0
Posts: 54
Its Simple Technology, What will you do with It!
|
 |
« Reply #42 on: December 19, 2012, 06:21:52 am » |
Nice work, Quite Helpful too 
|
|
|
|
|
Logged
|
|
|
|
|
Czech Republic
Offline
Newbie
Karma: 0
Posts: 2
|
 |
« Reply #43 on: March 05, 2013, 09:40:41 am » |
Thank you Nick, your site is awesome, explanatory kind of "makers" experience. I have just made some experiments with your code, I'd will dig through to modify it for my project's purposes. Thank you so much for sharing it! EDIT: I spent some time with your code (and description) and I could not get gotoXY work properly. I'm sending data from other arduino and I wanted following: CLRSCR GOTOXY 5,5 print some text So I used several variation of char xy[] = {5,5};
sendString (clearScreen); sendString (gotoXY);sendString(xy); // sendString (strcat(gotoXY,xy)); // sendString (gotoXY+xy); // etc... sendString ("Hi!\n"); Could you please point me to some good and working solution to that? Thx. McHa
|
|
|
|
« Last Edit: March 06, 2013, 03:48:41 am by McHa »
|
Logged
|
|
|
|
|
|