Cleaning up markdown formatting

This commit is contained in:
Damian Peckett 2015-04-08 17:24:07 +10:00
parent 0b4deef806
commit 4e44d6f8b0
1 changed files with 16 additions and 18 deletions

View File

@ -3,29 +3,27 @@
Generating VGA video with an Arduino Uno / Atmega16u2 Microcontroller. Generating VGA video with an Arduino Uno / Atmega16u2 Microcontroller.
**To Connect (atmega16u2):** **To Connect (atmega16u2):**
Connect all grounds on the VGA connector together. * Connect all grounds on the VGA connector together.
Connect VGA ground to the Arduino Gnd. * Connect VGA ground to the Arduino Gnd.
Place a 120ohm resistor from the MOSI2 pin (Pin 4 on ICSP) to PB7 (Pin 4 on JP2) * Place a 120ohm resistor from the MOSI2 pin (Pin 4 on ICSP) to PB7 (Pin 4 on JP2)
*Optional Protection* Place a 1N4148 diode from PB7 (anode) to Gnd (cathode). * Connect the VGA red, blue and green inputs together and connect to PB7.
Connect the VGA red, blue and green inputs together and connect to PB7. * Connect VGA vsync to PB5 (Pin 3 on JP2).
Connect VGA vsync to PB5 (Pin 3 on JP2). * Connect VGA hsync to PB4 (Pin 1 on JP2).
Connect VGA hsync to PB4 (Pin 1 on JP2).
**To Assemble:** **To Assemble:**
avr-as -mmcu=atmega16u2 -o ghettovga.o ghettovga.s * avr-as -mmcu=atmega16u2 -o ghettovga.o ghettovga.s
avr-ld -m avr35 -o ghettovga.bin ghettovga.o * avr-ld -m avr35 -o ghettovga.bin ghettovga.o
avr-objcopy -j .text -j .data -O ihex ghettovga.bin vghettovga.hex * avr-objcopy -j .text -j .data -O ihex ghettovga.bin vghettovga.hex
**To Upload:** **To Upload:**
Temporarily short pins 5 and 6 on the atmega16u2 ICSP header. * Temporarily short pins 5 and 6 on the atmega16u2 ICSP header.
dfu-programmer atmega16u2 erase * dfu-programmer atmega16u2 erase
dfu-programmer atmega16u2 flash "./ghettovga.hex" * dfu-programmer atmega16u2 flash "./ghettovga.hex"
dfu-programmer atmega16u2 reset * dfu-programmer atmega16u2 reset
**To Restore Arduino Bootloader** **To Restore Arduino Bootloader**
Temporarily short pins 5 and 6 on the atmega16u2 ICSP header. * Temporarily short pins 5 and 6 on the atmega16u2 ICSP header.
Retrieve the appropriate usb-serial hex from: * Retrieve the appropriate usb-serial hex from: http://bit.ly/1E3pMbU
https://github.com/arduino/Arduino/tree/master/hardware/arduino/avr/firmwares/atmegaxxu2/arduino-usbserial * Use dfu-programmer to flash hex to atmega16u2
Use dfu-programmer to flash hex to atmega16u2
Font glyphs copyright (c) 1981 Michael C. Koss http://mckoss.com/jscript/tinyalice.htm Font glyphs copyright (c) 1981 Michael C. Koss http://mckoss.com/jscript/tinyalice.htm