16F18877(AD) chip is faulty!

Any bugs you encounter with Flowcode should be discussed here.
Post Reply
niedian
Posts: 85
http://meble-kuchenne.info.pl
Joined: Thu Jan 07, 2021 11:28 am
Has thanked: 3 times
Been thanked: 4 times

Flowcode v10 16F18877(AD) chip is faulty!

Post by niedian »

16F18877(AD) in practice, or in proteus,They don't work properly.itdoes not work properly after compilation in V8,V9,V10 Version .
16F18877.fcfx
(10.63 KiB) Downloaded 65 times

User avatar
p.erasmus
Posts: 434
Joined: Thu Dec 03, 2020 12:01 pm
Location: Russia / Россия
Has thanked: 104 times
Been thanked: 88 times

Re: 16F18877(AD) chip is faulty!

Post by p.erasmus »

Hi,
Try to use the help file(wiki) when using components for the AD component you need to enable the ADC on the chip before using it see screen print below
P2.JPG
P2.JPG (49.79 KiB) Viewed 1628 times
P1.JPG
P1.JPG (73.12 KiB) Viewed 1628 times
Try it and let us know how you get along
Regards Peter - QME Electronics

niedian
Posts: 85
Joined: Thu Jan 07, 2021 11:28 am
Has thanked: 3 times
Been thanked: 4 times

Re: 16F18877(AD) chip is faulty!

Post by niedian »

solved!

BenR
Matrix Staff
Posts: 1746
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 444 times
Been thanked: 604 times

Re: 16F18877(AD) chip is faulty!

Post by BenR »

Hello,
you need to enable the ADC on the chip before using it
This shouldn't be the case. The Raw enable should already be being called as part of the GetByte routine.

This the code for the GetByte function.
GetByte.jpg
GetByte.jpg (10.55 KiB) Viewed 1571 times
And the RawEnable for comparison.
RawEnable.jpg
RawEnable.jpg (6.08 KiB) Viewed 1571 times
Niedian, you say solved can you say what did you do to solve the issue? Was it as Peter described?

User avatar
p.erasmus
Posts: 434
Joined: Thu Dec 03, 2020 12:01 pm
Location: Russia / Россия
Has thanked: 104 times
Been thanked: 88 times

Re: 16F18877(AD) chip is faulty!

Post by p.erasmus »

Hi Ben,

I had now two simple projects that the ADC did not work without calling the RAW enable Macro might be good Idea to check this
Regards Peter - QME Electronics

BenR
Matrix Staff
Posts: 1746
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 444 times
Been thanked: 604 times

Re: 16F18877(AD) chip is faulty!

Post by BenR »

Thanks Peter,

Can you check your C code matches the code shown above.

User avatar
p.erasmus
Posts: 434
Joined: Thu Dec 03, 2020 12:01 pm
Location: Russia / Россия
Has thanked: 104 times
Been thanked: 88 times

Re: 16F18877(AD) chip is faulty!

Post by p.erasmus »

Hi Ben
OK I will check when I am back at the lab
Regards Peter - QME Electronics

User avatar
p.erasmus
Posts: 434
Joined: Thu Dec 03, 2020 12:01 pm
Location: Russia / Россия
Has thanked: 104 times
Been thanked: 88 times

Re: 16F18877(AD) chip is faulty!

Post by p.erasmus »

Hi Ben,

Ok I see with the getbyte the ADC gets enabled however in my code I use RawSampleInt and AverageSamples and in the C code functions the ADC is not enabled and I asumed it was the case for getByte as well Sorry I mislead the person with my comments however I was sure I had to use RawEnable
my appoligise

would be interesting if he tell us how hesolved the issue.

P1.JPG
P1.JPG (29.55 KiB) Viewed 1561 times

P2.JPG
P2.JPG (114.96 KiB) Viewed 1561 times
Regards Peter - QME Electronics

BenR
Matrix Staff
Posts: 1746
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 444 times
Been thanked: 604 times

Re: 16F18877(AD) chip is faulty!

Post by BenR »

Hello Peter,

Aha yes for the RawSample you need to enable first :) ok that explains things and glad to know it's not a problem.

Interested as to how Niedian solved their issue.

niedian
Posts: 85
Joined: Thu Jan 07, 2021 11:28 am
Has thanked: 3 times
Been thanked: 4 times

Re: 16F18877(AD) chip is faulty!

Post by niedian »

The same old problem. unsolved

Post Reply