PIC16F1829 analog 0 don`t works

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

Moderator: Benj

Post Reply
Jörg Güldner
Posts: 77
Joined: Wed Jun 22, 2011 3:32 pm
Has thanked: 17 times
Been thanked: 11 times

PIC16F1829 analog 0 don`t works

Post by Jörg Güldner »

Hello,
I soldered a trimmer to analog 0, read out the value and send it out over rs232.
The voltage on the trimmer is 0 Volts. Setting the U-reference to VDD and VCC, the trimmer voltage is changing by turning.
I thought, that setting up the reference in the trimmer component is OK, but it don`t works. The rs232 sends out only 0x01. The trimmer
at the pic can`t change the value anywhere. 2 other tested analog channels are running well.
Is there a bug in the component?
In simulation it works fine.

Best regards
Jörg


Solution for me: I switch over the adc component to analog 1 for plan b. It works! Then I switch back to analog 0 and it works, too.
Is there a toggle bit error in the component? All other analog channels works advanced.

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: PIC16F1829 analog 0 don`t works

Post by Benj »

Hello Jörg

I'm not aware of a bug but if you find a way to replicate the problem then I will investigate for you.

Jörg Güldner
Posts: 77
Joined: Wed Jun 22, 2011 3:32 pm
Has thanked: 17 times
Been thanked: 11 times

Re: PIC16F1829 analog 0 don`t works

Post by Jörg Güldner »

Hello Benj,
I don`t touch in the moment the adc component, while it`s running. Today I made an update with Flowcode and see,
that the adc component was updated. Do you found something?

Best
regards

Jörg

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

Re: PIC16F1829 analog 0 don`t works

Post by medelec35 »

Hi Jörg,
Just looked at the file.
Looks like the change was only to do with 18F24Q10 & 18F25Q10.
Probably to do with this bug report

I don't know how much its related to 16F1829?
I have got a 16F1824, which uses the same adc registers as 16F1829.
The very odd thing is if I use FRC setting for conversion speed, with An0 or An1 the chip locks up!
ok with all other channels.
This occurs if clock frequency is above 8MHz.
If I change ADC conversion speed to Fosc/64, An0 and An1 work perfectly.
Can to give that a go?
Martin

Jörg Güldner
Posts: 77
Joined: Wed Jun 22, 2011 3:32 pm
Has thanked: 17 times
Been thanked: 11 times

Re: PIC16F1829 analog 0 don`t works

Post by Jörg Güldner »

Hi Martin,
my project is now finished and runs.

To the problem AN0 is not working:
Your comment --> "The very odd thing is if I use FRC setting for conversion speed, with An0 or An1 the chip locks up!"
My cpu speed is 1MHz and frc clock for the adc, where I have the problems. In the datasheet you should use frc or devider by 2 and 4.
The errata sheet has no entry about the adc. I decided to set up the devider to 4 with intern clock. This runs without problems.

I will do my own "read me"-file with tips for this cpu.

Importend: This is no bug by Matrix !!!


Thanks for your help.


Jörg

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

Re: PIC16F1829 analog 0 don`t works

Post by medelec35 »

Glad your project is up and running.
Thank you for keeping us updated.
As this is a bug with silicon and not Flowcode, I have moved topic from the bug section to somewhere more suitable.
Martin

Post Reply