ATTiny1624 Support
gcormier opened this issue · comments
ATTINY1624 branch up in case the availability (or pricing) of this becomes better then ATTINY841.
Pros
- Two hardware serial
- Might be cheaper?
Cons
- UPDI programmers less prevalent
Need to work on code.
- Only 256b EEPROM available instead of 512b - fix up initialize
- Frequency issues
- Hardware serial for 2nd serial port
@philwmcdonald Unsure if any of the optimizations you made are related, I've only just flashed the first test and noticed the pitch is higher on the startup tone. Later this week I'll poke around. I'll probably just also flash a 4 line program that outputs a given frequency tone and measure it with the scope to see if it's something at the core of my configuration.
Woops, I thought I read the fuses set the default clock to 16MHz. The 1624 runs at 20MHz by default. A fuse change gets us at 16MHz to save a bit of power.
Lin::serialBreak() likely doesn't play nice with hardware serial. it delays for:
breakTime = LIN_BREAK_DURATION*TBIT; // 780us break time
May need a different approach...
It's also possible txPin passed into the constructor isn't correct, or that serialBreak() requires:
pinMode(txPin, OUTPUT);
Never found a need for all that eeprom previously.
You could just initialize/use 256b instead without any impact to the operation of megadesk.
Bingo, setting pinMode fixed it!
Tested build against attin841, fixed some issues. Working!