Configuration Bits in Mid-Range PIC Microcontrollers

Device Configuration Bits allows the programmer to adjust certain condition that determines the operation modes of the microcontroller. That is the state of Configuration Bits determines the mode in which device operates when it is powered. These configuration bits are mapped in the program memory location 2007h. This location can't be accessed during normal operation and can be accessed only at the time of programming. Their placement is automatically taken care by the device programmer or ICSP programmer. Hence selection...

Generating PWM with PIC Microcontroller using Hi-Tech C

PWM (Pulse Width Modulation) is a powerful technique used to generate analog voltage using digital signals. It has a wide variety of applications such as controlling average power delivered to a load, generating analog voltage level, sine wave generation and DC Motor speed control. PWM signals are ON-OFF signals (hence the name Pulse) whose ON duration are changed (hence Width Modulation) according to our requirements. The fraction of time period for which the signal is ON to total time period is...

Using UART of PIC Microcontroller – Hi Tech C

UART stands for Universal Asynchronous Receiver / Transmitter. It is a serial communication interface which uses two lines for sending (TX) and receiving (RX) data. As its name indicates it is an asynchronous communication interface, which means it doesn't need to send clock along with it as in synchronous communications. UART is the communication standard of our old computer's RS-232 serial port. Most of the Microchip's PIC Microcontrollers have built in USART Module. USART stands for Universal Synchronous Asynchronous Receiver...

Interfacing LCD with PIC Microcontroller – Hi Tech C

16x2 Character LCD is a very basic LCD module which is commonly used in electronics projects and products. It contains 2 rows that can display 16 characters. Each character is displayed using 5x8 or 5x10 dot matrix. It can be easily interfaced with a microcontroller. In this tutorial we will see how to write data to an LCD with PIC Microcontroller using Hi-Tech C Compiler. Hi-Tech C has no built in LCD libraries so we require the hardware knowledge of...

Using ADC Module of PIC Microcontroller – Hi Tech C

Analog to Digital Converter (ADC) is a device that converts an analog quantity (continuous voltage) to discrete digital values. This is very useful when we want to do some processing on physical quantities, which are normally analog in nature. Most of the PIC Microcontrollers have built in ADC Module. Here we are using PIC 16F877A for demonstrating the working. ADC_Symbol ADC of PIC Microcontrollers have 5 inputs for 28 pin devices and 8 inputs for 40/44 pin devices. It is a 10-bit...

Using Push Button Switch with PIC Microcontroller

I hope that you have already read the first tutorial of Hi Tech C, LED Blinking using PIC Microcontroller. In that tutorial we blink LEDs connected to PORTB by writing to entire PORT and TRIS registers. In some cases we may want to set or reset individual bits of these registers. For that we can use the bit addressable feature of these registers. We have already seen in the previous tutorial that TRIS register is used to set the direction...

Blinking LED using PIC Microcontroller with Hi-Tech C

A lot of you may heard about microcontrollers and its applications. Well it is a bit difficult to start learning microcontrollers. And the guides and tutorials also do not start from zero level which makes learning far more difficult than anticipated. I have tried to start from zero level in here also. All you need is the simplest knowledge of electronics or digital circuits. But you surely should have a decent knowledge of C language. The software for programming Microchip microcontrollers...

Automatic Power Factor Controller using Microcontroller

The thirst for new sources of energy is unquenchable, but we seldom realize that we are wasting a part of the electrical energy every day due to the lagging power factor in the inductive loads we use. Hence there is an urgent need to avoid this wastage of energy. Before getting into the details of Power factor correction, lets just brush our knowledge about the term "power factor". In simple words power factor basically states how far the energy provided has...

>