A lightweight firmware for AVR with high performance