Reading Code From a Chip

After reading some of the forums here concerning licenses, copyrights, etc., I'm a little confused. If one wished to make a commercial project using the ATmega 328 or any other Arduino compatible chip and didn't wish to have your project ripped off, can't you just not share the code? I know it's more complicated than that. I guess my question is: Can someone with the right equipment read and/or reproduce your code if they have your programmed chip in hand?

It depends on how the protection fuses are set. You can set the fuses to prevent the FLASH memory from being read. If you do that it is still possible to get at the code but it will take a lot of reverse engineering resources (decapping, electron microscope, etc).

Of course if they get the binary code it will still be a fairly long process to turn that back into source code if they want to make significant changes.

I'm not sure what you mean by protection fuses. Sounds interesting, though. I think at one time in my schooling I learned that with PIC chips, etc. there is equipment that can read the machine code produced by the C or PIC Basic Pro compiler. Anyway, my project isn't a time machine or lotto number picker so I'm sure I'm safe hahaha.

You need to do some reading of Section 28 of the ATMega328 data sheet.
"Program and Memory Data Lock Bits"

LB Mode 3: Further programming and Verifcation of the Flash and EEPROM is disabled in Parallel and Serial Programming modes.

However you must be aware that setting the fuses will just incease the cost for reverse engineering. It does not prevent reengineering. It does not even prevent fast reengineering. It will only increase the cost for reengineering.