DavePearce / JavaAVR

Simple AVR simulator written in Java
Apache License 2.0
9 stars 2 forks source link

Supporting Different Chips #6

Open DavePearce opened 6 years ago

DavePearce commented 6 years ago

We need some mechanism to describe the various variations on the basic AVR architecture. Some kind of data file would make sense I guess.

DavePearce commented 6 years ago

Some links:

https://www.avrfreaks.net/forum/adding-atmega16u2-arduino-software https://github.com/ElektorLabs/Arduino/blob/master/source/avr/boards.txt

DavePearce commented 6 years ago

There are at least three main aspects:

Examples:

NOTE: The peripherals tend to map to different I/O ports.

DavePearce commented 6 years ago

So what do we need for a configuration? At least these things:

For the ATtiny85, we have:

This is still missing a pin label to register bit mapping I think.

DavePearce commented 6 years ago

Currently, we have the WireArrayPort which accepts a list of pins and a list of register addresses. What it could do instead is expose a list of register labels (or descriptors) and pin labels. These can then be bound after the fact.

NOTE: the USI, for example, assumes that relevant I/O pins are set as outputs in the DDRB register (on e.g. ATtiny85). In essence, the I/O peripherals drive through the I/O ports.