AVRmega103

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I was directed to this forum for help.

I am doing a senior project in which I would like to use the AVR line of MC. Cost is a consideration since my team and I have to self finance this project. The MC is not to expensive, but I am having a little trouble trying to find out have to program the MC. Some of the documentation on the ISP is a little confusing. I'm not sure whether programming an be done via a cable or if a device needs to be used to program the device.

I need a MC for my PCB. Is the AVRmega103 a good choice?

Is the development kit helpful in my situation?

How difficult is the software for the device to use?

I am also curious about how the C language is used with the MC. Any code examples would help.
Also mention if I can contact anyone who replys for more questions.

thank you for your help

Jason

admin's test signature
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Jason,
The AVR family of micros is a good choice. One reason I've chosen them is for the reasonable cost for the Atmel starter kits. They include switches and led's to develop your project. Atmel supplies software to assemble and program the micros. Their AVR studio can also simulate your code. The kits (STK100, 200, 300, 500) connect to your computer's serial or parallel port to program the micos.
Compilers for C code cost thousands of $$ so I would bet you won't be buying one. Do you have access to one at your school? If not, you may need to write the code in assembly code.
You've asked if the ATMega103 is a good choice. I need some details on what you want to do with it before I could suggest anything. It may work fine or it could be overkill.
Here is some information anyway. The STK300 kit comes with a surface mounted ATMega103L soldered onto an adapter board. This board is connected to the STK300. This part only comes in the surface mount package. Therefore, you would either need to purchase a special adapter with a socket to program your micros that you purchase ($$$) or you can include the programming circuit in your circuit and include a programming header to connect the programming dongle that comes with the STK300 kit. The second way has the advantage of being able to change the software as you develop it.
If space isn't a concern and you don't need all of the capabilities of the ATMega103, you may consider a DIP part. the AT90S8515 and the ATMega163 come in the 40pin DIP package. The STK500 supports both of these. If you design your board and build it with a socket, you can move the part back and fourth between the STK500 and your circuit as the program changes. Then you don't need to include the programming circuit in your circuit.
Again, even these parts may be overkill. Other people would be able to suggest a flash size for what you want to do better than I could.
Describe what you want to do with the micro. Especially which features of the AVR line are necessary. For example; hardware UART, SPI communications, PWM, brownout detection, number of interrupts, counters, etc. This may make it obvious which one you'll need.

Scott Pierskalla

admin's test signature
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Here's some more description on my project that will hopefully help me narrow down my AVR selection.

My project in a nutshell is a Wireless printer module. My design will be on a PCB and will include a receiver, MC, external memory, and a SCSI printer interface. The ATmega103 may be an overkill because I don't need features like UART, brown-out detection, and interrupts. I do need as much memory and I/o pins as possible to interface with th components listed and a few other minor components.

I do have access to C compilers at school, but I'm still uncertain whether or not the MC can be programmed using this language or if it needs to be done in assembly language.

I'm going to look into the other two choices suggested to me for alter. to the ATmega103.

thanks for your help!!!

admin's test signature
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

I have used the mega103 in many projects. A C-compiler is ABSOLUTELY useful for this part ( I say it's a must! ). I have been using MCUs for 20 years and the AVR is the most optimised MCU for C that I have ever used.

I use the IAR compiler, but I know that Imagecraft has a $200 compiler that is quite good (I have not tested it my self). The GNU compiler maybe another alternative and it's free.

Don't us assembly if you know how to write in C. The mega103 has plenty of RAM and 32 working registers as a local cash. Here are the single most important things I have experienced when writing C-code for AVR: Use as much local variables as possible !! This utilize the 32 working registers fully and your use of RAM will be very dynamic and efficient.

That will give you faster and more compact code for sure. In general the AVR is very efficient for C if you follow the school book in C-programming.

Good luck !

Ian Fischer

admin's test signature
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I use ImageCraft's compiler, and am quite satisified with it. It generates some very tight code. Probably any AVR C compiler worth it's weight will also do that though, as the AVR was optimized for use with the C language.

At first, I am tempted to say that the 103 is in fact overkill. Aside from the UART and interrupts, it has components for pulse-with-modulation, analog comparison, analog to digital conversion, an SPI bus interface (you could probably use this to talk to some of your other things), timers/counters, all right there on board. On the other hand, however, it also has the most available onboard SRAM (4k), which you said you needed. 4k is quite a lot for an MCU application. And remember, when "stuff" is onboard, it cuts your EMI risk to a minimum.

You also said you needed a bunch of I/O. The 103 has 6 x 8 I/O ports for a total of 48 pins, all of which, if I recall, can be used for general I/O (when not used for some alternate function), although 1 register is limited to input only and 1 is output only.

Good luck. You can contact me if you want.
-Clark

admin's test signature