Atmega328p

From Attie's Wiki
(Difference between revisions)
Jump to: navigation, search
m
m
 
(4 intermediate revisions by 3 users not shown)
Line 6: Line 6:
 
<h2>icsp pins</h2>
 
<h2>icsp pins</h2>
  
<h3>connecting to [[bus pirate]]</h3>
+
<h3>connecting to [[bus pirate]] for use with [[avrdude]]</h3>
 
{|
 
{|
 
|-
 
|-
 
|align="right" |brown
 
|align="right" |brown
|bgcolor="rgb(157,98,66)" width="18px" |
+
|style="background:rgb(157,98,66)" width="18px" |
 
|miso
 
|miso
 
|1
 
|1
Line 16: Line 16:
 
|2
 
|2
 
|align="right" |vcc (3.3v)
 
|align="right" |vcc (3.3v)
|bgcolor="rgb(255,255,255)" style="border:solid 1px #000;" width="18px" |
+
|style="background:rgb(255,255,255)" style="border:solid 1px #000;" width="18px" |
 
|white
 
|white
 
|-
 
|-
 
|align="right" |yellow
 
|align="right" |yellow
|bgcolor="rgb(255,250,47)" |
+
|style="background:rgb(255,250,47)" |
 
|sck
 
|sck
 
|3
 
|3
Line 26: Line 26:
 
|4
 
|4
 
|align="right" |mosi
 
|align="right" |mosi
|bgcolor="rgb(254,156,24)" |
+
|style="background:rgb(254,156,24)" |
 
|orange
 
|orange
 
|-
 
|-
 
|align="right" |red
 
|align="right" |red
|bgcolor="rgb(255,13,13)" |
+
|style="background:rgb(255,13,13)" |
 
|reset
 
|reset
 
|5
 
|5
Line 36: Line 36:
 
|6
 
|6
 
|align="right" |gnd
 
|align="right" |gnd
|bgcolor="rgb(0,0,0)" |
+
|style="background:rgb(0,0,0)" |
 
|black
 
|black
 
|}
 
|}
 
pin 2 can use the gray wire for 5v instead of 3.3v if your circuit is okay with that
 
pin 2 can use the gray wire for 5v instead of 3.3v if your circuit is okay with that
 +
 +
<h2>pin mapping:</h2>
 +
[[File:Atmega168PinMap2.png]]<br>
 +
source: http://arduino.cc/en/Hacking/PinMapping168
  
 
<h2>firmwares:</h2>
 
<h2>firmwares:</h2>
Line 64: Line 68:
 
<h2>resources</h2>
 
<h2>resources</h2>
 
https://www.mainframe.cx/~ckuethe/avr-c-tutorial/<br>
 
https://www.mainframe.cx/~ckuethe/avr-c-tutorial/<br>
http://arduino.cc/en/Hacking/PinMapping168<br>
 
 
http://hintshop.ludvig.co.nz/show/buspirate-avr-programming/<br>
 
http://hintshop.ludvig.co.nz/show/buspirate-avr-programming/<br>
 
http://itp.nyu.edu/physcomp/uploads/6pinAVRproghead.jpg<br>
 
http://itp.nyu.edu/physcomp/uploads/6pinAVRproghead.jpg<br>
 
http://dangerousprototypes.com/bus-pirate-manual/<br>
 
http://dangerousprototypes.com/bus-pirate-manual/<br>
 
http://www.ladyada.net/library/arduino/bootloader.html
 
http://www.ladyada.net/library/arduino/bootloader.html

Latest revision as of 01:57, 9 March 2012

Info on the ATMega328p hardware:

Contents

data sheet

http://attie.co.uk/file/ATmega328p.pdf

icsp pins

connecting to bus pirate for use with avrdude

brown miso 1 2 vcc (3.3v) white
yellow sck 3 4 mosi orange
red reset 5 6 gnd black

pin 2 can use the gray wire for 5v instead of 3.3v if your circuit is okay with that

pin mapping:

Atmega168PinMap2.png
source: http://arduino.cc/en/Hacking/PinMapping168

firmwares:

The arduino environment comes with a few variations of the firmware (<path to arduino>/hardware/arduino/bootloaders/atmega)
load them like this:

$ avrdude -c buspirate -P /dev/ttyUSB1 -p m328p -U flash:w:ATmegaBOOT_168_atmega328_pro_8MHz.hex

This table shows which arduino (that I own...) uses which firmware

Filename Processor Arduino Boards
ATmegaBOOT_168_diecimila.hex ATMega168 @ 16Mhz Diecimila, Duemilanove, Nano
ATmegaBOOT_168_atmega328_pro_8MHz.hex ATMega328p @ 8Mhz Pro Mini, Fio

resources

https://www.mainframe.cx/~ckuethe/avr-c-tutorial/
http://hintshop.ludvig.co.nz/show/buspirate-avr-programming/
http://itp.nyu.edu/physcomp/uploads/6pinAVRproghead.jpg
http://dangerousprototypes.com/bus-pirate-manual/
http://www.ladyada.net/library/arduino/bootloader.html

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox