mitxela.com forum
Welcome. Please log in or register.

bluetooth gamepad ATtiny2313a fuses
mit Posted: 4 Jan 2018, 10:58 PM
Avatar
yeah whatever

Admin
Posts: 566
Joined: 4-May 16
QUOTE

Hi,

I was wondering what fuse settings you used when programming the tiny2313a. I'm currently using avrdude and the arduinoISP on an arduino nano to program the chip, but I'm not sure if I need to change any of the fuses while flashing it.

Thank you.

In case anyone else has this question:

Hi,

I don't remember, but we can work it out.

There is no crystal used, so it must be using the internal oscillator.

The baud rate it transmits at is 115200, for which I had set the UBRR register to 8. The data sheet for the ATtiny2313 has an equation and also a table of standard values, on page 136 you can see that for 115.2k and a UBRR value of 8, f_osc (the main cpu frequency) must have been 8Mhz.

If you search for "Engbedded AVR Fuse Calculator" we can select the ATtiny2313A, and the defaults look fine, Internal Oscillator 8MHz, except we need to untick "divide clock by 8 internally".

The calculator outputs Low Fuse: 0xE4 and High Fuse: 0xDF, and gives the avrdude command

-U lfuse:w:0xe4:m -U hfuse:w:0xdf:m


Hope that helps

-------------
[top]

Sign in to post a reply.