Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

AVR studio 5 problem for C

Status
Not open for further replies.

Noman Yousaf

Full Member level 4
Joined
Nov 19, 2003
Messages
210
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,298
Location
Lahore Pakistan
Activity points
1,774
hi
I have used CCS and mikroC as PIC compiler.
now i am going to use AVR studio as AVR C compiler.
In beginning i am facing a problem about #define.
How can i define port as label like i want to use portb.0 as LED output.
when i write #define LED PORTB.0 it makes error.
what is the right way.

Secondly, from where i can get manual about C programing in AVR studio 5?
thanks in advance
 

FlapJack

Advanced Member level 1
Joined
Sep 16, 2010
Messages
400
Helped
103
Reputation
206
Reaction score
100
Trophy points
1,308
Location
USA
Activity points
3,822
In case you do not know, AVR studio 5 was the first version of AVR studio that uses Microsoft visual studio as a base. This was considered to be a very buggy program and not well received.

The latest AVR studio is version 7 and works much better. You can read about and download it here.

https://www.atmel.com/Microsite/atmel-studio/compiler-editor.aspx
 

julian403

Full Member level 5
Joined
Feb 28, 2014
Messages
254
Helped
1
Reputation
2
Reaction score
1
Trophy points
18
Location
Argentina
Activity points
2,105
Why you don't use another compiler and then by FLIP "burn" the program in the flash. for example in eclipse you can use avr-gcc y avr-libc as compilers and toolchain AVR.

Then when you get the .hex you can use FLIP.

In my opinion atmel do not gives good tools (you must think that the biggest comunity is germany), but the micros are good and robuts. Much better than PICs

#define LED PORTB.0

that's bad. Try: #define LED_PORTB 0

Secondly, from where i can get manual about C programing in AVR studio 5?
You need to read any books of C programing. Then the AVR lib you can see it on the AVR studio whit examples. For example if you use UC3A3 Xplained there is librery which abstract the hardware configuration.
 
Last edited:

FlapJack

Advanced Member level 1
Joined
Sep 16, 2010
Messages
400
Helped
103
Reputation
206
Reaction score
100
Trophy points
1,308
Location
USA
Activity points
3,822

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top