Using AVR Microcontroller to Do PLC Ladder Programming