Question: 1. Why do bidirectional data ports on a microcontroller default to the input direction when the microcontroller is reset?
2. Use a 74HC 138 1-of-8 decoder and a 74HC 151 8-to-1 multiplexer to design a key-board scanner that will scan an 8 x 8 keyboard matrix. Show your hardware, and give a software scanning algorithm to scan the keyboard and return a 6-bit keycode.