Other articles

  1. PIC 16F690 7 seg voltmeter


    This little program reads analog voltage on AN2, and converts it into an ADC value, and then claculates the volt. The volt is displayed on a 3 digit 7 seg.

    Check out this article for the schematic.

    #include <xc.h>
    // CONFIG
    #pragma config FOSC = XT        // Oscillator Selection bits (HS …
    read more
  2. PIC 16F690 7 seg display


    In this note I make a program that counts decimal number from 00.0 to 99.99. Eventually, this program will be the base program to both a voltmeter and a thermometer. That's actually the same thing. Calculating the voltage is a tiny bit different.

    The program

    #include <xc …
    read more
  3. PIC 16F688 ADC average.


    This little program reads the ADC value of AN7 5 times, stores it in an array, and calculates the average. This perticular examples uses an LM34. This is converted to Celsius.

    All the Uart - code is in the uart_header and uart_source files.

    The output


    The program

    #include …
    read more
  4. PIC 16F688 1 sec interrupt demo.

    The 1-sec

    This is a small demo on how to use interrupt to flash a led at a 1 sec rate.

    PIC16F688 have one 8-bit timer. This means that the max value TMR0 can have is 256, then it rolls over to 0, creating an interrupt.

    To generate a one …

    read more

Page 1 / 3 »