Documentation related to ATTINY 1614

Hello everyone

Recently I started working with attiny1614 controllers. I am having a hard time understanding its timers from the datasheet. I have programmed atmega328p, atmega2560, and some of the PIC controllers using timers, so I have little experience in register-level programming. But with attiny1614 I understand nothing. What syntax do I need to use to program its registers, and am I programming it using Arduino IDE. If anyone can share some easy-to-understand documentation regarding its timers and interrupts will be really helpful.

and please don't tell me about timers and interrupts libraries related to attiny, because I don't want to use them.

You might not want to use them, but you can certainly examine the code to see how it is done.

can u link me to example codes ?

Is your google broken?

The MegaTinyCore, that I suspect you are using has several examples for setting up Timer Couter A (TCA0). When I started working with these I found it difficult to find the right register names. It is not a 1:1 translation from the datasheet, as it is with the AVR's you have programmed before.

What helped me a lot is having the header file (see attached) also open on my PC. In the header file I do a search for the Bit-name from the particular register I want to program and then I can step through the headerfile to see what is the right syntax. After a few hours you start to understand the thoughts behind it and it becomes easier.

iotn1614.h (264.1 KB)

1 Like

thanks alot.