Re: Simulator and emulator
In addition to what E-design said, there are simulators and emulators for microcontrollers. The simulator allows you to test your ideas out on simulated silicon. Your circuit runs on software on a computer.
An emulator runs your code on a similar chip to the one you are designing for, but the chip is connected to computer software, so you have access to the registers in the chip. They are usually quite expensive to buy. I hope this helps to answer your questions.
Regards,
Robert