Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 12:25 27 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : MM or Duino composite colour change.

Author Message
pickle9000
Newbie

Joined: 30/03/2012
Location: Canada
Posts: 6
Posted: 02:25am 30 Mar 2012
Copy link to clipboard 
Print this post

Yes I am Canadian, I spell colour with a u.

So first post, this looks like the place to ask, I have done my searches so hopefully this is new.

I was looking at the composite (video) signal and the active video part covers all three areas of the RGB signal (the colour level part). Of course that is to make white. Has anyone tried to reduce the size of the pulse and vary its location so that a composite monitor can show more than black and white. This would only allow you to change the entire screen colour foreground but that could be very handy.

I really like the cost of those small lcd monitors easily 20-25 bucks and it has a case. Way better than a typical 2 line display, way easier to use as well.

This kind of change would require no extra pins and should be a fairly minor change.

...mike
 
crackerjack

Senior Member

Joined: 11/07/2011
Location: Australia
Posts: 164
Posted: 04:53am 30 Mar 2012
Copy link to clipboard 
Print this post

Hi pickle9000, I think this has been tried in one form or another. See this topic thread for details...
 
djuqa

Guru

Joined: 23/11/2011
Location: Australia
Posts: 447
Posted: 05:16am 30 Mar 2012
Copy link to clipboard 
Print this post

  crackerjack said   Hi pickle9000, I think this has been tried in one form or another. See this topic thread for details...
That only works with the VGA output by swithcing in/out different combinations of the RedGreenBlue signals. The Composite signal would need to be encoded with either PAL or NTSC Chrominance information.
Edited by djuqa 2012-03-31
VK4MU MicroController Units

 
pickle9000
Newbie

Joined: 30/03/2012
Location: Canada
Posts: 6
Posted: 05:39am 30 Mar 2012
Copy link to clipboard 
Print this post

Here are two snippits from the olimex version of basic source code in C.

Now it does not apply to the vga mods (which I have read and are hardware related) because you have to control the RGB firing with 3 lines. Composite is another story, by default to get white you must turn on RG and B at the same level. The current software is doing that. So it should be just a matter of changing the timing of the routine that generates the white pixel.


This is the variable set for composite monitors

// Parameters for NTSC composite video
// Graphics is 304x216 pixels. This gives us 50 chars per line and 18 lines per screen
/*
#define C_VRES 234 //216 // Vert graphics resolution (pixels)
#define C_HRES 480//304 // Horiz graphics resolution (pixels)
#define C_LINE_N 262 //(525 / 2) // number of lines in NTSC frames
#define C_LINE_T 5080//5084 // Tpb clock in a line (63.55us)
#define C_VSYNC_N 3 // V sync lines
#define C_VBLANK_N (C_LINE_N - C_VRES - C_VSYNC_N) // Nbr of blank lines
#define C_PREEQ_N ((C_VBLANK_N/2) - 8) // Nbr blank lines at the bottom of the screen
#define C_POSTEQ_N (C_VBLANK_N - C_PREEQ_N) // Nbr blank lines at the top of the screen
#define C_PIX_T 9//11 // Tpb clock per pixel
#define C_HSYNC_T 374 // Tpb clock width horizontal pulse
#define C_BLANKPAD 4//8 // number of zero words (4 bytes each) before sending data


This is the part that seems to generate a single scan line.

#ifdef OLIMEX
VRes = S.C_VRES;
HRes = S.C_HRES;
VC[0] = S.C_VSYNC_N;
VC[1] = S.C_POSTEQ_N;
VC[2] = S.C_VRES;
VC[3] = S.C_PREEQ_N;
SpiChnOpen(P_VIDEO_SPI, SPICON_ON | SPICON_MSTEN | SPICON_MODE32 | SPICON_FRMEN | SPICON_FRMSYNC | SPICON_FRMPOL, S.C_PIX_T);
OpenOC5(OC_ON | OC_TIMER3_SRC | OC_CONTINUE_PULSE, 0, S.C_HSYNC_T);
OpenTimer3(T3_ON | T3_PS_1_1 | T3_SOURCE_INT, S.C_LINE_T-1);


The item of interest is C_PIX_T clock per pixel. To get color you would lower this time by about a third then generate two more spots next to it (time wise) then by putting one of those places on or off you would get a potential 8 colours. More if you could set an analogue level to them.

...mike

 
djuqa

Guru

Joined: 23/11/2011
Location: Australia
Posts: 447
Posted: 05:45am 30 Mar 2012
Copy link to clipboard 
Print this post

Exactly, That other thread was talking about a Hardware Switching Arrangement for VGA.
Overall I think it is a LOT of mucking around for very little real benefit.
If you need COLOUR Output use either a GameDuino Shield or a COLOUR LCD shield


and BTW I use 2 of these tiny 3.5inch Composite RearView Camera monitors with the Duinomites.


Edited by djuqa 2012-03-31
VK4MU MicroController Units

 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3802
Posted: 07:31am 30 Mar 2012
Copy link to clipboard 
Print this post

For colour you'd either need lots more memory (none is spare) or a smaller number of chars, and neither look that attractive (to me) compared to either as-is or those colour shields. Or am I missing something?

John
 
pickle9000
Newbie

Joined: 30/03/2012
Location: Canada
Posts: 6
Posted: 07:33am 30 Mar 2012
Copy link to clipboard 
Print this post

Same monitors I'm using, good price.

Well I've had a little bit of investigation time. The pin that is being used to generate the video is normally used in accessing external memory (RAM). It was chosen because it was so configurable (timing wise). It does not have analogue capabilities.

I think it is capable of setting 6 colors (full brightness) red green blue and mixing all three to make white as well as red green mix and green blue mix. The mix it can't achieve would be a red blue mix. That is because of the space required. Again this would be of no use to a vga monitor but for composites should work as far as I can see unless there is a minimum timing limit. That is the pulse width to hit the single color.

If you want to read about it this is the original source, chapter 13 is about video. Its a free pdf and looks like a really interesting book.

Programming 32-bit Microcontrollers in C - Exploring the PIC32

...mike
 
VK2MCT
Senior Member

Joined: 30/03/2012
Location: Australia
Posts: 120
Posted: 07:46am 30 Mar 2012
Copy link to clipboard 
Print this post

Hi pickle9000,

Reducing the height of the pulse in a composite video signal will reduce the brightness (called luminance) of the text/image on the screen (towards gray and eventually black). Changing the position of the pulse would change the position of the text/image on the screen, but not result in any change in colour.

All this though reminds me however that way back in 1975 when colour TV was introduced in Aust, some charlatans advertised and sold 'kits' for converting a B&W TV into a colour TV.

Two versions of the kit were available as I recall:
* a number of pieces of celophane (coloured sheets of plastic) that could be popped over the screen.
* pairs of glasses with coloured lenses.

Cheers,

VK2MCT - jb
 
pickle9000
Newbie

Joined: 30/03/2012
Location: Canada
Posts: 6
Posted: 07:48am 30 Mar 2012
Copy link to clipboard 
Print this post

For colour you'd either need lots more memory (none is spare) or a smaller number of chars, and neither look that attractive (to me) compared to either as-is or those colour shields. Or am I missing something?

John,

I'm only talking about changing the colour of the entire screen, that would not require more than a few 50 bytes of code. You are correct that if you wanted to colorize every pixel that would require much more memory. To colorize in bands (horizontally or vertically) like I seen in one post you would only need as many bytes as lines there. 300 lines 300 bytes (half that if you only use a 4 bit word). What you would end up with is a new function or command something like colorline(50,3) 50 would be the line number and 3 would be the color meaning bit 1 and 2 are on I think that would be green if I remember correctly. With such a command you could move the color band up and down the screen and it would have a minimal impact.

...mike

 
pickle9000
Newbie

Joined: 30/03/2012
Location: Canada
Posts: 6
Posted: 08:29am 30 Mar 2012
Copy link to clipboard 
Print this post

VK2MCT

If luminance is a problem then the solution is a multiburst. That would require a fairly simple circuit. I'm not talking about offsetting the timing, just the shape of the pulse. I don't know if you have looked at the signal but it is pretty noisy. Given half a chance I'd expect it to change even without a multiburst. Of course that's not something to depend on. Even so this is just for fun right?

...mike
 
Vikingboy
Regular Member

Joined: 23/09/2011
Location: Australia
Posts: 82
Posted: 05:56pm 09 Apr 2012
Copy link to clipboard 
Print this post

Hi,

Sorry, but I cant see this working, A colour composite video signal does not, as you seem to be suggesting rely on 3 separate waveforms to generate colour in the way that a vga signal does, To go into a little history, when colour was being developed there were already a huge number of black and white sets in existence, so as not to instantly obsolete them all the colour signal had to be made backwards compatible. To do so they split it into 2 parts, the luminance , and the chroma signal. the luminance signal or Y is what is generated by the Maximite the chromanance (colour) signal C. Is on a separate sub carrier 4.43 Mhz , and as I said, to maintain compatablity it is not required to view a BW image, and on a BW monitor even if there it is simply ignored and without it you cant get colour on a colour set.

This is all of course pretty broad and simplistic, but hopefully explains the situation. I haven't looked, but I suspect that as it isn't needed that the Maximite doesn't bother making a colour sub carrier signal.

rgds,

Andrew
 
mariae71

Regular Member

Joined: 22/08/2012
Location: Sweden
Posts: 43
Posted: 02:08pm 03 Apr 2013
Copy link to clipboard 
Print this post

I would use overlays like the Vectrex.

Or one of these VGA to Composite Converters Edited by mariae71 2013-04-05
2 x DuinoMite Mega
1 x DuinoMite eMega
 
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1101
Posted: 10:54pm 07 Apr 2013
Copy link to clipboard 
Print this post

Hi pickle9000,

As a couple of the other boys have indicated, the actual voltage level in a composite video signal is just the luminace level. To extract chrominance info, the composite video receiver extracts the 4.43Mhz phase shifted subcarrier that is modulated onto the luminance level. This extracted signal is compared to a colour burst reference in the front porch (just after the h-sync pulse). It seems to me that it would be way beyond the MM's capability to generate this sub-carrier info in firmware just to get colour on the composite (and IMHO, a complete waste of resources - if you want colour, use VGA.

Interesting discussion however and I hope this assists you.

Composite Video info

Regards, Doug.


... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it!
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024