Close

Brief Update, Added UART Framebuffer Code

A project log for VGA Graphics Over SPI and Serial - VGATonic

640x480 (and 848x480!) Color VGA Video Card for Microcontrollers and Single Board Computers

PKPK 08/12/2015 at 15:560 Comments

Due to a well timed suggestion from @antti.lukats in chat, I went through and made the licenses more explicit today. Basically everything is MIT licensed, except code which derives (or is used in) the Linux Kernel - all of that is, of course, GPL v2.

I'm not sure if anyone has built a VGATonic yet, but today's update includes the Python code I've been using to test the serial framebuffer driver. The libraries you need are pyserial and Pillow. You can pick either 9600 or 38400 baud, and it will blast images over UART to VGATonic. (Set the image with the -i command). Here're some examples:

python SerialDemo.py -x 640 -y 480 -c 8 -d 0 -i VGATonic.png -v 2
python SerialDemo.py -x 640 -y 480 -c 4 -d 1 -i ground.jpg -v 2
python SerialDemo.py -x 320 -y 240 -c 4 -d 1 -i edison.png -v 2

Here are some command line options:

# -d Controls dithering - 0 off, 1 on (Default off - but for that 90s vibe, try some with it on!)
# -c Controls color depth, 8, 4, 2, 1 all legal
# -x Controls width, 640, 320, 160, 80 all available
# -y Controls height, 480, 240, 120, 60 all available (has to match width - so 640x480, 320x240, 160x120, 80x60)
# -m Movie mode - probably just stick to 80x60x1 bit or x2 bit, but this mode rotates the image "-m" times.
# -i Controls the file to input (there are some images in the directory to try)
# -p Change the port - default is in code
# -b Baudrate. Pick 9600 or 38400
# -v Verbosity, set to an integer. '2' is the highest level, it'll give you some stats too.

On the driver side, I made a BBB update as well:

As always, find all the most recent code here on Github: https://github.com/dqydj/VGAtonic

Discussions