From a91fd57fd5a9be81e706bbbde216251ab5dce52a Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Sat, 9 Mar 2019 12:55:23 +0100 Subject: [PATCH] Add notes --- atmega-notizen.txt | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 atmega-notizen.txt diff --git a/atmega-notizen.txt b/atmega-notizen.txt new file mode 100644 index 0000000..f46348b --- /dev/null +++ b/atmega-notizen.txt @@ -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