Arduino Nano - Atmel MEGA328P
Pinout
- 5V - comes form USB-C VBUS and/or output of the regulator (VIN); MCU has operating voltage of 1.8 - 5.5V
- VIN - goes to the regulator and can be maximum 15 V; minimum 5 + ~1.1 (dropout) for regulator to regulate; MCU should run with 2.9 V
- 3V3 - output from USB-UART
- D13/PB5 is connected to LED
Schematics

Atmel MEGA328P
- Clock: 16 MHz
- Program Memory Size: 32 KiB
- RAM: 2 KiB
- Data EEPROM: 1 KiB
Datasheet: ATmega48A-PA-88A-PA-168A-PA-328-P-DS-DS40002061B.pdf
LM1117C 50 - 5V regulator
Datasheet: lm1117.pdf
CH340C - USB-UART
Datasheet: CH340DS1.PDF
Programming
Arduino / avrdude
Install IDE (and avrdude):
xi arduino
The board shows up on /dev/ttyUSB0 and can be programmed with CTRL-R (Compile/Verify) and CTRL-U (Upload).
Rust
- https://book.avr-rust.org/
- https://github.com/avr-rust/awesome-avr-rust
- https://github.com/Rahix/avr-hal
cargo +stable install --locked ravedude
cargo install cargo-generate
cargo generate --git https://github.com/Rahix/avr-hal-template.git # Select: Arduino Nano New Bootloader
# May need specific compiler version to work (see rust-toolchain.toml)
rustup override set nightly-2024-03-22
rustup component add rust-src --toolchain nightly-2024-03-22-x86_64-unknown-linux-gnu
cargo build
RAVEDUDE_PORT=/dev/ttyUSB0 cargo run


