Test the video modes in ESP32 from the menu using the PS/2 keyboard or remote keyboard via terminal, such as Putty.
Select the video mode with the up and down arrow keys and press ENTER to accept.
- 360x200x70hz bitluni
- 320x240x60hz bitluni
- 320x240x60hz fabgl
- QVGA 320x240x60hz fabgl
- 320x200x70hz bitluni
- 320x200x70hz fabgl
- 360x400x70.4hz bitluni
- 400x300x56.2hz bitluni
- 320x350x70hz bitluni
- 320x400x70hz bitluni
- 640x400x70hz bitluni
- TTGOVGA32 PAL CVBS 5V (PAL CVBS GPIO 26)
- TTGOVGA32 PAL CVBS 5V+ (PAL CVBS GPIO 26)
- ESP32 PAL CVBS 3V (PAL CVBS GPIO 26)
- TTGOVGA32 NTSC CVBS 5V (NTSC CVBS GPIO 26)
- TTGOVGA32 NTSC CVBS 5V+ (NTSC CVBS GPIO 26)
- ESP32 NTSC CVBS 3V (NTSC CVBS GPIO 26)
- 320x240x60hz bitluni PLL
- 320x200x70hz bitluni PLL
- 384x264x56.2hz bitluni
- 360x240x56.3hz bitluni
- T40x25 320x200x70 bitluni
- T40x30 320x240x60 bitluni
- T50x37 400x300x56.2 bitlun
- T80x50 640x400x70 bitluni
- T80x25 640x400x70 bitluni
- T40x25x3 320x200x70 bitlun
- T40x30x3 320x240x60 bitlun
- T50x37x3 400x300x56.2 bitl
- T80x50x3 640x400x70 bitlun
- T80x60x3 640x480x70 bitlun
- T80x25x3 640x400x70 bitlun
- 320x200x1x70Hz bitluni
- 320x240x1x60Hz bitluni
- 400x300x1x56.2hz bitluni
- 640x400x1x70hz bitluni
- 800x600x1x54.2hz bitluni
- PIC 250 GTO
- PIC Phantis
- PIC Game Over
- PIC Mandril
https://github.com/rpsubc8/ESP32TestVGA/tree/main/ESP32/precompile
We must choose the ESP32 type: Subsequently, select the files as shown in the attached screenshot, with the same offset values: And press start. If everything has been correct, we will only have to restart the ESP32.
- TTGO VGA32 v1.x (1.0, 1.1, 1.2, 1.4)
- Visual Studio 1.66.1 PLATFORMIO 2.5.0 Espressif32 v3.5.0
- Arduino IDE 1.8.11
- Arduino bitluni 0.3.3 (Ricardo Massaro) reduced library (included in project)
At the end, the script itself ends up deleting the dataFlash directory.
The script uses fart.exe (find and replace text).
Once, it has been successfully executed, it can be used with the ArduinoDroid.
The project is now ready, so no bitluni or fabgl libraries are needed. We must deactivate the PSRAM option, and in case of exceeding 1 MB of binary, select 4 MB of partition when uploading. Although the code does not use PSRAM, if the option is active and our ESP32 does not have it, an exception will be generated and it will restart in loop mode.
https://github.com/rpsubc8/testkeyboardPS2
- TAB key or F2 key: Display OSD
- ENTER: Send ENTER (accept)
- Up: Up (increment 1)
- Down: Down (drecement 1)
- Right: Right (increment 10)
- Left: Left (decrement 10)
- use_lib_log_serial: Logs are sent by usb serial port
- use_lib_keyboard_poll_milis: The number of polling milliseconds for the keyboard must be specified.
- use_lib_fix_double_precision It doesn't use the VGA video frequency calculation with the ESP32 itself, avoiding possible accuracy problems with the mantissa. This is useful for ESP32's that miscalculate the frequency.
- use_lib_debug_i2s Plot with video mode calculations.
- use_lib_vga360x200x70hz_bitluni 360x200 video mode with bitluni parameters.
- use_lib_vga320x200x70hz_bitluni 320x200 video mode with bitluni parameters.
- use_lib_vga320x200x70hz_fabgl 320x200 mode with fabgl parameters.
- use_lib_keyboard_uart: Allows you to use the PC keyboard from the PC via the VStudio monitor terminal or from putty, without having to have a keyboard. Useful for not having to use the physical PS/2 keyboard and for development.
//ESP32 Pin 26 //DAC - Voltaje // 0 - 0.06 // 38 - 0.52 // 77 - 1 //255 - 3.17The maximum values when writing to the video buffer on an ESP32 board is 54, while for TTGO VGA32 v1.x it would be 35.#include <Arduino.h> #include <driver/dac.h>
const int arrayValue[4]={0,38,77,255}; unsigned char cont=0;
void setup() { Serial.begin(115200); dac_output_enable(DAC_CHANNEL_2); }
void loop() { dac_output_voltage(DAC_CHANNEL_2, arrayValue[cont]); Serial.printf("%d\n",arrayValue[cont]); delay(4000); cont++; cont &= 0x03; }
I have created a tool to convert the 8-colour palette in 3-bit DAC mode (RGB) to a monochrome gradient. Here you can see a model car of the Ferrari 250 GTO with the 8 colours: And here activating the greyscale filter with 8 gradients: The filter can be easily achieved with a monochrome VGA monitor.
On modern monitors and TVs, if they have filters in the OSD, this is also very simple. If not, you can vary the values of each RGB component from the OSD to achieve saturation.
If you have a VGA capture machine, you can apply the filter from within Windows by activating the saturation.
If we set the digital vibrance of 50 to a value of 0, we are left with black and white.
Here is the DAC 3-bit 8-colour palette with its decimal and binary (RGB) value: Here it is, as seen from a monochrome monitor: As can be seen, the logical order does not correspond to the actual order of light. For that, if we apply an order by luminance: This order, is what is applied to the image internally, so that you can actually see the 8 grey gradients, so the order is:
- 0 - 0
- 1 - 4
- 2 - 1
- 3 - 5
- 4 - 2
- 5 - 6
- 6 - 3
- 7 - 7
To process the images, we have to convert them to greyscale (256 gradients) from Gimp or Paint Shop Pro, and then apply the 8-colour grey gradient reduction: We must make sure that we have 8 colours left, even if we are using image formats with 16. And finally a conversion to RAW is applied.
When viewing, the above order should be applied.
Here we have the Phantis with 8 colours: And here in monochrome: Here is the GameOver with 8 colours: And here in monochrome: EGA and VGA test chuck with 8 colours: And here in monochrome: