1. PIC 16F688 LM34 to PC.

    Introduction

    This little program reads ADC from AN7, converts and converts it to Celsius. There's a LM34 connected to AN7. TX is connected to a USB-RS232 converter.

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

    The output

    Output

    The program

    // INCLUDE LIBRARIES
    #include <xc.h>
    #include <stdio.h …
    read more
  2. PIC 16F628A GSM Demo.

    PIC and SIM900A

    This program demonstrates how to use the SIM900A to connect and disconnect to the cell network with GPRS. The uart code are in libraries.

    Main program

    // INCLUDES
    #include <stdio.h>
    #include <stdlib.h>
    #include <xc.h>
    #include <string.h>
    #include "uart_init_header.h"
    
    // CONFIG
    #pragma config FOSC = HS …
    read more
  3. PIC 16F628A UART demo.

    This is a demo of how to use libraries when programming PICs.

    Main program

    // INCLUDES
    #include <stdio.h>
    #include <stdlib.h>
    #include <xc.h>
    #include <stdbool.h>
    #include <string.h>
    #include "uart_init_header.h"
    
    // CONFIG
    #pragma config FOSC = HS        // Oscillator Selection bits (HS oscillator: High-speed crystal/resonator on RA6/OSC2/CLKOUT …
    read more
  4. PIC 16F688 ADC demo.

    PIC 16F688 ADC

    This is a little ADC demo, based on the PIC 16F688. I'm using 8-bit analog converter, that's 255, not the 1023 a 10-bit has.

    // INCLUDE LIBRARIES
    #include <xc.h>
    #include <stdio.h>
    #include <stdlib.h>
    
    // CONFIGURATION BITS
    #pragma config FOSC = HS        // Oscillator Selection bits (INTOSCIO oscillator: I …
    read more
  5. MPLAB X - things to remember

    lø. 02 desember 2017

    A Work In Progress

    The list

    This is a list of tips/trix and things to remember in MPLAB X. It is based on my experience.

    To disable warning: (373) implicit signed to unsigned conversion warning, put this in your code:

    #pragma warning disable 373
    

    I place it under the …

    read more

« Page 2 / 3 »

blogroll

social