AVR c compiler user manual

Thread Starter

mik3

Joined Feb 4, 2008
4,843
Hi guys,

Does anyone knows where to find the user manual for the AVR compiler?

I mean one like the CCS user manual for PICs.
 

Thread Starter

mik3

Joined Feb 4, 2008
4,843
I downloaded WinAVR and found the user manual but it is not very good like the CCS manual.

What is your suggestion about programming AVRs in C?
 

hgmjr

Joined Jan 28, 2005
9,027
Well, the WINAVR C is Kernighan & Ritchie compliant as far as I know.

With what aspect of C language programming are you most in need of assistance?

hgmjr
 

hgmjr

Joined Jan 28, 2005
9,027
I downloaded WinAVR and found the user manual but it is not very good like the CCS manual.

What is your suggestion about programming AVRs in C?
Is the manual to which you are referring the file avr-libc-user-manual.pdf ?

hgmjr
 

Thread Starter

mik3

Joined Feb 4, 2008
4,843
I have never used AVRs and want to learn which software to use to program them with C.

I made a research and found that programming in Basic might be better.

What is your opinion?
 

hgmjr

Joined Jan 28, 2005
9,027
I have no experience with programming AVR with BASIC.

What aspect of C are you looking for help with specifically?

hgmjr
 

hgmjr

Joined Jan 28, 2005
9,027
That experience should translate fairly well over to AVR.

Have you invested in an AVR prototype development board or are you planning to build your own? What AVR device have you selected as your first one to explore?

hgmjr
 

Thread Starter

mik3

Joined Feb 4, 2008
4,843
No, I don't have a development board. I am planning to make one with a ZIF socket and terminal blocks as to be able to connect anything on it.

I have bought some ATMEGA8-16PU uCs.
 

hgmjr

Joined Jan 28, 2005
9,027
No, I don't have a development board. I am planning to make one with a ZIF socket and terminal blocks as to be able to connect anything on it.

I have bought some ATMEGA8-16PU uCs.
That's a good way to get started. Have you sketched up a rough schematic of your design? Once you do I will be glad to provide you with any assistance you need in getting your first program up and running.

What AVR device programming tool have have you selected for use to in-circuit program your AVR?

hgmjr
 

Thread Starter

mik3

Joined Feb 4, 2008
4,843
I have a programmer which can program both PICs and AVRs and I will use it to program the AVR.

The problem is not the programming but the code instructions. I don't find the libc user manual very helpful. If you compare it with the CCS manual you will see the difference (CCS is much better and neat).

Do you think I shall go on with C or use Basic?
 

hgmjr

Joined Jan 28, 2005
9,027
I myself would go with C-language over BASIC simply because I like the power of C. I also like the FREE C-compiler that is WINAVR.

I suspect that your uneasiness is based on the AVR hardware-specific aspects of C that you will have to become familiar with for the AVR. I can ease you concern somewhat by saying that your experience with PIC will serve you well since you know the general things that must be considered.

hgmjr
 

Thread Starter

mik3

Joined Feb 4, 2008
4,843
I know the general things but I have to learn the functions how to setup the oscillator, ports, timers etc.

I will continue my own research over the internet but if you know any useful links please post them here.

Can you post the general structure of a C program for the AVRs and the basic setup functions?
 

hgmjr

Joined Jan 28, 2005
9,027
As you probably already know, the details of the registers and the meanings of the bits they contain for the various internal features like the timers, ADC, and PWM and others are contained in the datasheet for the AVR device you will be using.

What would be really neat would be a utility that provided a user-friendly control panel for each of the internal functions. You could then go in and define the operating parameters for the timer and the utility would generate a C-language code script that you could then cut and paste into your source code.

hgmjr
 

hgmjr

Joined Jan 28, 2005
9,027
Take a look at this program called AVRWIZ. You will need to download .NET 2.0 from www.microsoft.com to get it to work.

I have just now downloaded it so I don't have any experience using it but it looks interesting.

hgmjr
 

eblc1388

Joined Nov 28, 2008
1,542
I have bought some ATMEGA8-16PU uCs.
ATMEGA48/88/168 would be a much better choice.

ATMEGA8 is old and doesn't has any debugging options available like JTAG or DEBUGWIRE which are available in more modern AVRs.

Without any debugging facilities, build/testing a large C program could take a lot of time.
 
Top