Page 1 of 1

Compile error with 12F752 ADC to DAC

Posted: Sat Apr 29, 2017 4:54 pm
by grboonstra
Hello, I'm new to this forum. My name is Rene. I still get the following error message:

Code: Select all

De compiler wordt gestart...
C:\Program Files (x86)\Flowcode 7\compilers\pic\bin\xc8.exe  --chip=12F752 "test.c" --MSGDISABLE=359,1273,1388
Microchip MPLAB XC8 C Compiler (Free Mode) V1.41
Build date: Jan 24 2017
Part Support Version: 1.41
Copyright (C) 2017 Microchip Technology Inc.
License type: Node Configuration

C:\Program Files (x86)\Flowcode 7\CAL\PIC\PIC_CAL_ADC.c: FC_CAL_ADC_Disable()
  5112:	ANSELC = 0x00;
	^ (192) undefined identifier "ANSELC"
C:\Program Files (x86)\Flowcode 7\CAL\PIC\PIC_CAL_DAC.c: FC_CAL_DAC_Enable_1()
   312:	DAC1CON0 = 0x20;
	^ (192) undefined identifier "DAC1CON0"
C:\Program Files (x86)\Flowcode 7\CAL\PIC\PIC_CAL_DAC.c: FC_CAL_DAC_SetOutput_1()
   325:	DAC1REFL = Output;
	^ (192) undefined identifier "DAC1REFL"
   326:	DAC1REFH = Output >> 8;
	^ (192) undefined identifier "DAC1REFH"
C:\Program Files (x86)\Flowcode 7\CAL\PIC\PIC_CAL_DAC.c: FC_CAL_DAC_Disable_1()
   333:	DAC1CON0 = 0;
	^ (192) undefined identifier "DAC1CON0"
(908) exit status = 1
(908) exit status = 1

C:\Program Files (x86)\Flowcode 7\compilers\pic\bin\xc8.exe gerapporteerde foutcode 1
Can anyone help me with this problem?
see Attachment:

Re: Compile error with 12F752 ADC to DAC

Posted: Sat Apr 29, 2017 5:47 pm
by medelec35
Hi Rene,
Welcome to the forums.
If you make a backup copy of 12F752.fcdx and replace with attached version in:
64bit windows
C:\Program Files (x86)\Flowcode 7\FCD\PIC\
32bit windows
C:\Program Files\Flowcode 7\FCD\PIC\

Finally Reload:
Reload.png
(18.51 KiB) Downloaded 2411 times
Hopefully you will get further.
You will need to bear in mind that I don't know anything about 12F752 especially it's DAC.

Can you let me know how you get on.

Martin

Re: Compile error with 12F752 ADC to DAC

Posted: Sat Apr 29, 2017 7:18 pm
by grboonstra
I still get the same problem unfortunately.

Re: Compile error with 12F752 ADC to DAC

Posted: Sun Apr 30, 2017 10:02 am
by medelec35
grboonstra wrote:I still get the same problem unfortunately.
I compiled using the modified 12F752.fcdx:
DAC 12F752.png
(126.88 KiB) Downloaded 2414 times
After file replaced, did you reload the flowchart:
Reload.png
(18.51 KiB) Downloaded 2414 times
Can you take a screen shot showing the modified file with the path including time stamp please.
E.g:
modified file.png
(55.5 KiB) Downloaded 2414 times
Martin

Re: Compile error with 12F752 ADC to DAC

Posted: Sun Apr 30, 2017 12:39 pm
by grboonstra
Thankyou!! It working now with the "Reload"option. :-)

Re: Compile error with 12F752 ADC to DAC

Posted: Sun Apr 30, 2017 1:40 pm
by medelec35
You're welcome.
Thanks for the update.
I had added additional Reload instruction in my first Reply.

I can't guarantee hardware will work.
You will need to disable Watchdog timer and possibly MCLR Pin depending on hardware set up.
Also as you're using internal oscillator you will need to add C code to the start of Main with OSCCON value.
See this post

Before trying D to A converter, you will be best dong one second flasher test
Just to make sure hardware is running at the correct speed.

Martin