Search found 11 matches

by KeesB
Tue Dec 04, 2012 8:21 pm
Forum: Flowcode V5
Topic: Problem with 10bit ADC on Flowcode 5
Replies: 19
Views: 11378

Re: Problem with 10bit ADC on Flowcode 5

Hello Benj,

The external reference voltage is 5.000V.

I use this reference to accurately measure 6 analog inputs.
One of them, a pressure sensor with a proportional output voltage, was supplied by the reference voltage.
As a fix I have connected this sensor to Vdd, and I now use Vdd as the ...
by KeesB
Wed Nov 21, 2012 11:33 am
Forum: Flowcode V5
Topic: Problem with 10bit ADC on Flowcode 5
Replies: 19
Views: 11378

Re: Problem with 10bit ADC on Flowcode 5

Hello,

I have upgraded to a 18F46K22 at 64MHz, and the same problem has surfaced.
To remedy the problem I have tried to change the clock speed, but at FOSC/64 (recommended in the datasheet) I get the following line(s) in the C-source, and that is correct:

#define ADC_7_MX_ADC_CONVSP 6

Then I ...
by KeesB
Mon Jun 25, 2012 9:10 pm
Forum: Flowcode V5
Topic: Problem with 10bit ADC on Flowcode 5
Replies: 19
Views: 11378

Re: Problem with 10bit ADC on Flowcode 5

Hi electron67,

I have received a PM from howard123 with the attached file which he received from Ben Rowlands.
This file has solved my problem with the external Vref on the 18F4620.

Kees
by KeesB
Mon Jun 25, 2012 6:52 am
Forum: Flowcode V5
Topic: Problem with 10bit ADC on Flowcode 5
Replies: 19
Views: 11378

Re: Problem with 10bit ADC on Flowcode 5

I changed the conversion speed to FOSC/64 without any succes.

Then I changed the VRef option to VDD in stead of VRef+, and that did the trick.
So for the 18F4620 in addition to the conversion speed problem there is also a problem with the Vref option.
I checked the C-sources for the Flowcode4 an ...
by KeesB
Fri Jun 22, 2012 10:36 am
Forum: Flowcode V5
Topic: Problem with 10bit ADC on Flowcode 5
Replies: 19
Views: 11378

Re: Problem with 10bit ADC on Flowcode 5

@ electron67:

I have a large program for the 18F4620 (which migrated in time from the 18F887 via the 18F452 to the 18F4620) that we have used in a testfacility in our company for years. In that program I use 5 ADC-inputs with 10 bit accuracy, and I never had any problems with that.
In Flowcode 3 as ...
by KeesB
Wed Jun 20, 2012 7:28 pm
Forum: Flowcode V5
Topic: Problem with 10bit ADC on Flowcode 5
Replies: 19
Views: 11378

Re: Problem with 10bit ADC on Flowcode 5

Hello,

I have worked out the relation between the property setting and the define:
FRC -> 0
FOSC/2 -> 1
FOSC/4 -> 2
FOSC/8 -> 3
FOSC/16 -> 4
FOSC/32 -> 5
FOSC/64 -> 6

According to all datasheets that I have (16F1825, 18F452 & 18F4620) this should be:
ADCS2:ADCS0:
000 (0) FOSC/2 (select FRC)
001 (1 ...
by KeesB
Wed Jun 20, 2012 9:23 am
Forum: Flowcode V5
Topic: Problem with 10bit ADC on Flowcode 5
Replies: 19
Views: 11378

Re: Problem with 10bit ADC on Flowcode 5

Update:

The setting FOSC/8 does not work on a PIC18F4620 at 40MHz.
Can you advise me a working setting for this chip?
by KeesB
Tue Jun 19, 2012 7:51 pm
Forum: Flowcode V5
Topic: Problem with 10bit ADC on Flowcode 5
Replies: 19
Views: 11378

Re: Problem with 10bit ADC on Flowcode 5

Hello Benj,

My Flowcode5 test program on the 18F452 now works correctly with these settings. That's a relief.
There are a few things that I don't understand however:

Does FOSC/8 on Flowcode5 give me the correct TAD (1.6us minimum) on the 18F452 (or 16F1825) at 32MHz?
Was my setting FRC too fast ...
by KeesB
Sat Jun 16, 2012 10:39 am
Forum: Flowcode V5
Topic: Problem with 10bit ADC on Flowcode 5
Replies: 19
Views: 11378

Re: Problem with 10bit ADC on Flowcode 5

Thanks,

If you would like me to test anything, just let me know.

Kees.
by KeesB
Tue Jun 12, 2012 8:29 pm
Forum: Flowcode V5
Topic: Problem with 10bit ADC on Flowcode 5
Replies: 19
Views: 11378

Re: Problem with 10bit ADC on Flowcode 5

It's even stranger than I thought.

I rewrote my main program to Flowcode 4 because Flowcode 5 can't save in Flowcode 4 format.
When the final circuit with the PIC16F1825 arrived I started testing my program. After struggling for quite a long time to get the ADC to work I followed a hunch.
I rewrote ...
by KeesB
Thu Jun 07, 2012 3:40 pm
Forum: Flowcode V5
Topic: Problem with 10bit ADC on Flowcode 5
Replies: 19
Views: 11378

Problem with 10bit ADC on Flowcode 5

I am designing an application whereby (amongst others) a voltage is sampled with 10 bit accuracy, send over an optically isolated barrier, and transformed back to analog on the other side with a 10bit PWM and an active 3rd order Butterworth low pass filter.
The output voltage is fed back to the PIC ...