3
\$\begingroup\$

I see lot of chip from Atmel company like AT89C2051,AT89S52,Atmega32,P89V51RD2.

Suppose I write a code for Atmega32 which blink one LED after 10 milliseconds. Can I use the same code for AT89C2051, AT89S52, P89V51RD2 if I change the port?

So if I buy one USB ISP programmer for Atmega32 MCU can I use it to program AT89C2051, AT89S52 also? Or does anybody compare the chip in terms of compiler, programmer, coding language, development board etc.?

\$\endgroup\$
5
\$\begingroup\$

The Atmega Atmega32 and AT89S52 are ISP capable. But they need different programmer. AT89ISP (see here) for AT89S52 and e.g. AVRISP mkII for Atmega32. For a list of supported devices see the product page. The AT89C2051 isn't ISP programable at all, again see product page.

The tooling support for the megaAVR and tinyAVR series are the same. You could use AVR Studio 5. As for the other devices you have listed I can not say if you can use AVR Studio for them (because I never used those devices).

\$\endgroup\$
  • \$\begingroup\$ I found one usb programmer which can be used to program any avr IC (manufacturer demand it) . 1) sunrom.com/programmers-atmel-avr/avr-isp-usb-programmer 2) amateurworld.in/… Is it possible ?? \$\endgroup\$ – Saheb Ghosh Mar 19 '12 at 5:18
  • \$\begingroup\$ @Saheb Ghosh - I never used any of the programmer you linked to, so I cannot say, if they would work. I would recommend, that you get a popular programmer, when you are starting with microcontrollers. So you are more likely to get help, when something does not work. You cannot expect that anyone will help you, when nobody knows the programmer you are using. \$\endgroup\$ – PetPaulsen Mar 19 '12 at 10:41
  • \$\begingroup\$ @Saheb Ghosh - Another point: do you realy have to use the AT89C2051 or AT89S52? When you are just starting, stick to the megaAVR and tinyAVR and get the AVRISP mkII programmer. They are widely used and the AVRISP mkII programmer is one thing less you have to worry about, when you are facing a problem and searching for the error. Thats just my opinion... \$\endgroup\$ – PetPaulsen Mar 19 '12 at 10:45
1
\$\begingroup\$

You need to recompile the code per controller type and clock frequency used. Not all controllers support the same I/O capabilities, so that needs some thought to make your code portable between controllers.

\$\endgroup\$
0
\$\begingroup\$

Code Portability: @jippie answered that pretty good.

Development environment: The free, fully integrated AVR Studio is the standard for Windows. An alternative is the gcc port WinAVR. Linux users use the gcc port avr-gcc, with it's own standard library, assembler, objcopy, programmer software. Code is not directly compatible between the Atmel compiler and gcc and standard libraries are different.

Programmers: Get an ISP(in-circuit programmer). Design your PCB-s with ISP capability even in the release version. I use an unofficial programmer, grabbed it at the local hardware store for ten bucks. Unfortunately, making your own programmer requires that either you have another programmer (to program the chip), or you have serial or parallel port on your PC. You could google around for the last option.

Also, I haven't heard of a programmer, capable of handling both 8-bit and 32-bit Atmel uC. But what do I know.

\$\endgroup\$
-2
\$\begingroup\$

@saheb ghosh You may consider using this programmer as this one can program both AVR and AT89Sxx series chips. So single programmer and many variation

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.