I would like to know if it is possible to program an ATMEL MEGA microcontroller on Arduino.
like this one:
If yes can I use the same library as those used for Arduino?
If no, how can I program this type of controller?
Admitting that I get there is there any way to check that my code works properly before soldering the microcontroller to the PCB?
Some will certainly ask me why program another microcontroller yet Arduino already has an ATMEL MEGA 328?
-Eh! Well simply because I like the difficulty and hacking of the coup I prefer creates a program for my microcontrolleur before soldering it on my own PCB.
-Also I would like my project to be 100% done by me or almost. I do not want to solder a nano or micro Arduino on my PCB. I want to feel the excitement of holding my own fully homemade PCB.
Aamiral:
I would like to know if it is possible to program an ATMEL MEGA microcontroller on Arduino.
like this one:
That's an ATmega328P. It's much more helpful if you provide specifics, rather than being unnecessarily vague.
Yes, it's possible.
Aamiral:
If yes can I use the same library as those used for Arduino?
Yes. An Arduino board is just a microcontroller on a PCB with some support circuitry. The ATmega328P is the microcontroller used on the Arduino Uno, Nano, and Pro Mini. As long as you attach the necessary components to your ATmega328P and configure it correctly, there is no difference between it and an Uno/Nano/Pro Mini.
Aamiral:
Admitting that I get there is there any way to check that my code works properly before soldering the microcontroller to the PCB?
The only way you can know 100% for sure that the code works properly is by running it on the hardware. In fact, it would be insanity to write an entire program all at once, instead of developing it incrementally, testing at each stage. You could use a test board for this purpose if it's inconvenient to do development using your final hardware. If you design your PCB properly, you can upload the code to the microcontroller after its soldered to the board (in fact this will be easier with your the SMD package microcontroller you have). You can put an ICSP header on the board to allow you to upload to the microcontroller using an ISP programmer, or you can use a serial connection to upload to the microcontroller using a bootloader, as is done on the regular Arduino boards.
Aamiral:
-Eh! Well simply because I like the difficulty and hacking of the coup I prefer creates a program for my microcontrolleur before soldering it on my own PCB.
-Also I would like my project to be 100% done by me or almost. I do not want to solder a nano or micro Arduino on my PCB. I want to feel the excitement of holding my own fully homemade PCB.
Go for it. There are a ton of tutorials about this available to make it easy. This one is reasonably good: