March 29, 2024, 07:53:10 AM

MOD-VGA-32MB library not work

Started by Rado, April 26, 2023, 04:58:13 PM

Previous topic - Next topic

Rado

Hello everyone  :)

I've just bought MOD-VGA-32MB shield and tried to start some examples from Gameduino library, but only result is random moving figures on VGA display



I tried different libraries with the same result.

I use Arduino Uno with resistor divider 5.1K / 10K for PIN 10, 11, 13 and power up shiled form Arduino's 3.3V pin

Normally, the shield works -I tested it with:

digitalWrite(9, LOW); 
  SPI.transfer(0x80);
  SPI.transfer(0x00);   
  SPI.transfer(0x41);             
  digitalWrite(9, HIGH);             

and see letter 'A' on the upper left corner on the monitor, so the wiring should be OK

Any ideas what to try to solve the problem?

Rado

I done some research in GD.cpp and skip some rows about SPI

void GDClass::begin(int pin)
{
  delay(250); // give Gameduino time to boot
  GD_SEL_PIN = pin;
  pinMode(GD_SEL_PIN, OUTPUT);
#ifdef BOARD_maple
  SPI.begin(SPI_4_5MHZ, MSBFIRST, 0);
#else
  SPI.begin();
  //SPI.setClockDivider(SPI_CLOCK_DIV2);
  SPI.setBitOrder(MSBFIRST);
  //SPI.setDataMode(SPI_MODE0);
  //SPSR = (1 << SPI2X);
#endif

and the board start working with all examples  :)

LubOlimex

Good that you level shifted the pins to 3.3V.

Did you run the selftest demo as recommended by the README.txt, first try the library linked at the product page, refer to the README.txt if you haven't already:

https://www.olimex.com/Products/Modules/Video/MOD-VGA/resources/Gameduino_library.zip

Edit: thanks for update glad you figured it out.
Technical support and documentation manager at Olimex

Rado

I've just downloaded library form your link and tried selftest but with the same result (some mess on the screen). After comment the same lines for SPI, I had workin example. All tests PASS, only test_flash: FAIL