Archives for MBLAB X Projects
In any electronic products or projects there is always a source of power for the system to work. This is called a power supply. The source of this power can come from different sources like the mains AC voltage, a battery or even from a renewable power source like a solar panel wind turbine or fuel cell to name just a few. The most common source of power is usually the mains AC, with this power, we need a transformer to convert the 220V 50Hz mains or the 120V 60Hz if you are living in the United States of America to a lower voltage required by the electronic circuit, this can be typically between 6V and 12V when 5V regulated DC is needed. In this article we are going to design a simple 5V DC power supply that can be used to power your Microcontroler projects using the 7805 voltage regulator.
Temperature sensors are very important in many projects especially in temperature logging devices and alarms. In this article we are going to design a digital thermometer using MPLAB XC8 compiler. This digital thermometer is built around the LM35 which is a precision integrated-circuit temperature sensor whose output voltage is linearly proportional to the Celsius (Centigrade) temperature. Its output changes by 10 mV per °C so there is no need for calibration. It can measure a wide range of temperature from −55 to +150°C
The MPX4115A is an atmospheric pressure sensor powered by 5V and delivers and output from ~0.25V to ~4.75V based on the pressure detected at room temperature (25°C). The device provides a linear output based on pressure. It can measure pressures between 15kPa and 115kPa. Note that 1 atmosphere of pressure at sea level is equal to 101,325 Pa or 101 kPa. This sensor is ideal for microcontroller based barometer, altimeter, data logger or weather station applications. In this article, we're gonna create a simple Digital Barometer using MPLAB XC8 compiler.
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 the DS1307 which 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. This chip 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.
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).
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.
An automatic temperature control system has the ability to monitor and control the temperature of a specified space without human intervention. This project uses a PIC microcontroller to automatically control the temperature of an area. This area could be a small plant, a house or any place or device that require a controlled temperature like an incubator (egg) for example. The desired temperature setting is entered using a keypad. The temperature of the area is measured using an analog temperature sensor. The microcontroller reads the temperature every 10 s and compares it with the desired value. If the desired value is higher than the measured value, then the heater is turned ON, if on the other hand the measured value is higher than the desired value, then the fan is switched ON. An LCD display shows the measured temperature continuously. The project is designed using MPLAB XC8 Compiler
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.
In any electronic product or project there is always a need for a source of power for the system to work. This is called a power supply. To get power hassle-free to the power lines of a breadboard can be a challenge, you will need a convenient and safe way to get either a regulated 5V DC or 3.3V DC depending on your application on your breadboard power rails. In this project we are going to design step by step a simple Breadboard power supply that takes power from a 6 to 15V DC power supply and outputs a selectable 5V or 3.3V regulated voltage using a switch. This board can be easily inserted into a breadboard using a .1" (0.254 cm) headers mounted on the bottom of the PCB. Pins labeled VCC and GND plug directly into the power lines of a breadboard.