lm32: pic and juart helper functions