Posts

Showing posts from May, 2017

INTERFACING PUSH BUTTON SWITCH WITH PIC MICROCONTROLLER

Image
This article is meant for beginners in the field of microcontrollers. Here we use PIC Microcontroller 16F84A and MikroC Pro compiler. This tutorial assumes you have basic knowledge about programming PIC Microcontroller, else you read the article Blinking LED using PIC Microcontroller. In this tutorial we use a push button switch, when we press on it an LED glows for a second. Push Buttons are mechanical switches.  Then can make or break connection between two terminals and comes back to stable state when released. They are called as Push to ON or Push to OFF switches respectively. Circuit Diagram   Note: VDD and VSS of the pic microcontroller is not shown in the circuit diagram. VDD should be connected to +5V and VSS to GND. Push button switch is connected to the first bit of PORT B (RB7) which is configured as an input pin. Which is connected to a pull up resistor such that this pin is at ground potential when the switch is not pre...

Blinking LED using PIC Microcontroller

Image
Welcome to the world of PIC Microcontrollers.  You are in the right place if you are a beginner in the filed of microcontrollers. MikroC is the best compiler for beginners as it contains built in functions for most of the commonly used tasks. But MikroC is less efficient and the hex file generated will be large size compared to other compilers . So I suggest you to use Hi-Tech C   compiler   by Microchip after you get familiar with microcontrollers. Note that, Hi-Tech C is a bit difficult compared to MikroC as there is no built in functions. You can follow our Hi-Tech C Tutorials. MikroC Programming Before going to the programming you should understand the following things. Output pins of a PIC Microcontroller are divided into different PORTS containing a group of GPIO (General Purpose Input Output Pins) pins. In 16F PIC Microcontrollers, there are various registers but those   associated with port register are   TRIS and PORT. eg: TRISB, PORTB,...

INTRODUCTION TO MICROCONTROLLER

Image
Before we Start writing embedded codes we want to urged interesting individual to have a background knowledge on microcontrollers ,compilers , c language and the programmer . What is a Microcontroller A microcontroller (or MCU for microcontroller unit   is a small computer on a single integrated circuit. In modern terminology, it is a system on a chip or SoC. A microcontroller contains one or more CPUs (processor cores) along with memory and programmable input/output peripherals. Novices in electronics usually think that the microcontroller is the same as the microprocessor. That’s not true. They differ from each other in many ways. The first and most important difference in favour of the microcontroller is its functionality. In order that the microprocessor may be used, other components, memory comes first, must be added to it. Even though it is considered a powerful computing machine, it is not adjusted to communicating to peripheral environment. In ord...