So my friend lent me his Sony Trinitron 13 inch monitor (KV-1311CR) that has RGBI input and actually will work in CGA mode.
I derived the timings from the CGA manual I linked on page 2 or was it 3, the values there are in hex and character based so they have to be converted to decimal and multiplied by 8 and came out with this (for 640x200 @ 63.5Hz):
----------------------------------------------
Screen refresh rate 63.5Hz
Vertical refresh 15748 kHz
Pixel freq. 14.236192 MHz
Horizontal timing (line)
Polarity of horizontal sync pulse is negative.
Scanline part Pixels Time [µs]
Visible area 640 44.955842
Front porch 80 5.619480
Sync pulse 80 5.619480
Back porch 104 7.305324
Whole line 904 63.500127
Vertical timing (frame)
Polarity of vertical sync pulse is negative.
Frame part Lines Time [ms]
Visible area 200 12.700025
Front porch 18 1.143002
Sync pulse 6 0.381001
Back porch 24 1.524003
Whole frame 248 15.748031
----------------------------------------------
I did enabled the CGA component on the schematic and wired it on a breadboard.
The pins right to left are: Red, Green, Blue, Intensity, HSync, VSync, Ground. All of them are TTL level (0V-5V).
Edit: USB is just for power but that connector can be used to communicate with the PSoC 5LP as well, UART, SPI, I2C, HID and even MIDI
.
The VSync took a while to lock and I had to keep trying to adjust it, maybe the pulse is too big or not big enough, It doesn't help that the monitor takes about 2 minutes to even come on, so maybe it's because it has seen better days, but I'll keep on playing to see if I can make the VSync lock easier. At the moment if I move the VHold just a bit it starts rolling. Also the HSync front porch might need to be smaller because the image is too much to the right and using the "H Cent" on the monitor I couldn't getting totally centered.
I'll have to play with the timings a bit, also I got the pixel clock to 14.222 MHz that's all the PLL would give me. which is close enough to the desired 14.236192 MHz I was aiming for.
Then again maybe my timings are way off because that puts the display at 63.5Hz frame rate. But based on all the docs I could find it seems that should be the case.