PI regulator v AVR

Zdravim, poradi mi niekto ako spravim PI regulator v atmege16 v assembleri?