Tag archives for MPLAB X

MPLAB® Code Configurator

image-1477
The MPLAB® Code Configurator (MCC) is a user friendly Graphical User Interface (GUI) plug-in tool for MPLAB® X IDE which generates easy to understand C code that is inserted into an MPLAB® X project, based on the settings peripherals configurations and selections made in the Graphical User Interface (GUI). The generated code can be used in any application program. When starting out with a new project using Microchip 8-bit microcontrollers, setup of the configuration and all the peripherals can be time consuming, especially for new projects. The MPLAB® Code Configurator simplifies this down to a series of simple graphical selections from the menus within the MCC.

Microchip Libraries for Applications

image-1385
Microchip Libraries for Applications (MLA) is a collection of Microchip firmware libraries, drivers, demo projects, documentation and utilities for different type of applications including USB, Graphic displays, File I/O (Memory cards), TCP IP, Smartphone and many more. Not all firmware libraries and demo projects from Microchip are distributed in this package; rather, this package includes a few specific libraries that tend to be used together. By distributing libraries that are used often together, Microchip can provide example projects that integrate the use of multiple libraries.

Interfacing GSM/GPRS Modem with PIC Microcontroller – XC8

image-240
A GSM modem is a wireless modem that works with a GSM wireless network. GSM stands for Global System for Mobile communications, this architecture is used for mobile communication in most of the countries in the world. A wireless modem acts basically like the traditional dial-up modem, the main difference is that a dial-up modem sends and receives data through a fixed telephone line while a wireless modem sends and receives data through radio waves. Besides the dial-up connection, GSM modem can also be used for sending and receiving SMS which is also one of the key features of GSM modem. A GSM modem can be used in many applications including: Remote System Monitoring, Remote Controlling System, Prepaid Electricity, Home Alarm System, Home Automation, Data loggers, Vehicle tracking, etc. In this article we are going to learn the basics commands to control a GSM modem with a PIC Microcontroller, including sending and receiving an SMS using MPLAB XC8.

Digital Clock using PIC Microcontroller Interrupt – XC8

image-155
Real Time Clock and Calendar functions are very important in many projects especially in data logging devices where a real time stamp is required in each record. This clock uses Timer 1 to implement software real time and clock functions. A Real Time clock (Digital Clock) can be made easily by using Timer 1 of a PIC Microcontroller. The Timer1 module exists in most of the series of PIC, this module can be used to easily implement a real-time clock. Instead of an external real-time clock device like a DS1307, an inexpensive 32.768 kHz watch crystal and two 33 pF capacitors are used to complete the circuit. In this application, Timer 1 is clocked by an external crystal (32.768 kHz) connected across RC0 (T1OSO) and RC1 (T1OSI).

Reading and Writing to PIC Internal EEPROM – XC8

image-247
There are three types of memories in a PIC Microcontroller, The Flash Program Memory, The Data Memory (RAM) and The EEPROM Data Memory. The code that is written by the user to perform a specific task by the microcontroller is stored in the Flash. Flash memory makes it possible to program a microcontroller many times because it is re-writable, this memory can be written into and erased many times. RAM Data Memory is used for storing data temporarily during program execution and it is volatile. The third memory is EEPROM memory which is an abbreviation for Electrically Erasable Programmable Read Only Memory. EEPROM memory can be read and write electrically, can be accessed through program. It is a non volatile memory but has slower response time. EEPROM memory can be used to store data which should not be loss during power loss or CPU reset. such data could be like device parameters or settings which could be entered once and stored in the EEPROM. In this article, we will learn how to read or write data to the microcontroller built-in EEPROM.

Ethernet Communication with PIC Microcontroller

image-252
In this series of PIC Microcontroller Communication, after learning on how PIC Microcontroller Communication with I2C, SPI, RS232 and USB can be achieved, in this article we are going to discuss the concepts of Ethernet Communication with PIC Microcontroller. When it comes to communication involving wires, Ethernet is the leading wired standard for networking as it enables to connect a very large number of computers, microcontrollers and other computer-based equipment to each other. With just a switch, many different devices can easily communicate with one another with Ethernet, allowing devices and equipment to be accessed remotely and provides a cost-effective and reliable means of monitoring or controlling such equipment, for example a person could monitor several vending machines located in different places which can be several kilometers apart from the PC at the conform of your desk. A simple online interface to the vending machines can allow you to monitor everything from the internet.

Interfacing Matrix Keypad with PIC Microcontroller – XC8

image-249
Keypads are small keyboards that are used to enter numeric, alphanumeric or select configuration data to microcontroller systems. Keypads are available in a variety of sizes. The common sizes are 3x3, 4x3 and 4x4 keypads. A matrix keypad is basically a combination of push-buttons in a way to form rows and columns. In this way the number of input/output pins necessary for their connection to a microcontroller is reduced. A 4x3 keypad requires 7 input/output pins instead of 12 and a 4x4 will require 8 input/output pins instead of 16 pins. Keypad is a widely used input device with lots of application in our everyday life: Telephone, ATM, electronic lock, Calculator, Industrial process, Timers etc. In this article, we are going to learn how to interface a matrix keypad with an LCD display using Microchip XC8 compiler.

Interfacing a Relay with PIC Microcontroller – XC8

image-254
A relay is an electromagnetic switch which is used to switch High Voltage/Current using Low power circuits. Relays isolate as well low power circuits from high power circuits, this is a good feature especially for safety reasons a section of the circuit with high dangerous voltage/current could be isolated from the user. When a low voltage is applied to the relay (coil wounded on a soft iron core), this coil becomes a magnet which in turns energizes the soft iron core which closes or open the high voltage/current contacts of the relay. A relay can be used to switch higher power devices such as motors, light bulbs solenoids etc. In this article we are going to learn how to interface a relay to a PIC Microcontroller, we will learn as well how to control devices connected to the relay using MPLAB XC8 compiler.

Interfacing The DS1307 Real Time Clock With PIC Microcontroller – XC8

image-280
The DS1307 is a low power serial real time clock/calender with full binary coded decimal (BCD) clock/calendar plus 56 bytes of Non Volatile Static RAM. The RTC provides year, month, date, hour, minute and second information. The end date of months is automatically adjusted for months fewer than 31 days including leap year compensation up to year 2100. It can operate either in 24-hour format or 12-hour format with AM/PM indicator. Data and Address are transferred serially through a bidirectional I2C bus. DS1307 comes with built-in power sensing circuit which senses power failures and automatically switches to back up supply. Timekeeping operation continues while the part operates from the backup supply. The DS1307 RTC uses an external 32.768kHz Crystal Oscillator and it does not requires any external resistors or capacitors to operate.

Interfacing 7-Segment Display With PIC Microcontroller – XC8

image-272
The 7-segment display is the earliest type of an electronic display that uses 7 LEDs bars arranged in a way that can be used show the numbers 0 - 9. (actually 8 segments if you count the decimal point, but the generic name adopted is 7-segment display.) These devices are commonly used in digital clocks, electronic meters, counters, signalling, and other equipment for displaying numeric only data. It is not different from an LED in terms of interfacing, by turning the appropriate segments ON and OFF we can display easily the numbers 0 to 9 and optionally the decimal point (DP). The segments of the displays are normally referred to by letters ‘a’ to ‘g’. In this article we are going to learn how to interface a single 7-Segment display with PIC Microcontroller using MPLAB XC8 compiler.