Had a short interview on microcontrollers, I was pretty rusty…
1) How to share information between multiple IC’s?
I interpreted this question as testing my knowledge of working between different time domains, and whipped up a response using a shared memory bank and inverting the write enables of the connected IC’s.
DMA: “This feature is useful any time the CPU cannot keep up with the rate of data transfer, or where the CPU needs to perform useful work while waiting for a relatively slow I/O data transfer.”
2) How to get a slower clock signal from a source clock? Use interrupts on fixed counts of the faster clock.
3) How to generate a PWM signal…output high on (duty_cycle)*period, the rest output low.
4) Talk about using data structures on a micro vs. a PC…
Ex. Storing a value table to generate sine waves. Pre-store strings. Use shifts instead of divisions, etc
4) An ADC is sampling a signal, how do you sync the ADC’s clock to the source’s?
-Easy case: You have access to the signal clock, use the same clock for ADC.
-The question was then modified to use a sinusoidal signal, this makes it easier…use either peak-detector, or count the time between positive/negative crossings to find the period.
-Quadrature sampling…use two reference signals offset by 90 degrees.
-Phase-lock loop? Not familiar with that at all 😦
5) Different micro platforms…PIC, Arduino/Atmega, Microchip, 8051, etc.
Overall, need to be a bit more polished and articulate in explaining technical concepts.