Pre-programmed Atmel using Arduino IDE

Hi guys, I am working in a project that I need to write a control algorithm for some sensors and controls a current flow basically. The thing is this project will be used in mass production. Hence I think using arduino is not the best option due to price and space limitations. I thought I can use PIC microcontroller but it is hard for me to implement since I have never coded a PIC.

I have searched a little and found that I can program Atmel microcontrollers with Arduino IDE. I do not want to buy a programmer and use arduino itself to program the Atmel in first trials. Can I program Atmel microcontrollers in this way using an Arduino board and Arduino IDE?

Then, I need to program maybe thousands of them and I thought that I can buy pre-programmed Atmel microcontrollers from www.microchipdirect.com But can I still use Arduino IDE for this purpose?

Last of all, if you have any better idea for me I would be very happy to hear.

Thanks a lot.

Atmel is the company that made the ATmega microprocessor used in the original Arduino Uno.

Atmel was purchased by Microchip, which made PIC processors, which are very different.

Which processor, exactly, do you want to program with the Arduino IDE?

jremington:
Atmel is the company that made the ATmega microprocessor used in the original Arduino Uno.

Atmel was purchased by Microchip, which made PIC processors, which are very different.

Which processor, exactly, do you want to program with the Arduino IDE?

I can used ATMEGA328P as in Arduino boards but not decided yet since I am a little comfused. If you ask why not use an Arduino, it is more expensive and requires more space. I think I can program ATMEGA328P with Arduino IDE and a bootloader. Am I right?

And when the programming is verified, I want to buy maybe thousands of ATMEGA328P with same code installed. Programming all of them might be hard and I want them to be pre-programmed. In this step I am not clear if I need to generate a different code written in different language or if I can use some output file of the Arduino IDE.

I want them to be pre-programmed.

Have you found a service to do that? I don't know of any.

The Atmel and PIC chips are all available in the same sizes and at about the same prices for equivalent performance. The market is extremely competitive, so prices are low.

To program a naked ATmega chip you can use an Arduino, as described here. That is not true for most, if any, PIC chips.

AFAIK Microchip will supply pre-progammed chips, however I have no idea what the minimum order is. I imagine it's a lot. You can ask all day on here or can contact Microchip and ask them. I'd be interested in their answer so do please let us know.

Microchip production programmer

want them to be pre-programmed.

Have you found a service to do that? I don't know of any.

Microchip themselves will do it. And I think Digikey as well.
Once you've developed your sketch, you can take the .hex file that Arduino generates, or something like that (you'll need fuse descriptions as well.) and have chips burnt as bulk. You'll have to dig into the details of exactly what is required and in what format, but there is no reason that "Arduino code" can't produce the necessary formats.

I do not want to buy a programmer and use arduino itself to program the Atmel in first trials.

I don't understand that statement. That sounds like exactly what you want to do.