Explain the internal workings of a microcontroller, including interrupts, timers, clock trees, and memory architecture.