Timing with a 12 MHz clock (XS40 clock)
Line: 31.77 usec x 12 MHz = 381 clocks/line
- we will display 256 pixels/line
- one pixel/clock
- rest is front porch, back porch and HSYNC
Frame: 16.784 msec x 12 MHz = 201,406 clocks/frame (!)
- 201,406 / 381 clocks/line = 528 lines
- we can display 480 lines
- rest is front porch, back porch and VSYNC