Get the CPU ID?

Is there something like the CPUID of the x86 CPUs?

I would like to pair the firmware with a concrete hardware.
This is my case: I design a controller board. The hardware is based on the Arduino Mega board and is manufactured by other company. I write the firmware. I would like to control how many controllers are manufactured. To control this, I want to program every controller by myself.

Without this, they can produce 50 more controllers than I order, download the firmware via ISCP of ONE already programmed controller and then upload it to all theese 50 boards again via ISCP.

Any suggestions are more than welcome.

Serial numbers on a volume microcontroller?
Nah!
You can, however, set the memory lock bits.

Thanks for the idea. I read this - http://support.atmel.no/bin/customer?action=viewKbEntry&id=394 about the lock bits and it sounds exactly what I need. However I have no idea how to do it in practical with my Arduino Mega board. How can I set these lock bits? Please, provide some additional info. It is my first AVR project.

mishoboss

You will have to step outside the realm of the Arduino environment to do it. A quick search on google found this link. It has a good description.

http://electrons.psychogenic.com/modules/arms/art/14/AVRFusesHOWTOGuide.php

also

http://www.ladyada.net/learn/avr/fuses.html

Mark