Go Down

Topic: Advanced programing (Read 306 times) previous topic - next topic

Patouf

Hi, I am already familiar with the Arduino high level implemented functions, but I want to go deeper and to learn how to use the AVR functions. So i tried to give a look at some files of the Arduino IDE, but i could barely understand something... So if you guys know some good tutorials about it, it would be nice if you could post a link.
Thanks :)
L.C.

PaulS

Quote
to learn how to use the AVR functions.

What AVR functions are you referring to?

Quote
So i tried to give a look at some files of the Arduino IDE, but i could barely understand something.

I don't think you are ready, then, to move beyond using C/C++ to program the Arduino. When the stuff that confuses you now makes sense, you will be ready.

Patouf

Maybe you're right, I think I'll try to fully understand how the arduino code works and the I'll try manipulating registers and so.
Thanks for the advice.
L.C.

Krupski


Maybe you're right, I think I'll try to fully understand how the arduino code works and the I'll try manipulating registers and so.
Thanks for the advice.


I agree with Paul that you may not be ready to dig into the nitty-gritty yet. But if you want to try, I suggest this:

(1) Download the PDF manual for the Atmel 328P: http://www.atmel.com/Images/doc8271.pdf

(2) Download some source code that run directly on a 328P rather than using the Arduino IDE (see Sparkfun.com: multimeter kit, digital clock kit, etc...) and look at the code and techniques used there. Refer to the Atmel manual to see what the registers and each bit in a register is doing.

Keep at that until it all starts to make sense....

Digital multimeter source: http://www.sparkfun.com/datasheets/Kits/Multimeter%20Kit%20v15.zip
Digital clock source: http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Kits/clockit-v11.zip

Even better, buy and build one of those kits, then MODIFY the source so you can see what happens.

Good luck.

-- Roger
Gentlemen may prefer Blondes, but Real Men prefer Redheads!

Erni

Take a look at avrfreaks.net

they have a lot of tutorials:

http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewforum&f=11&sid=85e11985ac8297c6d20b804ea4d6240a

I have used this one to understand the timers

http://deans-avr-tutorials.googlecode.com/svn/trunk/Timers/Output/Timers.pdf

Go Up