One embodiment of the present invention includes a microcontroller that enables
its on-chip microprocessor to write data into a register of an on-chip programmable
analog circuit even though the two circuits may be operating at different frequencies.
Specifically, the microcontroller includes a write synchronization circuit that
helps facilitate the write operation between these two circuits. For example, the
write synchronization circuit is coupled to receive write cycle signals from the
microprocessor and is also coupled to receive trigger signals based on a clocking
signal received by the programmable analog circuit. Therefore, upon receiving a
write cycle signal, the write synchronization circuit has the ability (if needed)
to stall the microprocessor's operations until the optimum time for writing data
into the register for controlling the programmable analog circuit. As such, the
write synchronization circuit dynamically synchronizes the microprocessor's write
operation with the programmable analog circuit's optimum timing condition for receiving data.