Continue to Site

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.

HELP, programming MCU AT90S8535

Status
Not open for further replies.

ee_cchac

Member level 1
Joined
Sep 7, 2004
Messages
40
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Activity points
390
at90s8535 asm

Dear all experts,

situation :
recently, i got a AT86RF211 development kit, which the MCU is AT90L8535.
in this kit, there is a dics contain some C program. and some .hex file.

i also got the STK500 starter kit.

i want t use C program to programe it via WINAVR. but seems not work.
so, i find ICCAVR, but still not work......then i use IAR. but...lose....

Problems:
1> Is there any good complier such that i can complie C program into .hex file for AVR Studio ??
what will it ? where i can find ??

2> if no such complier ? can i need to use AVR Studio for my programming ? is it difficult ? i only have little knowledge on 8051.....what should i refer to ?

3> refer to those reference program in dics. there is terms ICCAVR and Xlink.
what are they ??? i only got little information form web.


in fact, i have gone to some AVR tutorial, which is found in some previous topic in our newsgroup(*i.e. this EDAboard*). but i still not familiar...... i hope i can work with C.....please help me ~~


Thank you for your help.
 

book asembly at90s8535

1> Is there any good complier such that i can complie C program into .hex file for AVR Studio ??
what will it ? where i can find ??

In fact, I have used several of them and all of them do works perfectly.. I still use WINAVR and I haven't got any problems to general an hex to get my MCU programmed.
But do not confused.. AVR Studio allows you to simulate your code and program your MCU (and debug, via JTAG) etc..,

So what do need to do ?

2> if no such complier ? can i need to use AVR Studio for my programming ? is it difficult ? i only have little knowledge on 8051.....what should i refer to ?
You can use AVR studio to compile your ASM code (C compileing is done by external compilers)... As mentionned above, you can use AVR Studio to program you MCU (via ISP or JTAG)..

But clarify your needs ...


3> refer to those reference program in dics. there is terms ICCAVR and Xlink.
what are they ??? i only got little information form web.
ICCAVR is a development environnement for AVR (editor, compiler linker...)
Xlink : I do not know sorry..

If you want a good point to start with AVR : peek @ www.avrfreaks.net/ (at this time down for maintenance but will be up soon)


For my part, I use :
WINAVR to compile
Ponyprog to program my MCU
 

First of all, so thank for your help. but i still have some confuse. hope you can help me


Quote:
1> Is there any good complier such that i can complie C program into .hex file for AVR Studio ??
what will it ? where i can find ??

In fact, I have used several of them and all of them do works perfectly.. I still use WINAVR and I haven't got any problems to general an hex to get my MCU programmed.
But do not confused.. AVR Studio allows you to simulate your code and program your MCU (and debug, via JTAG) etc..,
So what do need to do ?


So, it is means that i can open C program in AVR Studio(* similiar to using C++ Visual Studio*) to do the following thing ?
test.c ==> test.hex and then burn to MCU


Quote:
2> if no such complier ? can i need to use AVR Studio for my programming ? is it difficult ? i only have little knowledge on 8051.....what should i refer to ?

You can use AVR studio to compile your ASM code (C compileing is done by external compilers)... As mentionned above, you can use AVR Studio to program you MCU (via ISP or JTAG)..

But clarify your needs ...


is it means that i must first change all necessary .c, .h files into .asm file, then to .hex file and burn ??
if so, would you mind tell me how to form .asm file ? is it only one single .asm file ?




For my part, I use :
WINAVR to compile
Ponyprog to program my MCU



it is means :
use WINAVR to change all .c and .h file into a .hex ==>
use AVR Studio to debug the .hex file ==>
the AVR Studio will burn to MCU if success.
if so, any steps need to pay attention. for example, setting, Makefile...e.tc


Added after 3 hours 8 minutes:

Dear All experts

apart from above Question, i find that when i am using WINAVR, i think i need to create a MakeFile.

howerver, i don't know how to handle the Assembler source file.....

would anyone teach me how to do so ???

aslo, i think i am using C language. fro selecting type of language, i should select :
C/C++........or
C#

thz~~
 

So, it is means that i can open C program in AVR Studio(* similiar to using C++ Visual Studio*) to do the following thing ?
test.c ==> test.hex and then burn to MCU

You can but it is not simple to make AVR Studio to interface itself to an external compiler

is it means that i must first change all necessary .c, .h files into .asm file, then to .hex file and burn ??
if so, would you mind tell me how to form .asm file ? is it only one single .asm file ?

Natively, you can only works in assembly language (.asm file) with AVR Studio... But if you interface AVR Studio with an external C compiler, you will then be able to work in both assembly and C code.
So no, you don't have to change any of your files (neither rewrite nor rename them). To work in ASM for AVR, you you take the datashhet as everyone of them has different possiblities but the the same instruction.

it is means :
use WINAVR to change all .c and .h file into a .hex ==>
use AVR Studio to debug the .hex file ==>
the AVR Studio will burn to MCU if success.
if so, any steps need to pay attention. for example, setting, Makefile...e.tc
Indeed

WINAVR is used to computed your sources code files and put them into "binaries".. You could use .hex files (this is a format that the programmers of your MCU will need), you will also be able to generate an .elf file or dwarf file, which are files that are needed to the debugger (AVR Studio).
Those files include the source code links as well as the compiled code itself.

BTW you can see the assmbly language equivalent to your code

After that, you a programmer (AVR Studio or ponyprog or avrdude or another of your own...) and use the .hex file to program it

But don't misunderstand : you don't necessary need to debug you code to program it.. (ie, if it's really simple or you know exactly what you want to do... but it is an advise)

apart from above Question, i find that when i am using WINAVR, i think i need to create a MakeFile.
howerver, i don't know how to handle the Assembler source file.....

For the makefile and other stuff, you should first read the make file, then read some docs about it (explaining makefile is like explain C code, it is complex, so unless you have specific question, I suggest you to start from an example given with WINAVR) and you its makefile to get you code work.

But as far as I remember, examples makefile are well documented to handle all of your files...

Hope this helped[/quote]
 

Thank You For yourrespone.

however, i still have problem to complie it...
i now using the WINAVR to complie C program....there still lot's of problem. i cannot identify it is due to complier problem or C program doesn't match with WINAVR....

i now upload those C code(*100% save*).....hope everyone would spend time to help me ~~

super thanks....

software using :
AVR Studio 4.1
WINAVR V2.05.32
 

Well... don't see makefile.... try to use a more recent WINAVR (20040720)

But I just poke at your code and saw __flash instruction or __interrupt or something else...

In fact, you should take a look at the WINAVR manual and avr-libc which provides functions and macros to do what you want.
Interrupt aren't handled like that, search for SIGNAL() or INTERRUPT()
 

    ee_cchac

    Points: 2
    Helpful Answer Positive Rating
sorry...still not very understand....may be
could you mind give me the link to dl latest version of WINAVR ?
 


    ee_cchac

    Points: 2
    Helpful Answer Positive Rating
sorry to previous respone that i was in a hurry to do somethings else. so thus i did not read carefully....


actually, i have already using the 20040720 version. and the *.c programs were given by atmel(*enclose by AT86RF211 development kit*). i have not write or modify these code.......

i now confuse about WINAVR.....i guess if it is a problem of these source code or i miss some Library for WINAVR.......

i will keep on reading those links provided in previous respone.


Actually, what i want is to write C program and then change it to *.hex file, then burn to MCU.....

help help help.......
 

For what you want to do, try to start from an example provide with WINAVR...

FYI : C has not been created for embedded development... Thus every compiler that are C compliant has to deal with embedded particular requierment as, put code into certain part of memory, interrupt and so on...
It is why every embedded C compiler will do something of their own to interact with interrupt...

Some of them is simply put void isr_myintfunc(void) interrupt 0xyy...
other would look like : __interrupt__ void isr_myintfunc_void()...

for AVR there are two functions that respond to interrupt :

SIGNAL (#trapnumber)
INTERRUPT(#trapnumber)

BTW, I usually works with AVR, but haven't tried their RF MCU, then, I am not very sure of how compliant they could be compare to standard AVR (ATtiny, AT90S, ATmega)
 

Dear All,

i now have the following question would like to ask.

1> a>What are the things list below ??
b> what are the function of each things ??

GCC.
ChipBlasterAVR.
Code Version C Complier.
IAR system, which is an IAR Embededd workbench for Atmel AVR assembler
ImageCraft, ICCAVR
WINAVR

2> is the book titled :"Embedded C Programming and the Atmel AVR" by Batnett, Cox & O Cull. isbn 1401812066 a good book to

refer ? is this book can convert C program to correct file format and burn to MCU, 8535 ??
 

1.
Winavr
Codevision
Iccavr
Iar ...

All of them are C compilers for AVR ucontrollers;
I recomend you to start with Codevision !

2. Yes I've heard that's a very good book especially for beginners !!!
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top