AVR128DA28 on breadboard
This is a AVR128DA28 stuck into a breadboard for the purpose of developing this port for NuttX. It can also be used as a reference for making ports for other boards.
Features
AVR128DA28
Configurations
nsh
Basic testing configuration. When
and are both set, allows adding and execution of other applications.Peripheral usage
Serial ports
The board does not need any special configuration for serial port usage. Everything is set in architecture configuration in
Compile & Flash
All code is tested with GCC for AVR. In Debian and operating systems derived
from it, gcc-avr
package provides the compiler and avr-libc
provides
related files. Note that older versions of GCC do not support these chips
out of the box
and some manual downloads are required. Other AVR compilers should work
as well but since these were not tested, not all features are enabled for them.
Default configuration produces nuttx.asm
file with program disassembly
and nuttx.hex
file in Intel HEX format to be used for upload to the chip.
Program can be uploaded for example by avrdude
using UPDI (Unified Program
and Debug Interface.) As for programmer hardware, any serial port should
work. Serial port data pins need to be level-shifted to chip’s supply voltage.
The pins are then connected through circuit like this one:
Vcc
|
100k
schottky |
(PC) TX> -- |<|----------------------------- <RX (PC)
\-- 470R -- <UPDI (MCU)
As long as TX is logical 1, there is no current between Vcc and TX pin and both RX and UPDI pins read 1. When TX transitions to logical 0, the schottky diode opens and overrides the 100k pull-up resistor, both RX and UPDI read 0. When UPDI transitions to logical 0, it also overrides the pull-up resistor but the schottky diode remains closed and prevents TX pin from being affected. RX reads 0.