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

AD CONVERTION USING PIC452

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



Joined: 18 Feb 2004
Posts: 5

View user's profile Send private message

AD CONVERTION USING PIC452
PostPosted: Wed Feb 18, 2004 6:43 pm     Reply with quote

im using mplab 6.3v with ccs compiler 3.155v with a pic18f452, and
im trying to complete A/d convertions on 7 channels. im getting these errors
*** Error 76 "ADC2.c" Line 65(15,23): Expect ;
*** Error 76 "ADC2.c" Line 70(15,23): Expect ;
which is my read adc statement for acc6, and acc7 which are port e..E0,E1.
is there something that im missing regarding those parts in my code
listed below. if i dont use port e, the project builds. Please help thank you



#define INTS_PER_SECOND 8 // (4000000/(4*2*65536))

byte seconds; // A running seconds counter
byte int_count; // Number of interrupts left before a second has elapsed

#int_rtcc // This function is called every time
rtcc_isr() { // the RTCC (timer0) overflows (255->0).
// For this program this is apx 15 times
if(--int_count==0) { // per second.
++seconds;
int_count=INTS_PER_SECOND;
}
}

void main() {

byte start;
int16 acc1, acc2, acc3, acc4, acc5, acc6, acc7;

setup_adc_ports( ALL_ANALOG );
setup_adc( ADC_CLOCK_INTERNAL );
setup_spi(FALSE);
setup_psp(PSP_DISABLED);
enable_interrupts(INT_RTCC);
enable_interrupts(GLOBAL);
int_count=INTS_PER_SECOND;
setup_counters( RTCC_INTERNAL, RTCC_DIV_2);
set_rtcc(0);


do{
set_adc_channel( 0 );
delay_us(15);
acc1 = Read_ADC();
printf("1%2X ",acc1);


set_adc_channel( 1 );
delay_us(15);
acc2 = Read_ADC();
printf("2%2X ",acc2);


.
.
.
.
etc

start=seconds;
printf("T%u ",start);

}while(true);


could it be that something is wrong with my timing??? not sure right now
_________________
nick
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Feb 19, 2004 6:18 pm     Reply with quote

Quote:
im using mplab 6.3v with ccs compiler 3.155v with a pic18f452, and
im trying to complete A/d convertions on 7 channels. im getting these errors
*** Error 76 "ADC2.c" Line 65(15,23): Expect ;
*** Error 76 "ADC2.c" Line 70(15,23): Expect ;

The problem could be due to the compiler version, 3.155.
See the following thread.
http://www.ccsinfo.com/forum/viewtopic.php?t=4499&highlight=155
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