ATTINY45 UART +external clock?


I need to transmit only with an Tiny45 but... with an external clock.

I saw some UART articles about Uart with ATTINY. But always the pin 3 is used for TX. And this pin is used for XTAL.

With software serial it seems possible.

I tried at 16Mhz but it doesn't work. Does it works only with 8MHz?? (Unfortunately no 8MHz Xtal in my stock...) :-(

Can anybody confirm that?


You could probably use an external I2C UART with SDA/SCL from pins 5 & 7. Will have to search around and see if there's an Attiny45/85 compatible library for it.

Thanks CrossRoads,

I would like to avoid some external components.

Does it mean that:

  • Pin 3 canot be changed?


  • it doesn't work with 16MHz?

or both ?

  • Can we use pin 0 at with 8MHz external?


I would expect SoftwareSerial to "just work" on the 45, and for TX you should be able to use any pin.

What happens when you try? Are you getting no output? Gibberish? What?

Read the datasheet: "6.2.1 External Clock To drive the device from an external clock source, CLKI should be driven as shown in Figure 6-4. To run the device on an external clock, the CKSEL Fuses must be programmed to “00”."

CLKI is pin 2, so with the right fuse settings you can use an external clock (i.e. a powered oscillator such as and perhaps tweak the software serial library to not use any pins for Rx.