Analog Component

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

Moderators: Benj, Mods

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

Analog Component

Post 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

User avatar
Steve
Matrix Staff
Posts: 3418
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: Analog Component

Post by Steve »

Pins are configured when the code actually runs.

Post Reply