2010-06-13 04:54:11 +02:00
|
|
|
|
2010-07-02 06:57:35 +02:00
|
|
|
Notes on GPIO Writing
|
|
|
|
------------------------------------------------------------------------------
|
|
|
|
Classic digitalWrite() gives ~500ns pulse time (2MHz)
|
2010-06-13 04:54:11 +02:00
|
|
|
|
|
|
|
gpio_write_bit() is about 360ns (2.78MHz)
|
|
|
|
|
2010-07-02 06:57:35 +02:00
|
|
|
Writing to GPIO?_BASE is about 60ns (16.6MHz -> 18MHz)
|
2010-06-13 04:54:11 +02:00
|
|
|
|
2011-03-22 21:59:29 +01:00
|
|
|
PWM write 0x0001 is about 14ns (72MHz) with prescaler as 0 (!)
|
2010-06-13 04:54:11 +02:00
|
|
|
|
2010-07-02 06:57:35 +02:00
|
|
|
VGA Timing
|
|
|
|
------------------------------------------------------------------------------
|
|
|
|
1/25.125MHz = 39.72ns (640x480 pixel clock)
|
2010-06-13 04:54:11 +02:00
|
|
|
|
2010-07-02 06:57:35 +02:00
|
|
|
Crude 640x480 directions:
|
|
|
|
From www.epanorama.net/documents/pc/vga_timing.html
|
2010-06-13 04:54:11 +02:00
|
|
|
480 lines
|
|
|
|
31.77 us horizontal line length -> 2287.44 clock cycles -> 2287
|
|
|
|
3.77 us sync period -> 271 clocks -> 271
|
|
|
|
1.89 us front porch? -> 136 clocks -> 136
|
|
|
|
25.17 us video -> 1812.24 clocks -> 1812
|
|
|
|
|
2010-07-02 06:57:35 +02:00
|
|
|
So...
|
2010-06-13 04:54:11 +02:00
|
|
|
2287 reload
|
|
|
|
271 1: Hsync high
|
|
|
|
407 2: Video on
|
|
|
|
2219 3: Video off
|
|
|
|
2287 4: Hsync low
|
|
|
|
|
2010-07-02 06:57:35 +02:00
|
|
|
Vertically, it's
|
2010-06-13 04:54:11 +02:00
|
|
|
480 lines active video
|
|
|
|
11 lines front porch
|
|
|
|
2 lines Vsync (low)
|
|
|
|
31 lines back porch
|