Atmel code reference or API documentation?

3 posts / 0 new
Last post
RyusLightworks
RyusLightworks's picture
Offline
Last seen: 1 week 1 day ago
Joined: 02/05/2018 - 03:59
Posts: 16
Location: Germany
Atmel code reference or API documentation?

After looking around a bit it seems finding a good code reference for Atmel is harder then I thought.
There are some general that tell you how to code in C but what I am after is the particularities that apply to Atmel chips.
For example where can I find the information that PORTB is the register for the pins and setting a bitmask on it sets the output (or pulls up a pin)?
How do I know that comparing a bitmask to PINB gives me the current state of a pin definded by the bitmask?
Think I found somewhere the constant names for each individual pin too, but can’t remember where…
What does #define F_CPU 4800000UL do exactly and what other possible values are there?
Setting the fuses is still a mystery to me. Set them according to usual values from drivers that target same chip that I use but would like to know what I am doing there somehow… Wink

Crawling through the code repository in the sticky gave me a lot of information from which a lot can be derived, but is there some complete reference somewhere?

Flashlight enthusiast, tinkerer, maker and lightpainter.

mrheosuper
Online
Last seen: 10 min 20 sec ago
Joined: 09/30/2016 - 12:44
Posts: 1147
Location: Ho Chi Minh City, Vietnam

have you take a look at datasheet?

Forgot my pen

RyusLightworks
RyusLightworks's picture
Offline
Last seen: 1 week 1 day ago
Joined: 02/05/2018 - 03:59
Posts: 16
Location: Germany

Oh, there is also a datasheet with code examples… only had a technical one with electrical characteristics, timing and voltage graphs and physical dimensions.
Thanks, found a complete one now. Now I have a little bit more to read haha.

Flashlight enthusiast, tinkerer, maker and lightpainter.