Bare Bones VGA Signal


i'm trying set vga signal timing in simplest way possible. i'm trying display few simple, still patterns - i'm working on building custom video adapter , i'm trying use arduino test out timing. made simple sketch that's supposed display left of screen white , right black. pin 10 controls pixels, , attached 4.7kohm resistor that's attached r,g, , b pins of vga port. hsync , vsync plugged directly arduino's io header.

i hooked cable monitor, , it's giving me flashing message box says signal out of range. think i've got of timing off, i'm not sure how correct it.

code:

code: [select]

void setup() {
  pinmode(10, output);
  pinmode(9, output);
  pinmode(8, output);

  digitalwrite(10, low);  //pin 10 vsync
  digitalwrite(9, low);   //pin 9 hsync
  digitalwrite(8, low);   //pin 8 pixel data
}

void loop() {
  digitalwrite(9, high);
  for(int i=0; i<480; i++)
  {
    digitalwrite(8, high);
    delaymicroseconds(12);
    digitalwrite(8, low);
    delaymicroseconds(14);
    digitalwrite(9, high);
    delaymicroseconds(3.8);
    digitalwrite(9, low);
    delaymicroseconds(1.9);
  }
  digitalwrite(9, high);
  delay(0.45);
  digitalwrite(10, high);
  delay(0.064);
  digitalwrite(10, low);
  delay(0.02);
  digitalwrite(9, low);
}


does know might happening? delaymicroseconds not precise enough?

delay microseconds has resolution of 4 microseconds. digital write takes 65 clock cycles need use direct port addressing.


Arduino Forum > Using Arduino > Project Guidance > Bare Bones VGA Signal


arduino

Comments