EmbeddedRelated.com
Books

Serial PIC'n : PIC Microcontroller Serial Communications

Stevens, Roger L. ● 1999

Serial PIC'n details various methods for implementing serial communications between a Microchip PIC microcontroller and an external device. Asynchronous serial communications is covered both by using an on-chip USART and by bit-bang methods. The RS-232 standard is explained. A discussion of synchronous serial communications includes the I2C (Philips Semiconductors), SPI (Motorola) and Microwire (National Semiconductor) protocols. The Dallas Semiconductor 1-Wire bus is described. Many code examples are included as modules which will provide the basis for the reader's own PIC microcontroller applications.


Why Read This Book

You will get a focused, hands-on guide to every common serial interface used with PIC microcontrollers, with practical code modules you can drop into your projects. The book emphasizes real-world interfacing (RS-232 level shifting, timing, and hardware considerations) and shows both on‑chip USART and resource-light bit‑bang techniques so you can choose the right approach for constrained systems.

Who Will Benefit

Engineers and hobbyists with some microcontroller experience who need to implement or debug serial communications on PIC microcontrollers for embedded or IoT projects.

Level: Intermediate — Prerequisites: Basic digital electronics and familiarity with microcontroller concepts plus some experience programming in C or PIC assembly; familiarity with basic lab tools (multimeter/oscilloscope) is helpful.

Get This Book

Key Takeaways

  • Implement asynchronous serial comms using a PIC's on‑chip USART and via software bit‑banging
  • Design and build RS‑232 interface hardware (level shifting, timing, and connector wiring)
  • Implement synchronous buses: I2C, SPI and Microwire on PICs with tested code examples
  • Integrate Dallas 1‑Wire devices and understand their timing and search algorithms
  • Write modular, reusable PIC serial code and use interrupts and buffering strategies to improve reliability
  • Diagnose and troubleshoot common serial communication problems with practical test methods

Topics Covered

  1. Introduction to PIC Serial Communications
  2. Serial Communication Fundamentals and Signals
  3. The RS‑232 Standard and Hardware Interfacing
  4. Using the PIC USART: Registers, Baud Rates and Examples
  5. Bit‑Banged Asynchronous Serial Techniques
  6. Synchronous Serial Protocols: Overview and Design
  7. I2C (Philips) on PICs: Master/Slave Examples
  8. SPI and Microwire Implementations and Use Cases
  9. The Dallas 1‑Wire Bus: Timing and Device Access
  10. Interrupts, Buffers and Reliable Data Transfer
  11. Practical Hardware: Level Shifters, Line Drivers and Cabling
  12. Timing, Baud Rate Generation and Performance Considerations
  13. Sample Projects and Code Modules
  14. Appendices: PIC Register Summaries, Parts and Reference Code

Languages, Platforms & Tools

PIC AssemblyC (embedded)Microchip PIC microcontrollers (mid‑range PIC16/PIC18 families)RS‑232 serial linksI2C devicesSPI/Microwire peripheralsDallas/Maxim 1‑Wire devicesMPLAB / MPASMHiTech C (period compilers) or equivalent PIC C compilersMAX232 (RS‑232 level shifter) and equivalent hardwareLogic analyzer / oscilloscopeBreadboard / prototyping hardware

How It Compares

Compared with broader PIC references such as Mazidi's PIC microcontroller texts, Serial PIC'n is much narrower and more practical—it focuses specifically on serial protocols and real interfacing; compared to Jan Axelson's Serial Port Complete, Stevens' book provides PIC‑centric implementation details and embedded code examples.

Related Books

Bryant, Randal, O'Hallaron,...