Upgrading Your ATtiny85 Projects — An ATtiny412 Tutorial
The project I wanted to build (which you can check out the story here) was ‘somewhat’ straightforward, I had a RN4020 Bluetooth LE module that needed some initialization via it’s UART interface, and was going to hand over the communication to a USB to UART IC once the configuration was done. Having used the ATtiny85 in the past I know first hand that I am in for a wild ride if I want to have full duplex UART communication as the chip does not have an built in peripheral, only that not so friendly to configure USI (Universal Serial Interface); and using any ATmega was out of the question since I had a target size for the PCB.

Block diagram of the mighty ATtiny85, no UART module to be found =(

I started to wonder what chip would fit my bill since most projects I've done in the past usually involve a 64 pin or higher packages, so I decided to visit Microchip’s website and search for parts they have available.

That’s too many results, let’s narrow it down

Luckily their parametric search engine was comprehensive. Since I was aiming to 1 UART module in the tiniest available package, I navigated through the columns to select the features I needed and was left with few results.

Success!

Two parts stood out, the ATtiny402, and ATtiny412; not that different in price and feature set I went ahead with the ATtiny412. Then I paid a visit to my favorite parts supplier Mouser to check on it’s availability, because there’s no use if that chip is right for us but we can’t buy it, right?

That’s some good availability. Awesome!

Before making the commitment, I went ahead and checked the chip’s datasheet.

We always need to check the fine print of each device we use, otherwise we might be in for a nasty surprise when your gadget is not doing what you expected

A very prominent hint staring right at us! Sure it must mean something, right?

My focus was on knowing how setup the UART interface and the digital IO as I wanted to read one of the RN4020’s outputs to know when ATtiny was ready to let go of the serial lines.
['Lesther B.']
['Embedded Systems', 'Programming', 'Hardware', 'Electronics', 'Tutorial']