Compile error with 12F752 ADC to DAC

An area to discuss 8-bit PIC specific problems and examples

Moderator: Benj

Post Reply
grboonstra
Posts: 6
Joined: Wed Feb 08, 2017 8:10 am
Contact:

Compile error with 12F752 ADC to DAC

Post 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:
Attachments
test.fcfx
(8.93 KiB) Downloaded 183 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Compile error with 12F752 ADC to DAC

Post 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
Attachments
12F752.fcdx
(13.03 KiB) Downloaded 187 times
Last edited by medelec35 on Sun Apr 30, 2017 1:35 pm, edited 1 time in total.
Reason: Added Reload instruction.
Martin

grboonstra
Posts: 6
Joined: Wed Feb 08, 2017 8:10 am
Contact:

Re: Compile error with 12F752 ADC to DAC

Post by grboonstra »

I still get the same problem unfortunately.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Compile error with 12F752 ADC to DAC

Post 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
Martin

grboonstra
Posts: 6
Joined: Wed Feb 08, 2017 8:10 am
Contact:

Re: Compile error with 12F752 ADC to DAC

Post by grboonstra »

Thankyou!! It working now with the "Reload"option. :-)

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Compile error with 12F752 ADC to DAC

Post 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
Martin

Post Reply