AVR implementation of modbus protocol