Pages: [1]   Go Down
Author Topic: Read protect an ATmega328 by breaking off the Tx and Rx pins?  (Read 910 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I spent a bunch of time programming an ATmega328, would breaking off the Tx and Rx pins prevent people from copying the compiled code and putting it on their own chips?

The way i see it, the only way to get serial (and programming code) out of an ATmega is thru the Tx pin, so if i broke that off, no one would be able to read it, right?

I read about lock bits, but i all i have is an arduino, and i don't really know how to turn them on


Any help would be useful!

Thank you!!

Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 625
Posts: 34099
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

No it would not work. You can get at the code through the SPI pins and a hardware programmer.
Remember it is only compiled machine code you can get out not source code.
Anyway what makes you think that you can do anything that someone can't reverse engineered without just looking at what it does.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 535
Posts: 27046
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Better bet is to set the Lock bits, when can only be cleared with a Chip Erase command, which also clears the Flash and EEPROM - and the lock bits are cleared after the Flash is cleared.
See section 28, and 28.7.3 of the May 2011 ATMega328 data sheet.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Grumpy_mike, i made this:

http://youtu.be/HqyRo6KpDTw

and if someone really wants to develop their own code for a display, they are more than welcome to, i would just like to read-protect chips that i would sell



CrossRoads,
I can't find that may data sheet?
Can you post a link?

Oh, and is there a step-by-step guide on how to set the lock bits?
Or just a bit of code i can copy and get the effect i want?

Thanks a LOT!
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 535
Posts: 27046
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

http://www.atmel.com/products/microcontrollers/avr/megaAVR.aspx

All the processors are here.

Folks set bits within avrdude all the time.  I am not that proficient.

I have an Atmel AVR ISP MKii and use AVR Studio to read the bits & change when needed.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Pages: [1]   Go Up
Jump to: