Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen gezeigt.

Link zu dieser Vergleichsansicht

Both sides previous revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
projects:workshop1 [2011/12/17 13:46]
wanda [Makefile für: ATmega1280]
projects:workshop1 [2014/01/04 23:19] (aktuell)
wanda [Code aus dem Wörkshop]
Zeile 1: Zeile 1:
 ====== mC wökrshop ====== ====== mC wökrshop ======
 +---- datatemplateentry project ----
 +template ​     : :​sys:​tpl:​project
 +description ​  : Wökrshop zur mC prgrammierung
 +coordinators ​ : [[:​users:​skruppy:​]]
 +confidants ​   : [[:​users:​wanda:​]],​ [[:​users:​sushi:​]],​ Fred
 +state_tags ​   : held, to be continued
 +type_tags ​    : software, elektro, C, event, workshop
 +----
 +
 Wer macht mit Wer macht mit
   * sushi   * sushi
Zeile 24: Zeile 33:
 Das hier kann während des wörkshops mit Spickzetteln,​ Code sippets, Links, ... gefüllt werden. Das hier kann während des wörkshops mit Spickzetteln,​ Code sippets, Links, ... gefüllt werden.
 ==== Hilfe ==== ==== Hilfe ====
-http://​www.nongnu.org/​avr-libc/​user-manual/​modules.html+  * http://​www.nongnu.org/​avr-libc/​user-manual/​modules.html 
 +  * http://​www.heise.de/​ct/​artikel/​Shake-rattle-n-roll-292164.html 
 +  * http://​www.ladyada.net/​learn/​arduino/​
 ==== Löten iss sooo einfach ==== ==== Löten iss sooo einfach ====
 "​Löten ist einfach! und so wirds gemacht"​ (Comic): {{:​elektro:​fullsoldercomic_de.pdf|}} "​Löten ist einfach! und so wirds gemacht"​ (Comic): {{:​elektro:​fullsoldercomic_de.pdf|}}
Zeile 40: Zeile 51:
  
 ==== ehaserl ==== ==== ehaserl ====
-[[http://brain.muirauqa.org/ehaserl]]+[[projects:​ehaserl]] 
 + 
 +==== AVR-Videos ==== 
 + 
 +evtl. hilfreich (noch nicht geguckt - also testen :-) )  
 +  * 25C3: Music with Microcontrollers: ​http://events.ccc.de/congress/​2008/​Fahrplan/​events/​2843.en.html 
 +  * 26C3: Advanced Microcontroller Programming:​ http://​events.ccc.de/​congress/​2009/​Fahrplan/​events/​3672.en.html  
 + 
  
 ===== AVR ===== ===== AVR =====
-apt get install +  sudo apt-get install ​gcc-avr avrdude avr-libc binutils-avr 
-  * avrdude + 
-  * avr-libc +  ​* **avrdude** \\ Schreibt ("​flasht"​) die Firmware in den Flash speicher des mC. Für arduinos ist die flash methode "​arduino"​ 
-  * gcc-avr +  ​* **avr-libc** \\ Wer nicht auf hard core assembler steht, hat damt ein Grundgerüst um z.B. auf Ports per Namen zu zu greifen!!!11elf ([[http://​www.nongnu.org/​avr-libc/​user-manual/​modules.html|Doku]]) 
-  * binutils-avr ​(dasda eher nicht...was auch immer das ist ;-) ) +  ​* **gcc-avr** \\ Der compiler (dieser macht keine lecker sandwiches) 
-Das müssten ​alle Pakete ​sein, die Fisch braucht.+  ​* **binutils-avr** \\ Tools um infos über die compilate etczu bekommen und zu konvertieren und lauter so klein kram
 +Das sind alle Pakete, die Fisch braucht.
 ===== Makefile für: ATmega1280 ===== ===== Makefile für: ATmega1280 =====
-https://​github.com/​Skrupellos/​Capacitive-touch-sensor/​blob/​master/​Makefile+Makefile kopier quellen 
 +  * https://​github.com/​Skrupellos/​Capacitive-touch-sensor/​blob/​master/​Makefile ​[sic!] 
 +  * http://​www.mikrocontroller.net/​articles/​AVR-GCC-Tutorial/​Exkurs_Makefiles 
 +  * http://​www.mikrocontroller.net/​articles/​Beispiel_Makefile
 \\  ​ \\  ​
 \\  ​ \\  ​
 Vorsicht: \\  ​ Vorsicht: \\  ​
-Für den **ATmega328P (Boarduino)** ​folgendes ​ändern: +Für den **ATmega328P (Boarduino)** ​MCU wie follgt ​ändern: 
-        MCU = atmega1280 +  MCU = atmega32 
-ändern in: + 
-        MCU = atmega32+avrdude muss so konfuguriert werden, dass er für arduinos "-b 57600 -p atmega32 -c arduino"​ bzw. "-b 57600 -p <MCU>  -c arduino"​ als aufrufparameter bekommt. Dazu einfach mal nach AVRDUDE_* oder ähnlichem in den Makefiles suchen ... Makefiles sind einaml zu recht gefrikelt und dann immer wieder kopiert gut zu gebrauchen xD.
 ===== Code aus dem Wörkshop ===== ===== Code aus dem Wörkshop =====
 +<code c>
                 #include <​avr/​io.h> ​       // this contains all the IO port definitions                 #include <​avr/​io.h> ​       // this contains all the IO port definitions
  #include <​avr/​interrupt.h>​ // definitions for interrupts  #include <​avr/​interrupt.h>​ // definitions for interrupts
Zeile 65: Zeile 89:
  #include <​stdbool.h>​  #include <​stdbool.h>​
  #include <​util/​delay.h>​  #include <​util/​delay.h>​
- +  ​ 
 +  
  int main() {  int main() {
      // 1111 1111      // 1111 1111
-     DDRA  = 255;+     DDRA  = 255; // Data direction register (1 = output / 0 = input)
      DDRA  = 0b11111111;      DDRA  = 0b11111111;
      DDRA  = 0xFF; // alles output      DDRA  = 0xFF; // alles output
-     DDRA  = _BV(PA0) | _BV(PA1) | _BV(PA2) | _BV(PA3) | _BV(PA4) | _BV(PA5) | _BV(PA6) | _BV(PA7); ​// Data direction register (1 = output / 0 = input) +     DDRA  = _BV(PA0) | _BV(PA1) | _BV(PA2) | _BV(PA3) | _BV(PA4) | _BV(PA5) | _BV(PA6) | _BV(PA7);  
 +  
      DDRH = 0b00000000; // alles input         DDRH = 0b00000000; // alles input   
      PORTH = 0b00000100; // Pull-up an      PORTH = 0b00000100; // Pull-up an
Zeile 111: Zeile 135:
      //      //
  }  }
 +</​code>​
projects/workshop1.1324125987.txt.gz · Zuletzt geändert: 2011/12/17 13:46 von wanda