Tag archives for PIC16F
An LED is a semiconductor light source, when forward biased, it emits light. LEDs are used mainly to indicate the status of electronic circuits, for example to indicate that power is on or off but nowadays they are used in many applications including lighting and beam detection. In this article we will learn how to connect and switch on and off various LEDs to a microcontroller using XC8 Compiler. This is the simplest project a beginner in embedded programming can start with before attempting any complex projects as we have learned from the Introduction to XC8 Compiler article.
LCDs are alphanumeric (or graphical) displays, which are frequently used in microcontroller based applications which require some information to be displayed to the user. There are many devices in the market which come in different shapes and sizes. Some LCDs have 40 or more character lengths with the capability to display several lines. Some other LCD displays can be programmed to display graphic images. Some modules offer color displays, while some others incorporate back lighting so that they can be viewed in dimly lit conditions. In this tutorial we will learn how to connect an LCD to any PORT of a microcontroller, display characters and send commands to LCD using lcd library with MPLAB Code Configurator and PIC18F Peripheral Libraries.
Analog to Digital converters allow analog continuous voltages to be converted into a discreet digital numbers inside the PIC as the PIC can only process digital numbers. This can enable a PIC to be connected to analog sensors such as temperature sensors, pressure sensors, humidity sensors, optical sensors, and power sensors. Any sensor which can generate a voltage between 0V and a maximum 5V can be used. If the output voltage is higher than 5V, a method to step it down should be used such as a voltage divider with resistors.
RS232 serial communication is one of the oldest communication where data is sent or received one bit at a time. This protocol can easily be used to communicate between a PC and various devices supporting this type of protocol like PIC microcontrollers, GPS, GSM modem etc. While other interfaces like Ethernet, FireWire, and USB all send data as a serial stream, the term "serial port" usually identifies hardware more or less compliant to the RS-232 standard, intended to interface with a modem or with a similar communication device. The Universal Asynchronous Receiver/Transmitter (UART) controller is the key component of the serial communications between a device and a PC or between devices. UART is also a common integrated feature in most microcontrollers today which is useful for communicating serial data (text, numbers, etc.) to your PC. In this article we're going to learn how to use the RS232 communication with MPLAB XC8 Compiler using the PIC18F Peripheral Library and MPLAB Code Configurator.
The I²C or Inter-Integrated Circuit is a serial communication and allows multiple devices to communicate with a micocontroller(s) over only two wires. The devices don't have to be identical as long as they support I²C protocol. In our illustration, the first device with address 1 is a digital temperature sensor, the second one is a real time clock and the third one is a serial LCD display and the bus could carry on even more devices. Communication takes place from the master (PIC) to the individual selected slave only as shown in this illustration. Configuration with PIC18F Peripheral Libraries and MPLAB Code configurator are discussed in this article
LCDs are alphanumeric (or graphical) displays, which are frequently used in microcontroller based applications which require some information to be displayed to the user. There are many devices in the market which come in different shapes and sizes. Some LCDs have 40 or more character lengths with the capability to display several lines. Some other LCD displays can be programmed to display graphic images. Some modules offer colour displays, while some others incorporate back lighting so that they can be viewed in dimly lit conditions. MikroC Pro for PIC
A memory card (also called a flash memory card) is a solid-state electronic data storage device used for storing digital information. They are commonly used in many electronic devices, including digital cameras, mobile phones, laptop computers, MP3 players and they are also widely used in data logging devices. The FAT32 library can be used for SD cards with more than 2GB of size, it lifts many constraints imposed by FAT16 file system. The key benefits is more addressable space(>2GB) and less wasted space due to smaller cluster size. This library is designed to simplify handling of the underlying hardware (SD/MMC cards), but also to be hardware independent. This library should work on any microcontroller with more than 1.5kB of RAM
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 one another. With just a network switch, many different devices can easily communicate with one another with Ethernet, allowing different devices and equipment to be accessed remotely and this also provides a cost-effective and reliable means of remote control and monitoring. For microcontrollers which don't have an integrated Ethernet peripheral, Microchip offers a serial Ethernet chip that can easily be used by any microcontroller with an SPI interface to provide Ethernet capability to the application. The ENC28J60 is a popular 28-pin serial Ethernet chip, 10BASE-T stand alone Ethernet Controller with SPI interface, on board MAC & PHY, 8 Kbytes of Buffer RAM and an SPI serial interface. In this article we will learn how to use the ENC28J60 Ethernet controller with MikroC Pro for PIC SPI Ethernet ENC28J60 Library.
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.