Archive for the ‘Peripheral Interface Controller (PIC)’ Category

Digital Count Down Timer using PIC Microcontroller

In this article, our author Mithun has developed a 0 – 99 min counter using PIC microcontroller 16F628A. So basically this is a digital count down timer ideal for engineering and diploma students for their project requirements. We have given complete circuit diagram of the digital count down timer along with full source code. In addition, photographs of the breadboard setup is uploaded. Every micro controller has a timer unit inside. A timer is nothing more than a time counting device fabricated inside the micro controller unit. A wide range of practical applications require a timer in action. For example,…

Read More

Digital Voltmeter using Micro Controller PIC16F73A

In this article, we have come up with a new PIC micro controller project. Our author Mithun has created a Digital Voltmeter Circuit using PIC16F73A and multiplexed 7 segment displays. The circuit is well explained with diagrams and the source code (written in Embedded C language) is available for download.  If you have any doubts while implementing this project, please feel free to ask in comments. Note:- You may also like to read our Digital Voltmeter using 8051 created a while before. In this circuit, we have created a voltmeter using AT89S51. In addition you will learn about interfacing 7…

Read More

Transmitting data from PC to LCD using UART of PIC16F628A

Our world relies upon Communication. In today’s world, we can make almost anything communicate with everything! How about communication between a PC and a microcontroller (PIC)? Now, before making a PC and a PIC talk, if you are not sure about USART module and LCD, here are some good articles about them to just refresh: 1. PIC USART module – CT 2. A note on character LCD displays – CT In layman terms, a USART module in a PIC is like our voice box. Without the USART module, the controller will be in a mute state.What actually we are gonna…

Read More

Working with MPLAB IDE

Introduction to MPLAB IDE – What is it and how to install it? The above link takes you to the article about introduction to MPLAB IDE, in case if you have missed it. Having installed MPLAB IDE and one or more compiler suite, this article describes how to compile a program and extract the .hex file to program our chip. I will be using C language in this tutorial as it is requested by one of our CT readers and I will be using Microchip’s HI-TECH C compiler.   Creating and Saving a new project: Open MPLAB X and in…

Read More

Introduction to MPLAB IDE

Similar to Atmel’s AVR studio, Microchip MPLAB is a feature rich IDE which integrates compiler tool-chains into the IDE itself and also supports proprietary programming devices and debuggers for the Microchip’s Controller family. Just if you have a microchip programmer such as Pickit2 or ICD2, then just plug it to the computer and all you need is to prepare your code in the MPLAB IDE and then straight away build and download the code into your controller. Downloading MPLAB IDE The newer version is MPLAB X which can be downloaded here. Here you can select the platform (operating-system) and also…

Read More

Timers and Interrupts (PIC16F84A)

Timer Module: A Timer is a simple module included along with almost most of the microcontrollers. A timer can be used as a timer/counter. The size of the timer varies from controller to controller. The PIC16F84A has one 8 bit timer module. The very basic operation of a timer is to count and nothing else!. In the timer mode, the module will increment automatically for every instruction cycle (instruction cycle is not same as the clock cycle) and in the counter mode, it increments on every rising/falling edge of the pulse given at pin RA4 (3rd pin). Since it is…

Read More

PIC16F84A – Instruction Set (Continued)

Having known about the byte oriented file register operation, only two categories are remaining – the bit oriented file register operations and the control operations. Bit-oriented file register operations: Here these instructions are used when a single bit needs to be affected/changed/checked. There are only four bit-oriented instruction for the 16F84A Mnemonics & Operands Description BCF f,b Bit clear f (b represents the bit to be cleared in the specified register) BSF f,b Bit set f BTFSC f,b Bit test f, skip (the next line) if clear BTFSS f,b Bit test f skip (the next line) if set The instructions…

Read More

PIC16F84A – Instruction Set

The instruction set of PIC16F84A has 35 instructions [The controller "understands" 35 words].These instructions are otherwise called Mnemonics. While introducing about the PIC16F84A till the hello world program,  7 instructions are introduced to you which were, BSF – bit set f BCF- bit clear f MOVLW – move literal value to W-register MOVWF – move contents of W-register to file [specified] GOTO – go to the address [the label indicated] BTFSS –  Bit test f, skip if set DECFSZ –  Decrement f, skip if zero. Now, only 28 instruction to go! Before dealing with the instructions, let us classify these…

Read More

PIC16F84A – The Hello World program.

The previous posts about PIC16F84A explained about controlling the GPIO(General Purpose I/O) pins of the IC. Previously laid circuits explained only about how to switch on or off an LED. You just simply set the desired pin to output and then send a high/low signal to switch on/off the LED. Now, in this post, let us implement the blinking of LED – “The hello world program of embedded electronics” . So what do you do to make an LED blink? Just switch it on and off in an infinite loop.  – yeah its right, but this is not going to…

Read More

PIC16F84A – Working with Inputs

I hope everyone who read the post about programming the PIC16F84A will now be savvy with downloading the program to the controller, and also check the working of the controller. In the previous post, we discussed about producing an output (switching on an led) using PIC16F84A. Here, I will tell you how to work with inputs – How will you provide inputs to your PIC and how to develop a response to it. As you all know, the controller has 13 I/O pins. These 13 pins can be configured either as input or output. Producing output on a pin is…

Read More