Posts

Showing posts from February, 2016

PIC16F877A internal EEPROM Tutorial

Image
  PIC16F877A internal EEPROM Tutorial This post provides the internal EEPROM reading and writing  code for PIC16F877A microcontroller. As we know , PIC16F877A microcontroller has 256 bytes of built in EEPROM data space with an address range of 0x00 to 0xFF. This code is written in C language using MPLAB X IDE with XC8 compiler. It is assumed that you know how to blink an LED with PIC16F877A microcontroller. If you don't then please read  this page  first, before proceeding with this article. Circuit: Figure1: PIC16F877A internal EEPROM Tutorial Code The code for the main function is shown below. Figure 2: Pic16F877A Internal EEPROM code Downloads EEPROM code for PIC16F877A was compiled in MPLAB X IDE  with XC8 compiler and simulation was made in Proteus v7.10.  To download code and  Proteus  simulation Click here

Current meter using PIC16F877A

Image
DC and AC Current sensor using PIC16F877A This post provides a simple digital current meter circuit  using PIC16f877A microcontroller and ACS712. This code is written in C language using MPLAB X IDE with XC8 compiler.  In this post, it is assumed that you know, How to use ADC of PIC16F877A microcontroller.  How to interface LCD with PIC16F877A microcontroller.  How to interface ACS712 with PIC16F877A microcontroller.   Figure 1 :Current Meter using PIC16F877A and ACS712 In this circuit PORTB pins are used to interface LCD with PIC167877A microcontroller . The output of current sensor is given on the RA0 (or AN0) pin. Figure 2 : Current meter using PIC16F877A and ACS712 Calculation: The ACS712 sensor read the current value and convert it into a relevant voltage value, The value that links the two measurements is  sensitivity  (you can find it on the  datasheet ) which – for 5A model – has ...