I got an Adafruit feather with DVI output, Now I'm in trouble

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.

This is an important part of responsible forum usage, as explained in the "How to get the best out of this forum" guide. The guide contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

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.

Jim
I tried higher resolutions on a different monitors and still nothing shows.

Cedarlake Instruments:

I tried the font, but this library won't take it...
I get
error: 'display' does not name a type
27 | display.setFont(&FreeSans9pt7b);

I used

#include <PicoDVI.h>
#include <Bounce2.h>
#include "EncoderStepCounter.h"
#include <Average.h>

#include <EEPROM.h>
#include <Fonts/FreeMonoBoldOblique12pt7b.h>
#include <Fonts/FreeSerif9pt7b.h>

DVIGFX16 display(DVI_RES_400x240p30, adafruit_feather_dvi_cfg);
display.setFont(&FreeSans9pt7b);

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.

Jim, I tried 16;9 monitors. Why does Adafruit include this list in the library if none are available?

DVI_RES_400x240p60,
DVI_RES_400x240p30, //Best KNOWN, Reduced refresh rate, less overclock required
DVI_RES_640x480p60,
DVI_RES_800x480p60,
PicoDVI.cpp (15.4 KB)
PicoDVI.h (14.9 KB)

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

By the way, do you know ho to make the serial monitor work for feather?

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.

Something is definitely going wrong there, but to spot the issue we need to see your entire code, between code tags please:

```
your code goes here
```

Or use Edit > Copy for Forum (Markdown) in the Arduino IDE

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

setTextSize() can only be used to multiple the size of the font,

display.setTextSize(2);
display.setTextSize(3);
// etc

What you can do is include an additional, smaller font, and switch to that when needed.

#include <Fonts/FreeSansBold18pt7b.h>
#include <Fonts/FreeSansBold12pt7b.h>

void example() {
  display.setFont(&FreeSansBold18pt7b);
  display.println("Big Text");
  
  display.setFont(&FreeSansBold12pt7b);
  display.println("Smaller Text");
}

You should be able to use any font in the AdafruitGFX library's Fonts folder.

You can also use a resource like truetype2gfx to generate custom fonts, which you can manually include with your sketch.

Thank you Tod
It was exactly what I needed.

Can you help with that please?
Mitch

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.

Thanks Tod
I experimented with Serial, and it seems to work at lower baud.
Also the monitor must be closed during uploads...

Also my monitor seems to think the resolution is double what I have in the setup.
DVIGFX16 display(DVI_RES_320x240p60, adafruit_feather_dvi_cfg);

The coordinates for shapes seem to be based on the Rez above.
Does the monitor split every pixel I send?

Mitch

Good to hear!

Yes, exactly!

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.

From Adafruit Feather RP2040 with DVI Output Port Overview

Thanks,
I got some EEPROM problems with the board. I just posted a new thread.
Maybe you can help again...
Your friend,

Mitch

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)

For others that follow: EEPROM trouble on the Adafruit Feather RP2040DVI