Untangling the un-untanglable¶
Summary¶
We have a lot of chips this year!
Includes in the Arduino IDE
Copy paste this into Arduino > Preferences... > Additional Boards Manager URLs
:
https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json
http://arduino.esp8266.com/stable/package_esp8266com_index.json
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
http://drazzy.com/package_drazzy.com_index.json
https://www.mattairtech.com/software/arduino/beta/package_MattairTech_index.json
https://dl.espressif.com/dl/package_esp32_index.json
https://mcudude.github.io/MiniCore/package_MCUdude_MiniCore_index.json
https://dl.espressif.com/dl/package_esp32_index.json
AVR¶
AVR is a family of microcontrollers developed since 1996 by Atmel, acquired by Microchip Technology in 2016. These are modified Harvard architecture 8-bit RISC single-chip microcontrollers.
ATtinyXX¶
The ISP connector reference:
Another way the ISP can look:
By Michael Hzl - Own work, CC BY-SA 3.0, Link
Learn even more!
AVR Series-1¶
The whole series:
Image from here
How UPDI Works:
From this source.
Note
To set it up, all you need to do is connect the RX pin of the adapter to the UPDI pin on the micro and the TX pin to that through a 4.7k resistor. Then just use the program on your computer.
Hardware options¶
Remember
You have to make your own. This is just reference!
- Official Fabacademy Hardware: two boards that could be merged into one (USB to FTDI to serial):
- Expensive Hardware: Atmel-ICE
- Unofficial hardware: USB to serial adapter
- Raspberry Pi: OpenOCD on raspberry Pi
- Using Arduino IDE, with UNO as programmer or an Atmel ICE: megaTinyCore + Jtag2updi
No programmer? No problem
Check here if you want to use an Arduino Nano/Uno And also here More info in this video
Your Software options for programming the boards¶
- Set up python environment
- Clone pyupdi and install requirements:
git clone https://github.com/mraardvark/pyupdi
pip install -r requirements.txt
- Find out your port:
ls /dev/* | grep usb
/dev/cu.usbserial-DN05BTJ5
/dev/tty.usbserial-DN05BTJ5
- Choose your device from the list:
python pyupdi.py -h
--device {mega3208,mega3209,mega4808,mega4809,tiny1604,
tiny1606,tiny1607,tiny1614,tiny1616,tiny1617,
tiny202,tiny204,tiny212,tiny214,tiny3216,tiny3217,
tiny402,tiny404,tiny406,tiny412,tiny414,tiny416,
tiny417,tiny804,tiny806,tiny807,tiny814,tiny816,tiny817}
- Compile:
/var/folders/jh/yqwgppd975x6_958tswyv1cm0000gn/T/arduino_build_384105/hello.ino.hex
- Send it:
python3 pyupdi.py -d tiny1614 -c /dev/cu.usbserial-DN05BTJ5 -b 115200 -f '/var/folders/jh/yqwgppd975x6_958tswyv1cm0000gn/T/arduino_build_384105/hello.ino.hex' -v
Important tips
- If it doesn’t work, use
9600
bauds - Plug unplug the FTDI if you see echo problems
- Check this gotcha list: https://github.com/SpenceKonde/ATTinyCore#quick-gotcha-list
Pinouts for each board
More guides
ARM¶
Hardware options¶
Remember
You have to make your own. This is just reference!
- Official Fabacademy Hardware:
- CMSIS-DAP 10pin + adaptor to 4pin SWD (optional, to program using arm’s SWD - with 4 pins instead of 10)
- Expensive Hardware: Atmel-ICE
- Raspberry Pi: OpenOCD on raspberry Pi
Software options¶
git clone git@github.com:ataradov/edbg.git
cd edbg
make all
# Check if it works
./edbg -h
cp edbg /usr/local/bin
# Check if it works
edbg -h
Programming the programmer
You need to first flash the programmer using an Atmel ICE or another ATSAM programmer and send this binary
edbg -b -t samd11 -pv -f free_dap_d11c_mini.bin
Once you have it programmed, you can use:
- *Arduino IDE with SAMD Core: