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

16F690 problem

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



Joined: 27 Apr 2008
Posts: 168

View user's profile Send private message Send e-mail MSN Messenger

16F690 problem
PostPosted: Wed May 21, 2008 6:39 pm     Reply with quote

Hi there. Why I can't compile my routine with 16F690? I'm starting with a simple code like this:

Code:
#include <16F690.H>
#fuses INTRC_IO, NOWDT, NOPROTECT, BROWNOUT, PUT
#use delay(clock=4000000)
   
//====================================
void main()
{

while(1)
  {
  }

}

the output is this:

*** Error 125 "C:\ARQUIV~1\PICC\devices\16F690.H" Line 233(9,14): Duplicate #define

Never saw this before, please help.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed May 21, 2008 7:18 pm     Reply with quote

Post your compiler version.
rudy



Joined: 27 Apr 2008
Posts: 168

View user's profile Send private message Send e-mail MSN Messenger

PostPosted: Wed May 21, 2008 7:24 pm     Reply with quote

yes.

is

IDE VERSION 3.225
PCB, PCM AND PCH 3.225
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed May 21, 2008 7:55 pm     Reply with quote

The 16F690.H file is incorrect in that version. It's unfinished.
Delete the #define statements in the comparator section and put
in the following code instead. Also, there's no guarantee that
the comparator functions work in that version. I didn't test them.
But at least you won't get that error message.
Code:

#define NC_NC_NC_NC  0x00

#define CP1_A1_A0  0x80
#define CP1_C1_A0  0x81
#define CP1_C2_A0  0x82
#define CP1_C3_A0  0x83
#define CP1_A1_VR  0x84
#define CP1_C1_VR  0x85
#define CP1_C2_VR  0x86
#define CP1_C3_VR  0x87
#define CP1_OUT_ON_A2  0x20
#define CP1_INVERT  0x10
// Or the following with the above
#define CP2_A1_C0  0x8000
#define CP2_C1_C0  0x8100
#define CP2_C2_C0  0x8200
#define CP2_C3_C0  0x8300
#define CP2_A1_VR  0x8400
#define CP2_C1_VR  0x8500
#define CP2_C2_VR  0x8600
#define CP2_C3_VR  0x8700
#define CP2_OUT_ON_C4  0x2000
#define CP2_INVERT  0x1000
// Optionally Or the following with the above
#define COMP_C1_LATCHED        0x300000
#define COMP_T1_SYNC          0x1000000
#define COMP_T1_GATE          0x2000000

#bit C1OUT = 0x11B.7
#bit C2OUT = 0x11B.6
rudy



Joined: 27 Apr 2008
Posts: 168

View user's profile Send private message Send e-mail MSN Messenger

PostPosted: Wed May 21, 2008 7:58 pm     Reply with quote

Great.....


thank you very much.
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