The PAL standard uses an analog signal. When running in the simulator, you don't have to worry about this, but if you want to run your game on a physical TV, then you'd need to generate the following voltage levels:
- 0V for sync signals (HSYNC/VSYNC)
- 0.3V for black pixels
- 1V for white pixels
The good news is: you only need a few resistors to convert the digital signal (that works in the simulator) to an analog one.
Composite video usually uses RCA connectors. You'd need the make the following connections to the central pin of the RCA connector:
- SYNC pin through a 470Ω resistor
- DATA pin through a 270Ω resistor
- Optionally, another 75Ω that goes to the ground (some TVs will accept the signal without this extra resistor)
Make sure you also connect the ground to the ring of the RCA connector.
Or, if you prefer a schematic:
How does this work? We implement a simple voltage divider to generate the required voltages, based on the two digital pin levels:
SYNC | DATA | Output Voltage | Calculation |
High 3.3V | High 3.3V | 1.004V | (3.3*75)/((1/(1/470+1/270))+75) |
High 3.3V | Low 0V | 0.366 | (3.3*(1/(1/75+1/270)))/(470+(1/(1/75+1/270))) |
Low 0V | Low 0V | 0 | 0 |
As you can see, driving both SYNC/DATA high results in a about 1V, which is the white pixel level, driving SYNC high and DATA low results in about 0.37V, a bit above the black pixel level (but still good enough the maintain contrast), and driving both pins low results in 0 volts, that's the sync level.
Using this setup and driving DATA high while SYNC is low, you can also generate a gray pixel level (0.637V), but that's definitely out of scope for this project.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
To ensure compatibility with physical TVs, the PAL standard necessitates generating specific voltage levels: 0V for sync signals, 0.3V for black pixels, and 1V for white pixels.
You can watch online movies through https://www.pikashowhd.com/how-to-watch-movies-online/ on your mobile. Utilizing a few resistors, you can convert the digital signal from the simulator to an analog one. For composite video via RCA connectors, connect SYNC pin through a 470Ω resistor and DATA pin through a 270Ω resistor, optionally with an additional 75Ω resistor to ground.
Are you sure? yes | no