I have a circuit that is working nicely with an Attiny841, but failed with an Attiny441. I am considering the Attiny44A.
The circuit is a lithium cell monitor that uses 1 attiny to measure voltage and temperature. Each cell is daisy chained. The controller knows it has N cells, and sends N*4 bytes down the serial chain. Each cell writes it's 2 ADC values into the payload and relays it on to the next cell in the chain.
This sketch goes to sleep for 4 seconds. If the watchdog wakes it, it just turns off a load resistor and goes back to sleep. If it wakes from the serial port, it reads 2 ADC values, reads the serial data of at most 70bytes, optionally turns on that load resistor, retransmits the input serial data, and goes back to sleep with a new 4 second watchdog. It has 2 LEDs for no particular reason other than to help me debug.
I am using platformio and the arduino framework.
The serial com is set to 2400 baud. I use the PacketSerial library to encode/decode the bytes. (I am using a framing marker of 0, and I just realized that 0xff is probably much more appropriate for my data).
The Attiny841 works nicely because it is very low power when asleep. However, JLCPCB does not stock these terribly often. When I used the attiny441, it fails to read the serial data. It wakes up, but won't flash my LED indicating it got more than 0 bytes.
1) I noticed that the thing is using 251 bytes of ram, which seems odd since I only have around 80bytes of static variables. A blank arduino sketch seems to eat up 170 or so bytes. I am thinking that the 441 is probably crashing because it is going past the real RAM. Is the arduino stuff bringing in some baggage that I don't want? Should I switch to Microchip Studio and start with a blank project? Is that a quick way to eliminate baggage I don't want?
2) Am I correct to think that the only thing that would be different from the attiny441 and attiny841 is the size of the ram and EPROM? The documentation shows 2 huge sections that show the electrical characteristics of each, but I can't find anything to suggest these are different and I have no desire to compare these many many charts looking for a meaningful difference.
But the attiny441 is not a lot more available at JLCPCB anyway.
3) The Attiny44A comes in a DIP package so I can hand solder it, if JLCPCB is out of the SMT part. So, I tried to run my code on the Attiny44A, but it failed to compile. The difference I see between the 44A and the 441 is the 441 has a UART and the 44A has the USI. My understanding is that I can do serial communication in the 44A using software serial. What's the effective difference for me? In both cases I am calling Serial.write/read, so why do I care if there's a UART vs USI? My bet is that I will need to wire up something that wakes the attiny to read the serial data. Am I correct about that?
What other differences will I find when switching from the 841 to 44A?
4) I've noticed the 0-series and 1-series and what looks like some helpful documents. What series is the 841/441? How does the 84/44/24 84A/44A/24A relate? Is there some key words I could use to help me find examples for these?
Thanks in advance for any advice you have to shorten my experimentation to get me productive sooner.