Audio Bootloader

all about robots

Audio Bootloader

Postby chris on Sat Sep 03, 2011 5:17 pm

Audio Bootloader for Atmega Microcontrollers

It is possible to load a programm into an AVR-microcontroller over the audio interface of a PC or laptop:
http://www.mikrocontroller.net/articles/SOUNDRX

The bootloader presented here has the following features:

- automatic Baudrate detection and callibration
- works without callibration with 8Mhz or 16MHz sysclk ( possibly 1MHz, not testet )
- very simply hardware circuit: 2 resistors and a 100nF capacitor to connect to the audio line
- only one pin for data transmission needed and an additional pin for a status led
- low memory footprint: 800 bytes
- java program to generate the sound, works on win and linux

As line coding scheme Manchester-coding is used. With this type of coding we achieve only half the transmission speed than with "Flankenkodierung" used in Soundrxtx. Therefore the mean value of the signal is more stable and no calibration potientiometer is needed.

AudiBoot2.0:
- coding scheme changed to differential manchester code ==> works on all PCs with inverted audio out
- ATMEGA8 and ATMEGA168 support
- java programmer with 1/2 speed added ==> possible to generate MP3s ( setup to 320kBit/s kompression )

have fun,
chris
Attachments
AudioBoot_V2_0.zip
(88.19 KiB) Downloaded 767 times
AudioBoot_V1_1.zip
(172.27 KiB) Downloaded 2032 times
Last edited by chris on Thu Jun 14, 2012 6:12 am, edited 1 time in total.
chris
 
Posts: 289
Joined: Sun May 25, 2008 7:21 am

Re: Audio Bootloader

Postby chris on Tue May 01, 2012 11:08 am

Here is an interesting project able to generate directly bootloader sound.
It is a web browser based programming language

http://tadpol.org/projects/AvrianJump.html
chris
 
Posts: 289
Joined: Sun May 25, 2008 7:21 am

Re: Audio Bootloader

Postby chris on Sat May 12, 2012 8:55 am

Audioboot for the ping pong game with an Atmega8 controller

(http://www.elo-web.de/elo/mikrocontroll ... /ping-pong)

The swiching level of my ping pong game was at 1.4V with 5V power supply.
Therefore you have to adept the voltage divider resistors to your ping pong game.
The best is probably to use a potentiometer.


Atmega8 Bootloader 512 Words, Boot Address $0C00

ATMEGA8, 1K byte bootloader: -Wl,--section-start=.text=0x1c00
Fuses for PingPong, Atmega8:
HIGH:0xD8
LOW:0xE4
Lockbits: 0xCF ==> prevent bootloader from being overwritten



Edit: I found a major bug. Some sound cards have an inverted output which would not work with the bootloader. I made a second java program which corrects this issue. Please use the program version which fits to your computer. You will find it in the zip-file.
Edit: There was another problem: some programs using interrupts did not run. Now the bootloader ( v1.3 ) has an improved initialisation to run the user program.
Attachments
pingpongV3.zip
(121.95 KiB) Downloaded 483 times
pingpongV2.zip
(65.3 KiB) Downloaded 445 times
chris
 
Posts: 289
Joined: Sun May 25, 2008 7:21 am

Re: Audio Bootloader

Postby chris on Tue Jun 05, 2012 8:11 pm

There is a new Bootloader with differential manchester coding now working on all sound cards ( inverted and not inverted outputs ). There is also a java programming file which creates wav-files with half the frequency. This wav file can be compressed to mp3 with 320kBit/s.

Thanks to Johannes for the hints and the "research" how to compress the wav-files to mp3 files.
Attachments
test.mp3.zip
(96.79 KiB) Downloaded 488 times
pingpongV4_20120605.zip
(91.51 KiB) Downloaded 612 times
chris
 
Posts: 289
Joined: Sun May 25, 2008 7:21 am

Re: Audio Bootloader

Postby chris on Thu Sep 11, 2014 1:20 pm

Meanwhile there are devloping some more examples of programming a microcontroller with a sound card.

Here is a mehtod of directly using the ISP-pins as sound interface:
http://tiny.systems/article/soundProgrammer.html

An improved version with more circuit elements you can find here:
http://www.elektronik-labor.de/AVR/Soundprog2.html
chris
 
Posts: 289
Joined: Sun May 25, 2008 7:21 am

Re: Audio Bootloader

Postby chris on Fri Sep 12, 2014 4:00 pm

Here is a nice AUDIO-Data transmission for an ARM CortexM0 LPC810 and a smartphone:

AN11552.pdf

http://www.nxp.com/products/microcontro ... 21FN8.html

download ==> application notes
chris
 
Posts: 289
Joined: Sun May 25, 2008 7:21 am


Return to robots

Who is online

Users browsing this forum: No registered users and 1 guest

cron