Posts

Showing posts from 2012

A Simple PC Based Voltmeter using PIC Microcontroller

Image
Here is a simple PC based voltmeter using micro-controller PIC16f676.It has a ADC in it and ADC reading is sent to PC using RS232 interface. There is also a simple front-end is included in this . It is written in Python using Qt4 widgets Download HEX program and Front-End

Calibrating PIC microcontroller internal oscillator

I am describing here a method to calibrate PIC micro-controllers.One day I antecedently erased the the oscillator calibration value in my PIC pic16f676.Then searched for a solution to recalibrate it.I found this link from Microchip's website AN250 - Auto-calibration of the PIC12F6XX Internal RC Oscillator . But for this method needs an additional reference pulse generator of 5kHz.But I don't have these things.So I tried an alternate method.In this method, we need a PC with serial port to calibrate PIC micro-controller. Other things we needed are,     A compiler for PIC. I use PICC Lite edition.      PIC burning software . I use Picprog Here is a simple c source code #include <htc.h> #include <conio.h> __CONFIG(FOSC_INTRCIO & WDTE_OFF & PWRTE_ON & CP_OFF & CPD_OFF & BOREN_OFF & MCLRE_OFF); /************************************* * Tunable parameters */ /* Transmit and Receive port bits */ #define TxData RA2 /* bit3 in