Have a question abou Analog

Forum for problems or queries regarding Flowcode Comms Components. Eg LIN, I2C, SPI, RS232, CAN, IrDA etc

Moderators: Benj, Mods

Post Reply
gizquier2
Posts: 11
Joined: Wed Mar 11, 2009 10:28 am
Contact:

Have a question abou Analog

Post by gizquier2 »

hello. Im using Flowcode last version with MIAC and Im trying to show the analog valor of I1 using a potenciometre in the Display but it goes crazy when i send to the MIAC (in flowcode execute internal works fine :()

The program must do when is >180 and relays goes on/off (just for test and see)

I attach the file to see-

Waiting your help

Greetings

gizq

PD: Im new.
Attachments
Gilberto2.fcf
fcf
(6 KiB) Downloaded 275 times
Last edited by gizquier2 on Wed Mar 11, 2009 12:18 pm, edited 1 time in total.

gizquier2
Posts: 11
Joined: Wed Mar 11, 2009 10:28 am
Contact:

Re: Have a question abou Analog

Post by gizquier2 »

Ill try to explain better, i just want to connect a potenciometre in I1 (MIAC) and in display show the change of values when i change the potenciometre value.

And it doesnt work to me, i dont know how to do it

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: Have a question abou Analog

Post by Benj »

Hello

How are you connecting your pot. Essentially you want 1 side of the pot to be connected to the +v the other side should be connected to ground and the middle adjustable pin of the pot should be connected to the input terminal.

To make your program run a little better you may want to add a delay of say around 10-20ms to the main loop. This will stop the LCD from visibly flickering.

gizquier2
Posts: 11
Joined: Wed Mar 11, 2009 10:28 am
Contact:

Re: Have a question abou Analog

Post by gizquier2 »

Yes i have connected right the pot, and i added a delay but doesnt work too, could you check the program attached if its ok?

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: Have a question abou Analog

Post by Benj »

Hello

I have had a quick look at your program and it looks ok. I have attached a slightly improved version.

What value are you getting on the LCD of the MIAC when it is running?
Attachments
Gilberto2.fcf
(6 KiB) Downloaded 268 times

gizquier2
Posts: 11
Joined: Wed Mar 11, 2009 10:28 am
Contact:

Re: Have a question abou Analog

Post by gizquier2 »

Its continuously changing 8working- not working) and it show 4 and 192 nothing else.

gizquier2
Posts: 11
Joined: Wed Mar 11, 2009 10:28 am
Contact:

Re: Have a question abou Analog

Post by gizquier2 »

Solved, we had problems with C compilation, now it works, thank u for all benj

Post Reply