best solution for 12 analog outputs (5 bits)

Quick note: not sure how you operated the output pins in the isr. You should not use digitalWrite() there, unless digitalWrite() is not used anywhere else.

I operated on the port to avoid that problem.