Help with Vga bitmap output
Fred777
Posts: 19
in Propeller 2
Hello all,
I am new to the Propeller2 and have the P2 edge module and P2 Breadboard.
I would like a VGA bitmap output. I have tried the various text mode drivers and they all work but now I am trying the "VGA "640x480x8bpp – example driver by Chip Gracey" as found on the parallax website under "Quick Bytes"
it compiles ok but nothing is displayed and the monitor even goes into standby mode.
I have wired the vga as follows on the P2 side
0 = hsync
1 = blue
2 = green
3 = red
4 = vsync
i have chagned vsync to 4, but still nothing
Any ideas or more examples of a VGA bitmap driver?
Kind regards,
Fred
Comments
That example looks old now and designed for FPGAs. It is not setting up the PLL for a real P2.
If you are using FlexProp take a look at the pong demo example that Reinhard did using my video driver. That sets up a bitmap in VGA resolution and draws to it.
Link is here for final code:
https://forums.parallax.com/discussion/comment/1501099/#Comment_1501099
For your wiring you need to ensure the basepin is set to 0. IIRC it's set to 8.
Yeah it is setup to base pin 48 by default in that pong demo, so might be better to move it to port A. I think the older driver code has an issue with the sync pins getting corrupted in port B using VGA. I found I needed to disable parallel output with VGA which had been inadvertently left on in the streamer commands. This is fixed in my newer (yet unreleased) driver version.
To get that original VGA FPGA 640x480x8bpp demo working on a Rev B P2 I found you need to do a bunch of things...
1) setup a valid working P2 frequency in the PLL and setup the fclk value accordingly (eg. here's one for 250MHz)
and
2) enable the 4 video DAC output pins with dirh after the wrpin instruction:
3) setup the DAC mode to be 75 ohm 2Vpp output:
4) enable the streamer command "e" bits:
5) finally, ensure x is always zero initially before using it, by not relying on "x res 1", but with this instead:
Thanks @rogloh - the P2VIDEO driver works great! (I thought there might be a problem at first but my on-breadboard power supply was to weak for the P2... wow, hmm that P2 gets quite warm, do you guys use cooling?)
Thx. Personally I don't use cooling at room temps and generally drive the P2 around the 250-300MHz range without any noticeable issues. But I'm not always using all the COGs at 100%. At more total load or higher ambient temps you might like some cooling but I know others push it harder without it. It can reach over 350MHz but you'll need a good power supply and I suggest for that you might want to cool it then when multiple COGs are used. I've not yet seen any reports of anyone actually frying a P2 by overclocking/overheating it however so it will be interesting to hear if/when that happens.