Tag Archives: pic16

USART Library for PIC – Setup on MPLAB X IDE

This article describes the setup and use of the C library for serial communication. We focus on its usage with PIC16F series of MCUs from Microchip. Here we describe how to setup a MPLAB X project with support for serial communication related functions. The library is designed for compilation and use with Microchip’s XC8 C Compiler. Fig. Serial Communication Demo   Creating a New Project in MPLAB X You can create a new project using the MPLAB’s Start page as shown below. Fig. MPLAB X Start Page Alternatively you can use menu File->New Project Fig. Select New Project from File Menu And for those who love the Keyboard over mouse can hit <Ctrl>+<Shift>+<N> Any of the three method will launch the New Project Wizard as shown below. The first step is the selection of project type. From the Categories list select Microchip Embedded and from Projects select Standalone Project. Fig. Project Type Selection Second step is the selection of device for which the project is targeted. Select Mid Range 8-bit MCUs (PIC12/16/MCP) in Family and PIC16F877A in Device. Fig. Device Selection Third step is the selection of debug tool. For that select Simulator. Fig. Tool Selection Microchip MPLAB lets you install more that one compiler. It also lets you install more that one version of the same compiler. So their […]