This schematic shows the Atmel AVR ATmega8535 as it was built in its minimal circuit. The ATmega8535 is using an external crystal. The circuit applies to the ATmega164 - ATmega1284, ATmega16, and ATmega32 as well. Any code would not, since they are not code compatible. To get an idea of where this MCU fits in the order of things, it would be called the ATmega8 if the name hadn't already been taken by the 28-pin part. It is exactly like the ATmega16, but with half of the memory.
Here you can find the current ATmega8535 datasheet