Getting an AT / ATtiny microcontroller ready for serial port Arduino programming

To be able to program using just the serial port pins you need your AT/ATtiny to first be programmed with a bootloader, as has been done on the microcontroller fitted on an Arduino manufactured PCB.

Programmers

There are many, we’ve used successfully

USBasp

See here.

Programming

You use “burn bootloader” from the Arduino IDE

Serial Port Programming

Once the bootloader has been programmed the AT/ATtiny can then be programmed using the UART TX and RX pins, BUT you also have to use the RESET pin as the arduino must be reset for programming to be carried out. For this reason its often simpler to use an Arduino UNO (for 5V parts) with its microcontroller removed over say a FTDI USB serial cable. See here

To program the bootloader running AT/ATtiny in circuit you have to connect:

  • The 2 UART serial port connections: TX, RX
  • The reset pin
  • GND
Gotchas to watch out for!!!!

AT micro’s can have duplicate pins for the same port! For instance the ATtiny841 has TXD0 and RXD0 duplicated and the bootloader will only work for one pair! A good idea can be to find a development PCB and see which pin they have connected to

USEFUL?
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.

Comments

Your email address will not be published. Required fields are marked *