AVR microcontroller design I / O port use precautions

1. Set the DDRx direction register correctly before reading and writing the I/O port.

2. The initial state after I/O port reset is all input operation mode, the internal pull-up resistor is invalid, and the external pin is in the state of three-state high-impedance input.

3. When the I/O port is operating in input mode and the level on the external pin is to be read, the value of PINxn should be read instead of the value of PORTxn.

4. When the I/O is working in the input mode, use or not use the internal pull-up resistor according to the actual situation.

5. Once the I/O port is set to the input mode, the output must be waited for 1 clock cycle before the value of the external pin PINxn can be read correctly.

CCTV Microphone

CCTV Microphone,Microphone For Security Camera,Cctv Audio Microphone,CCTV Audio Picker

Chinasky Electronics Co., Ltd. , https://www.chinaskyswitches.com