Analog Component

Forum for problems or queries regarding other Flowcode Components. Eg LEDs, Switches, LCD, Gfx LCD etc

Moderators: Benj, Mods

Posts: 225
Joined: Wed Apr 11, 2007 6:15 pm
Has thanked: 2 times

Analog Component

Postby Ron » Sun Aug 09, 2009 12:51 am


I have written a program that allows me to use certain pins in different ways based on a parameter setting. I use an RJ12 connector (thanks Jim H.) to connect 4 signal pins, plus 5V & 0V to an add on board. I have made the add on boards in several different configurations. My question is how does Flowcode configure the pins of the pic?

Eaxmaple: 16F887 Pins 2 - 5

These 4 signals will all be the same once I poke value in a register.
4 analog IN (Value poked to VAR1 = 1)
4 Digital IN (value pokes in VAR1 = 2)
4 Digital Out (value poked in VAR1 = 3)

I have all the code necessary for all 3 types in my program. based on the value I poke in the register determines which code gets solved. So when I poke 1 into VAR1 the code for reading and testing inputs or turning ON/OFF outputs is never solved. I poke 2 into VAR1 then Analog read code and turning on/off outputs is never solved, if I poke 3 into VAR1 then read analog in and read/test of digital inputs is never solved.

The question is does flow code set the operational mode of the pins when the program runs? Are the pins configured when the code is actually solved or does Flowcode configure the pins when the program first runs?

Hope I am making sense.....

Thank you,


User avatar
Matrix Staff
Posts: 3088
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 89 times
Been thanked: 391 times

Re: Analog Component

Postby Steve » Mon Aug 10, 2009 8:19 am

Pins are configured when the code actually runs.