CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

16F628A and SETUP_ADC_PORTS(NO_ANALOGS)

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Manah
Guest







16F628A and SETUP_ADC_PORTS(NO_ANALOGS)
PostPosted: Fri Jun 15, 2007 11:07 pm     Reply with quote

Hello.

Code:

#include <16F628A.h>

#FUSES NOWDT                    //No Watch Dog Timer
#FUSES HS                       //High speed Osc (> 4mhz)
#FUSES NOPUT                    //No Power Up Timer
#FUSES NOPROTECT                //Code not protected from reading
#FUSES NOBROWNOUT               //No brownout reset
#FUSES NOMCLR                   //Master Clear pin used for I/O
#FUSES NOLVP                    //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
#FUSES NOCPD                    //No EE protection

#use delay(clock=4000000)

char ch[20];
int dat;
void main()
{
   output_high(PIN_B7);
   output_low(PIN_B4);

  setup_comparator(NC_NC_NC_NC);
  SETUP_ADC_PORTS(NO_ANALOGS);
 
  while(1)
     {
         #use rs232(baud=9600,parity=N,xmit=PIN_A2,rcv=PIN_A3,bits=8)
         while (getc() != 'A');
            dat = getc();
         #use rs232(baud=9600,parity=N,xmit=PIN_B2,rcv=PIN_B1,bits=8)
         putc(dat);
     }
   
}


Compiler: Undefined identifier SETUP_ADC_PORTS
What is wrong?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Jun 16, 2007 2:09 am     Reply with quote

Quote:
#include <16F628A.h>

SETUP_ADC_PORTS(NO_ANALOGS);

Download the data sheet for the 16F628A. Look at the features list
on the front page. Does it show an A/D module ?
http://ww1.microchip.com/downloads/en/DeviceDoc/40044F.pdf
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group