PIC18F47Q10 ADC not working

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

Lord Grezington
Flowcode V4 User
Posts: 288
Joined: Wed Nov 02, 2011 11:15 pm
Has thanked: 29 times
Been thanked: 30 times
Contact:

Re: PIC18F47Q10 ADC not working

Post by Lord Grezington »

Hi Ben

I have copied the file in into the the stated folder, re-started flowcode and even cleared the cache. I have tried multiple channels of the PWM, saved the program under a differnet version number, re-compiled but unfotuantly it still does not seem to be working.

Do you think maybe its got something to do with using the HFINTOSC @ 64Mhz? (I have also tried it @4Mhz but no change)

Thanks

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: PIC18F47Q10 ADC not working

Post by Benj »

Hello,

I'm running with the 64MHz INTOSC too so that shouldn't be causing any issues.

The attached should solve the ADC problems for you.
PIC_CAL_ADC.c
(148.92 KiB) Downloaded 210 times
Simply copy the file here.
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC

I'll get both fixes pushed to the update system ASAP.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: PIC18F47Q10 ADC not working

Post by Benj »

Should be available via the update system for you now.

Lord Grezington
Flowcode V4 User
Posts: 288
Joined: Wed Nov 02, 2011 11:15 pm
Has thanked: 29 times
Been thanked: 30 times
Contact:

Re: PIC18F47Q10 ADC not working

Post by Lord Grezington »

Thanks Ben

All seems to be working fine so far...

Lord Grezington
Flowcode V4 User
Posts: 288
Joined: Wed Nov 02, 2011 11:15 pm
Has thanked: 29 times
Been thanked: 30 times
Contact:

Re: PIC18F47Q10 ADC not working

Post by Lord Grezington »

Hi Ben

I think I may have found another issue with the Q10... As soon as I add the EEPROM component onto the panel then try and compile I get the following compiling errors.

Code: Select all

-w=359,1273,1388 -fshort-float -fshort-double -std=c90 -Os 
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC\PIC_CAL_EEPROM.c:212:18: error: (255) not a member of the struct/union ""
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC\PIC_CAL_EEPROM.c:212:21: error: (182) illegal conversion between types
int -> volatile union S708
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC\PIC_CAL_EEPROM.c:227:18: error: (255) not a member of the struct/union ""
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC\PIC_CAL_EEPROM.c:227:21: error: (182) illegal conversion between types
int -> volatile union S708
(908) exit status = 1
Error returned from [xc8.exe]
C:\Program Files (x86)\Flowcode v8\Flowcode Batch Files\XC8 v2.20.bat reported error code 1
Thanks

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: PIC18F47Q10 ADC not working

Post by Benj »

Thanks for letting us know, hopefully should be fixed for you now.

Lord Grezington
Flowcode V4 User
Posts: 288
Joined: Wed Nov 02, 2011 11:15 pm
Has thanked: 29 times
Been thanked: 30 times
Contact:

Re: PIC18F47Q10 ADC not working

Post by Lord Grezington »

Hi Ben

I have another "Qiurk" with the Q10...

I am running on the inteernal 64Mhz oscillator, and one some chips the ADC works fine, but on others I get some random values. I have managed to get around this issue on some of the ADC's by decreasing the conversion speed (to Fosc/64). This stabalises the values far more, but it still does not seems to be accurate (one chip will read the voltage differnetly to another one). Any idea's how I can fix this?

Secondly, on one of the ADC's I have a thermistor. I am having the same problems with the "random values" but as I am using the flowcode component, I can not slow the sample rate down like with a standard ADC. I would prefer to stay with the flowcode component as I like how it converts the ADC voltage to a temperature.

Thanks

seokgi
Posts: 164
Joined: Fri Jan 13, 2012 4:21 am
Location: South KOREA
Has thanked: 18 times
Been thanked: 16 times
Contact:

Re: PIC18F47Q10 ADC not working

Post by seokgi »

Hello?
I connected to RD4 to detect the limit switch. On/off is good in hardware. However, it does not work well with FC8. I will upload the program, so please check it. And the active high/low at the digital input output does not work clearly,
Thank you.
Attachments
Shoes_Case.fcfx
(21.35 KiB) Downloaded 176 times

Lord Grezington
Flowcode V4 User
Posts: 288
Joined: Wed Nov 02, 2011 11:15 pm
Has thanked: 29 times
Been thanked: 30 times
Contact:

Re: PIC18F47Q10 ADC not working

Post by Lord Grezington »

Morning Ben

Is it possible you can look into my previous post with the ADC's and the thermistors? It is not a noise issue as all the ADC inputs (including thermistors) have a 0.1uF cap to GND near the ADC pins.

Thanks

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: PIC18F47Q10 ADC not working

Post by Benj »

Hello,

Thanks for the poke, I have updated the thermistor component with the ADC conversion speed and precharge delay so hopefully that should allow you to proceed. Let me know if you have more issues with the Q10 devices, there could be something extra we are currently not understanding in terms of the ADC peripherals.

seokgi
Posts: 164
Joined: Fri Jan 13, 2012 4:21 am
Location: South KOREA
Has thanked: 18 times
Been thanked: 16 times
Contact:

Re: PIC18F47Q10 ADC작동 중

Post by seokgi »

I have tried various things. But ADC doesn't work.

seokgi
Posts: 164
Joined: Fri Jan 13, 2012 4:21 am
Location: South KOREA
Has thanked: 18 times
Been thanked: 16 times
Contact:

Re: PIC18F47Q10 ADC not working

Post by seokgi »

I want to use the touchpad. But it doesn't work. It works well with programs created by others (MPLab X IDE).
However, it does not work in FC8, and only 0 is displayed.

Please help me.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: PIC18F47Q10 ADC not working

Post by Benj »

Please can you attach your program so we can see what your doing.

Also are you running the latest version of v8 and with all the latest component updates?

seokgi
Posts: 164
Joined: Fri Jan 13, 2012 4:21 am
Location: South KOREA
Has thanked: 18 times
Been thanked: 16 times
Contact:

Re: PIC18F47Q10 ADC not working

Post by seokgi »

I'm using final version. And update everyday.

Thank you
Attachments
Level.fcfx
(26.43 KiB) Downloaded 127 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: PIC18F47Q10 ADC not working

Post by Benj »

Aha ok adc should work ok but touch isn't currently implemented there should be a warning about this when you compile. I'll see if it's something we can add for you.

seokgi
Posts: 164
Joined: Fri Jan 13, 2012 4:21 am
Location: South KOREA
Has thanked: 18 times
Been thanked: 16 times
Contact:

Re: PIC18F47Q10 ADC

Post by seokgi »

Comfile is not running.

Thank you very much!!
Benj !!

seokgi
Posts: 164
Joined: Fri Jan 13, 2012 4:21 am
Location: South KOREA
Has thanked: 18 times
Been thanked: 16 times
Contact:

Re: PIC18F47Q10 ADC not working

Post by seokgi »

Whenever solve the problem?

seokgi
Posts: 164
Joined: Fri Jan 13, 2012 4:21 am
Location: South KOREA
Has thanked: 18 times
Been thanked: 16 times
Contact:

Re: PIC18F47Q10 ADC not working

Post by seokgi »

You may be very busy, but I hope you will solve my problem.
Thank you.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: PIC18F47Q10 ADC not working

Post by Benj »

Hello,

Very sorry for the delay, it should be there for you now for the Q10 devices.

Post Reply