I don't know whether this is the good place to post this and if there is already a topic about this.
Because the Arduino is programmable, I don't want to use this in projects I really want to make.
Are there solutions/packages where you can implement the microcontroller, which you program on the Arduino, in a standalone version which isn't programmable at all?
There are essentially two ways of putting a program on the Arduino. One is to use the bootloader, which lets you program it via the serial port (this is how you normally upload sketches). The other is to connect a programmer to the ICSP header.
What I do is to prototype on the Arduino and then migrate my design on to dedicated hardware based on the atmega328p. I don't burn the bootloader on the processor, but I do include an ICSP header in my hardware, for initial programming and for any firmware updates I may want to do later.
If you want to use an actual Arduino for your system but you want to disable uploading via the serial port, you can program you sketch directly into the atmega328p, bypassing the bootloader.
I actually just meant that I would like to use my programmed microcontroller from my Arduino One, but place it into something like the Arduino but cheaper because it just delivers power and the in- and outputs and not the programming stuff..
Is this possible?
Yes, however when it starts up, the bootloader will run and see if it can load a program via pins 0 and 1, then if nothing is received it will time out and run your program. To avoid this, I load the program into the mcu using the icsp header. See Prototyping small embedded projects with Arduino | David Crocker's Solutions blog if you want the details.
I don't really understand this
I was just wondering if there is a package or something to make the microcontroller of the Arduino do his work like it does in an Arduino but without the programming possibilities of the Arduino.
What folks are saying is you can program the Arduino-type parts, then make it not re-programmable by setting some Lock bits. You then need a 12V programmer to undo that.
"Flash Security
To safeguard sensitive data, Atmel FlashVault code protection enables on-chip flash to be partially programmed and locked, for secure on-chip storage of software intellectual property. FlashVault code protection can carry software such as a math library or an encryption algorithm to potentially untrustworthy environments where the rest of the source code can be developed and debugged. All AVR microcontrollers contain lock mechanisms to prevent reading and copying the program stored in on-chip Flash."
dc42:
Yes, however when it starts up, the bootloader will run and see if it can load a program via pins 0 and 1, then if nothing is received it will time out and run your program. To avoid this, I load the program into the mcu using the icsp header. See Prototyping small embedded projects with Arduino | David Crocker's Solutions blog if you want the details.
Actually this is not quite correct for the newer bootloaders.
Newer bootloaders check to see how the AVR is starting up.
If it is starting from a external reset (reset pin being yanked by reset button pushed or auto-reset circuit)
then the bootloader jumps to the code that looks for being downloaded (re-programmed).
If the startup is from a powerup or a watchdog timeout the bootloader code jumps directly to the application code
bypassing any looking for being uploaded (re-prorammed) and avoiding any timeout.
This check happens very early in the bootloader code so it only adds a couple of microseconds at most
from powerup to user application code for the non external reset startup cases.
dopiej,
You do have to program the chip at some point.
A bootloader is optional.
A bootloader allows the chip to re-programmed using a serial port
rather than using a AVR programming device.
There are fuse bits that can be set by an AVR programming device
which prevent people from reading the code out of the chip.
But if you are asking can you use an AVR chip like the m328 in a circuit that does not have all the added
circuitry for uploading like the USB connector and USB to ttl serial chip, then yes you can
do that. You can do this with or with out the bootloader.
Example: http://arduino.cc/en/Tutorial/ArduinoToBreadboard
You can even buy cost reduced Arduino designs that still provide for arduino shield
compatibility but eliminate all but the basics.
Example: Diavolino
It depends on what your needs are as to which way you go.
i.e. with/without bootloader, arduino form factor, custom board, or breadboard.
And if you need to try to protect your code from others reading it out of the chip.