mit | Posted: 4 Jan 2018, 10:58 PM |
---|---|
yeah whatever Admin Posts: 566 Joined: 4-May 16 |
QUOTE
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.