I bought this board, and I’m having a lot of difficulties talking to it from my 2560 on serial3. I get the 4d logo on the screen, but no response to any commands like Serial3.write(0x56);
Could use some help here.
I bought this board, and I’m having a lot of difficulties talking to it from my 2560 on serial3. I get the 4d logo on the screen, but no response to any commands like Serial3.write(0x56);
Could use some help here.
here is the code I’m using to initialize the card:
void setup(){
Serial3.begin(9600);
Serial3.flush();
delay(1200); // wait for uVGA to power up
VGA_sendCommand(0x55); // autobaud - sync the communication speed
VGA_GetResponse();
clearScreen(); // clear the screen
VGA_sendCommand(0x42); // set background color
VGA_sendCommand(0x00); // indexed color value for black
VGA_GetResponse();
VGA_sendCommand(0x4F); // opaque text
VGA_sendCommand(0x01);
VGA_GetResponse();
}
// send instruction to uVGA module
void VGA_sendCommand(byte command){
Serial3.write(command);
}
// get confirmation byte from video module saying it completed drawing
void VGA_GetResponse(){
while (!Serial3.available()) {} // Wait for data available
Serial3.read(); // burn read incoming byte
}
// clear screen
void clearScreen(){
VGA_sendCommand(0x45);
VGA_GetResponse();
}
void loop()
{
}
Could you provide a wiring diagram? Do you have them grounded together?
I’m using serial3, so 14 is tx, 15 is rx, and they are connected to pins 3 (Rx) and 2 (Tx) on the uVGA-II respectively. pin1 is connected to 5v, and pin4 to gnd. pin5 connected to reset.
It was a bad card. I ordered a replacement. I’m able to talk with it now, but it’s really flaky.
The card is supposed to provide a 06(hex) ACK byte if successful, or a 15(hex) NAK byte if unsuccessful.
I have not been able to reliably read that byte (I sometimes get other results other than the 06 or 15), and it’s clobbering my output. This card is really squirrelly to write to.
vgaBaud(7); //set to 14400
int vgaBaud(int z){
Serial3.print(byte(81)); //command
Serial3.print(byte(z)); //baud
if (GetResponse() == 6)
{
GetResponse();
}
}
byte GetResponse()
{
while (Serial3.available()) {
// read the incoming byte:
incomingByte = Serial3.read();
// say what you got:
Serial.print("I received: ");
Serial.println(incomingByte, HEX);
return incomingByte;
}
}