Sign In

Digital Voltmeter Using Pic 16f676

Naresh nareshpurohit1993@yahoo.com India

Hardware: 16f676 At 4mhz Software: Mp Lab Complier

Analog to digital converter using pic16f676 and sown on LCD .

Images

Replies

R Avinash
2016-09-05 16:37:56
This is a problem solution based service, where programmer trying to make something but facing problems are helped. This is NOT A REQUESTING SERVIVE WHERE PEOPLE CAN POST THEIR SPECIFICATION AND WANT TALENTED PROGRAMMERS TO WRITE THEIR PROGRAMS FOR FREE!
R NARESHPUROHIT J. PUROHIT
2016-09-06 07:32:55
PROSPICE 8.04.00 (Build 21003) (C) Labcenter Electronics 1993-2015.
Loaded netlist 'C:UsersadminAppDataLocalTempLISA7044.SDF' for design 'New Project.pdsprj'
PIC12 model release 8.3.00 (Build 20025) simulating PIC16676 device. [U1]
Loaded 128 bytes of persistent EEPROM data. [U1]
[COFF] Loading PIC18 COFF file 'C:UsersadminAppDataLocalTemp3eabe31cbde14db1bb19b528f717d79dPIC16F676DebugDebug.COF'. [U1]
[COFF] Could not load source file 'C:UsersadminAppDataLocalTemp3eabe31cbde14db1bb19b528f717d79dPIC16F676DebugDebug.as'. [U1]
[COFF] Could not load source file 'C:UsersadminAppDataLocalTemp3eabe31cbde14db1bb19b528f717d79dPIC16F676Debugstartup.as'. [U1]
[PIC12 ADC] PC=0x03D7. ADC conversion clock period (5e-07) is possibly invalid for device clock frequency. [U1]
[PIC12 ADC] PC=0x03D8. ADC conversion started before 'wait' time has expired following previous conversion or channel change. [U1]
this are the message shown when i debug my program , can you help me out in this
/* Main.c file generated by New Project wizard
 *
 * Created:   Fri Sep 2 2016
 * Processor: PIC16F676
 * Compiler:  MPLAB XC8
 */

#include <xc.h>
#define SETBIT(p,b) p|=(1<<b)
#define CLEARBIT(p,b) p&=(~(1<<b))
#define _XTAL_FREQ 4000000
//#pragma config FOSC = INTRCIO   // Oscillator Selection bits (INTOSC oscillator: I/O function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN)
#pragma config WDTE = OFF       // Watchdog Timer Enable bit (WDT disabled)
#pragma config PWRTE = ON       // Power-up Timer Enable bit (PWRT enabled)
#pragma config MCLRE = OFF      // RA3/MCLR pin function select (RA3/MCLR pin function is digital I/O, MCLR internally tied to VDD)
#pragma config BOREN = OFF      // Brown-out Detect Enable bit (BOD disabled)
#pragma config CP = ON          // Code Protection bit (Program Memory code protection is enabled)
#pragma config CPD = ON   // Data Code Protection bit (Data memory code protection is enabled)
#use delay (clock 4000000)

void main(void)
 {
   CMCON=0x07;
  ANSEL=0x00;
 
  //PORTA=0X00;
 
  ADCON0=10000000;
  ADCON1=0x00;
    ANSEL=0b00000001;
   TRISA=0b00000001;
    PORTA=0b00000001;
   // __delay_ms(1000);
  ADON=1;
 // __delay_ms(5000);
    for(;;){     int adc;

   GO_nDONE=1;
   __delay_ms(10000);
    while(GO_nDONE);
    adc =ADRESL;
    adc+=(ADRESH<<8);
    }
    
   // Write your code here
  // while (1)
     // ;
 }

Post a reply to Naresh

Think you can help Naresh ? Then post your thoughts that might help Naresh . You will earn a lot of reputation in the technical community.

If your program is in multiple files, then ZIP the entire folder and attach below

Images and Screenshots

These helps other better understand your suggestion.