I needed to display on a 12 inch monitor for a client so I ventured in the Adafruit jungle...Adafruit Feather RP2040 with DVI Output Port - Works with HDMI : ID 5710 : Adafruit Industries, Unique & fun DIY electronics and kits
The biggest problem is the low resolution.
The system works well up to:
DVIGFX16 display(DVI_RES_400x240p60, adafruit_feather_dvi_cfg);
And that looks supper choppy on a 12 inch.
Their library has:
DVI_RES_320x240p60 = 0,
DVI_RES_400x240p60,
DVI_RES_400x240p30, //Best KNOWN, Reduced refresh rate, less overclock required
DVI_RES_640x480p60,
DVI_RES_800x480p60,
DVI_RES_800x480p30, // Reduced refresh rate, less overclock required
DVI_RES_640x240p60, // "Tall" pixels, e.g. for 80-column text mode
DVI_RES_800x240p60, // Same, 100-column
DVI_RES_800x240p30, // Reduced refresh rate, less overclock required
DVI_RES_1280x720p30 // Experimenting, not working, plz don't use
*/
I would love to go to 800x480p30, but nothing shows on the screen.
Here is the monitor I use https://www.amazon.com/dp/B07DCB62C1?re ... tails&th=1
I connected also to a Samsung 1080 monitor and I am not able to get a better Rez than the one mentioned above.
Also , is there a tutorial how to use fonts?
Also, I can't get anything to Serial.print . Life is tough without debugging on Serial.print.
I get:
Caused by: jssc.SerialPortException: Port name - /dev/cu.usbmodem2301; Method name - openPort(); Exception type - Port not found.
at jssc.SerialPort.openPort(SerialPort.java:167)
at processing.app.Serial.(Serial.java:141)
... 8 more
Error opening serial port '/dev/cu.usbmodem2301'.
The port is correct, I am able to upload your sketches.
Please help, I wrote on the Adafruit forum but no one reads it. No response in 3 days.
Thank you,
Mitch
I moved your topic to an appropriate forum category @laptophead.
In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.
I can't help you with the resolution but the library is based on Adafruit GFX so font changing is like
lcd.setFont(&FreeSans9pt7b)
Where FreeSans9pt7b is the name of the font file/definition in Adafruit GFX fonts.
M5Stack has a couple of HDMI display modules but I haven't used those, just the bare controllers. TBH, when I need this kind of resolution, I look to raspberry pi or beaglebone.
@laptophead
The size of the video frame buffer used in the library is either 320x240 or 4:3 aspect or 400x240 for 5:3.
So your true resolution will never be greater than those sizes.
Since your display is 4:3 you are stuck with 320x240 and that won’t look good on a 12” monitor.
It does not matter, the resolution is still 320x240 for a 4:3 monitor. If you use a higher resolution it just sretches the pixels and the larger the monitor the worse it looks.
DVI_RES_640x240p60, // "Tall" pixels, e.g. for 80-column text mode
DVI_RES_800x240p60, // Same, 100-column
DVI_RES_800x240p30, // Reduced refresh rate, less overclock required
DVI_RES_1280x720p30 // Experimenting, not working, plz don't use
I attach the files, maybe you can figure something
I think that library was some kind of kludge from another library that used a driver board that worked with those resolutions.
I think that your best choice with the monitor you have will be the 640x480, otherwise, as @cedarlakeinstruments suggested, you will need to use a raspberry Pi
The error doesn't seem right, but in any case, you are not including that font library. According to Adafruit's PicoDVI documentation, the function call is otherwise correct.
Adafruit still did not respond, 5 days now.
Thanks God for this forum and friends like you.
I decided to live the 320x240 res since I can use custom fonts from their examples and they look good.
I attached their example, I incorporated in my code the show_custom_text() function and looks OK
The trouble is that I can't make fonts smaller than 1. Bigger seems Ok, but display.setTextSize(0.6); will give me the same result as size 1. This hinders my ability to display things right...
What to do? Please help.
Thanks
Mitch 16bit_hello.ino (29.2 KB)
here is my writing
void show_target() {
// display.fillScreen(0);
display.setFont(&FreeSansBold18pt7b);
display.setTextSize(1);
// display.setTextWrap(false); // Allow text off edges
// Get "M height" of custom font and move initial base line there:
uint16_t w, h;
int16_t x, y;
//display.getTextBounds("M", 0, 0, &x, &y, &w, &h);
display.setCursor(0, 235);
display.print("TARGET: ");
display.setTextSize(0.6);
display.setCursor(160, 235);
display.fillRect(160, 205, 150, 35, BLUE); // position W, Position H, size W, Size H
if (Target < 60) {
display.print(Target, 2);
display.print("s");
} else if (Target >= 60 and Target < 3600) // dropping the digits
{
float minutes = Target / 60;
int TargetInt = Target;
display.print(minutes, 2);
display.print("m");
}
else // dropping the digits
{
float hours = Target / 3600;
int TargetInt = Target;
display.print(hours, 2);
display.print("hr");
}
//delay(2000);
} // END CUSTOM FONT EXAMPLE
It's not an issue I'm familiar with, sorry. Maybe check if the serial port has changed after upload? Could be good also to try a simple sketch to test serial, without using the DVI.
Other that that, my advice is to start a new thread, in a category suitable for serial issues. This hopefully helps your question to be seen by someone with the right knowledge. Maybe a good idea to include a link to this topic also, for context.
In Arduino, which is what we recommend, we use our fork of PicoDVI to create an internal framebuffer of 320x240 or 400x240 16-bit pixels that is then continuously blitted out as pixel-doubled 640x480 or 800x480 digital video.
Good answer there now from sterretje. Make sure to use the EEPROM.begin and EEPROM.commit calls from the example they linked. Example shows EEPROM.begin(512), but if you need the full 4kB of EEPROM, can use up to EEPROM.begin(4096)