1.3. PIC16 MCU Peripherals
• Digital I/O
• Timers
• A/D converter
• Comparator
• Parallel slave port
• Interrupts
Basic digital input and output (I/O) in the microcontroller uses a bidirectional port pin. The default pin configuration is generally digital input, as this is the safest option if some error has been made in the external connections. To set the pin as output, the corresponding data direction bit must be cleared in the port data direction register (e.g., TRISD). Note, however, that pins connected to the analog-to-digital (A/D) converter default to the analog input mode.
The basic digital I/O hardware is illustrated in simplified form in Figure 1.4, with provision for analog input. The 16 series reference manual shows equivalent circuits ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access