View previous topic :: View next topic |
Author |
Message |
rudy
Joined: 27 Apr 2008 Posts: 168
|
16F690 problem |
Posted: Wed May 21, 2008 6:39 pm |
|
|
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
|
|
Posted: Wed May 21, 2008 7:18 pm |
|
|
Post your compiler version. |
|
|
rudy
Joined: 27 Apr 2008 Posts: 168
|
|
Posted: Wed May 21, 2008 7:24 pm |
|
|
yes.
is
IDE VERSION 3.225
PCB, PCM AND PCH 3.225 |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed May 21, 2008 7:55 pm |
|
|
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
|
|
Posted: Wed May 21, 2008 7:58 pm |
|
|
Great.....
thank you very much. |
|
|
|