I am currently speccing up an RGB VGA Video Driver for the ATTiny85
The resolution would only be 6464 pixels, but writable as 3232 pixel blocks
Only 3 blocks can be used, one for red, one for green and one for blue
but the block can be moved, copied, inverted etc to make patterns
Obviously all R/G/B blocks overlaid in the same place would create white, and other combinations follow suit
I am trying to make use of the limited ram available, which is 512 bytes
one 32*32 pixel block would use up 128 bytes, therefore 3 blocks (RGB) would be 384 bytes
The sync would appear at PB0/OC0A, red at PB1, green at PB2, blue at PB3, and possibly an audio input at PB4
I have worked out this resolution CAN be done at 16mhz, but only by using the internal clock, so there may be errors created by temperature or just plain off-day !
I am writing this along side the 32MHz 128*96 (TVout clone) that I have adapted for RGB VGA video, which forms the precursor to a major video driver I shall be writing for the STM32 72MHz maple-style micros
Sample of ATTINY85 VGA Code Ideas...
// save the current port condition
"in r16,%[port]\n\t" // load IO from port into r16
// get values from arrays
"ld RED_REG,X+\n\t" // load byte from red array and post increment X
"ld GREEN_REG,Y+\n\t" // load byte from green array and post increment Y
"ld BLUE_REG,Z+\n\t" // load byte from blue array and post increment Z
// deal with each bit of each RGB array separately
"bst RED_REG,7\n\t" // copy bit 7 from RED_REG to T flag
"bld r16,1\n\t" // store T flag into bit 1 of r16 (PB1)
"bst GREEN_REG,7\n\t" // copy bit 7 from GREEN_REG to T flag
"bld r16,2\n\t" // store T flag into bit 2 of r16 (PB2)
"bst BLUE_REG,7\n\t" // copy bit 7 from BLUE_REG to T flag
"bld r16,3\n\t" // store T flag into bit 3 of r16 (PB3)
"out %[port],r16\n\t" // output r16 to port
// each bit is dealt with one at a time, not in a loop as it is too slow - only 13 cycles per pixel !
Bob