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 ...
Get Programming 8-bit PIC Microcontrollers in C now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.