Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Write Disable ATmega328p

Status
Not open for further replies.

Athosworld

Member
I want to make a product that will have an ATmega but you know that Arduino is intended to be “open-source” but I don’t like the idea of people copying my code for the product and making knock-off versions of it. Is there any way I could lock the chip so It can not be programmed again and make the code undumpable?
 
"Arduino" relates to the Arduino IDE and modules with MCUs attached.

The various MCU ICs used are made by other companies and are not themselves Arduino products.

The ATMega328 is made by Atmel (now owned by Microchip, that makes PIC MCUs).

Just set the appropriate memory protection bits in the config. That makes it impossible for data to be read back.

See page 232 of the data sheet.

For absolute security, also forget the bootloader & program the device using the ISP interface.
That uses a six pin header connected directly to the MCU.

Once you have a tested and working program, you can use one of these:

However, to start with you are better off getting the more advanced version that includes in circuit debug capability:


That allows you to trace the program operation as it is running, for debugging and development work.
 
Drop the Arduino IDE and develop in MPLABX.
I just tried setting MPLABX up to program an ATMEGA328p without any problem.
I don't have any chips to try compiling.
atmega.png


Mike.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top