Editing AVR-Programmieradapter

From Chaosdorf Wiki
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
{{Project
m0dul A6 -> RST
|name=AVR-Programmieradapter
m0dul A8 -> SCK
|description=r0ket AVR Programmer
m0dul B6 -> MOSI
|project category=Hardware
m0dul B8 -> MISO
|image=r0ket flash spi.jpg
m0dul A5/B5 -> GND
|status=obsolete
m0dul A12/B12 -> VCC
|people={{U|penma}}
|source=https://github.com/penma/r0ket/commit/6630ac49{{!}}github
}}
AVR-Programmieradapter fehlen gerne genau dann, wenn man gerade ein AVR-Projekt im Kopf hat. Falls dieser überhaupt vorhanden ist, stellt man dann fest, dass moderne Rechner keine RS232-Schnittstelle mehr besitzen. Ein günstiges und einfach zu bauendes USB-Device wird benötigt.


Da ja ohnehin jeder eine [[r0ket]] hat, kann man diese ja zum Programmieren benutzen. Mit einer modifizierten Firmware meldet sich die Rakete als USB-TTY und ein gepatchter avrdude kann dann mit den Chips reden.
See [https://github.com/penma/r0ket/commit/6630ac49 firmware and avrdude patch] by penma.


Die AVRs werden dazu wie folgt an den m0dulbus angeschlossen (Pins sind im Datasheet des AVRs nachzuschlagen):
== Patch für avrdude ==


A6 -> RST
Works for avrdude 5.11.1. For example:
A8 -> SCK
B6 -> MOSI
B8 -> MISO
A5  oder B5  -> GND
A12 oder B12 -> VCC


[https://github.com/penma/r0ket/commit/6630ac49 Firmware und avrdude-Patch] (von {{U|penma}}).
apt-get source avrdude
cd avrdude-5.11.1
patch -p1 < .../avrdude-r0ket.diff
autoreconf
./configure
make
sudo make install # or set config file when invoking avrdude


== Firmware bauen ==
== Usage ==


<source lang="bash">
./avrdude -P /dev/ttyACM0 -c r0ket ''usual options''
cd r0ket/firmware/
make clean
make APP=avrflash TABLE=NO USBSERIAL=YES clean all
cp avrflash.bin firmware.bin
# firmware.bin flashen (http://www.r0ket.de/init)
</source>
 
== avrdude patchen ==
 
Getestet mit [http://download.savannah.gnu.org/releases/avrdude/ 5.11.1] Man tue dies:
<source lang="bash">
apt-get source avrdude
cd avrdude-5.11.1
patch -p1 < .../avrdude-r0ket.diff
autoreconf
./configure
make
</source>
 
== avrdude ausführen ==
 
<source lang="bash">./avrdude -C ./avrdude.conf -P /dev/ttyACM0 -c r0ket ''normale Optionen''</source>
 
Alternativ wird der gepatchte avrdude systemweit installiert, dann entfällt die Angabe von -C.
 
== Gebaute Programmieradapter ==
 
Da eine fliegende Verdrahtung recht fummelig und fehleranfällig ist, wurden fertige Adapter m0dulbus<->Programmieranschluss gebaut. Bisher wurden drei Adapter gefertigt. Sie befinden sich auf dem [[Kabelbaum]].
 
<gallery>
File:r0ket flash spi adap.jpg|r0ket <-> 10 Pin AVR-ISP-Kabel
File:r0ket flash avr.jpg|r0ket <-> ATTiny2313 Sockel
File:R0ket avrisp feuerrot.jpg|r0ket <-> 10 Pin AVR-ISP-Kabel V1.337
</gallery>


[[Category:Mikrofoo]]
[[Category:Mikrofoo]]
Please note that all contributions to Chaosdorf Wiki are considered to be released under the Attribution 3.0 Unported (see Chaosdorf Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)