Add notes

This commit is contained in:
Jan Philipp Timme 2019-03-09 12:55:23 +01:00
parent b7776b7ec8
commit a91fd57fd5

37
atmega-notizen.txt Normal file
View File

@ -0,0 +1,37 @@
USB Plug
Looking at the good end (board on the downside):
4: GND (BLACK), 3: D+ (GREEN), 2: D- (WHITE), 1: +5V (RED)
ATMega 328P
32MLF Package
Nr1 - PD3 (PCINT19/OC2B/INT1) -> 3
Nr32 - PD2 (INT0/PCINT18) -> 2
2 - Digital Pin 2 - Ext Int 0
3 - Digital Pin 3 - Ext Int 1
13 SCK Red
12 MISO Yellow
11 MOSI Green
10 SS Blue
Flashing with base command
avrdude -P /dev/ttyUSB0 -c arduino -p m328p -b 19200
### Build process
# Compile
/home/jpt/arduino-1.8.8/hardware/tools/avr/bin/avr-gcc -c -mmcu=atmega328p blink.c
# Link
/home/jpt/arduino-1.8.8/hardware/tools/avr/bin/avr-gcc -g -mmcu=atmega328p blink.o -o blink.elf
# Convert hex
/home/jpt/arduino-1.8.8/hardware/tools/avr/bin/avr-objcopy -j .text -j .data -O ihex blink.elf blink.hex
# Upload
avrdude -P /dev/ttyUSB0 -c arduino -p m328p -b 19200 -U flash:w:blink.hex