Two voltages, one battery
A linear regulator would be suitable for this application, provided that the microcontroller does not draw a significant amount of current, otherwise a heat sink will be needed.

This LD1117 can do the job.