Page 1 of 1

Analog Component

Posted: Sun Aug 09, 2009 12:51 am
by Ron
Hi,

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,

Ron

Re: Analog Component

Posted: Mon Aug 10, 2009 8:19 am
by Steve
Pins are configured when the code actually runs.