multiple adc inputs?

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

Moderators: Benj, Mods

fransky
Posts: 10
Joined: Mon Nov 28, 2005 10:00 am
Contact:

multiple adc inputs?

Postby fransky » Mon Feb 06, 2006 4:49 pm

Hi there,

I have an application in mind requiring me to read in three analogue channels as basis to calculate a response. I am using the PIC16F88 for this. So far, I have been experimenting with the Eblocks programmer, the experimenter board and flowcode prof.
I've managed to read the value of a potentiometer connected to D2 on port A using the tutorial26 flowchart. However, when I start looking for the "thermometer" and associated ADC macros (trying to import them) to try and adapt them to read other ADC's as well I cannot find the macros at all. I did come across a sensor_library.asm that I could include in a C block diagram but that looked like it would only read a value on D3?

My question: Is there a a generic flowcode macro for ADC conversion where you can select the input bit(s) on the picmicro or an easy way to implement something like that?

Would appriciate your suggestions

User avatar
Steve
Matrix Staff
Posts: 3073
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 87 times
Been thanked: 387 times
Contact:

Postby Steve » Thu Feb 09, 2006 10:23 am

Sorry for the late response - I've been away.

I think what you want is the "thermometer" ADC component. You can add 3 of these to your FlowCode program, but you will then need to click the ">" button and select "component connections..." to select the appropriate ADC channel for each component.

Once you have done this, you can use the "call macro" icon to call the thermometer's "SampleADC" and "ReadLow/ReadHigh" macros to initiate ADC conversion.