Page 1 of 1

Do not know what I'm doing wrong.

Posted: Sun Mar 03, 2013 4:53 pm
by foppa
Do not know what I'm doing wrong.
probably a piece of cake but I do not see the error.
When I press the button, the LED will light up and it does in the simulation of flow code.
but in reality it is the opposite, the LED goes off when I press the button
've had to work but can not remember how.

John :oops:
attach screenshot

Re: Do not know what I'm doing wrong.

Posted: Sun Mar 03, 2013 5:27 pm
by medelec35
Hi John,
On your control panel, right click on the LED and select External properties.
Check that Polarity is set to Active High and not Active Low.

Also on your hardware.
With LED:
Connect o/p of microcontroller to the current limiting resistor e.g 470 Ohms or whatever value you wish to use.
Connect other end of resistor to anode of LED.
Connect cathode of LED to 0V

With the switch:
Connect the switch between +5V and i/p pin.
Connect a pull-down resistor (E.g 4k7 to 10K) between i/p pin and 0V

What is your osc speed?
Any speed greater than 4MHz, its best to run with HS for osc selection rather than XT.
This is not what is casing the issue you posted about.

Martin

Re: Do not know what I'm doing wrong.

Posted: Sun Mar 03, 2013 9:23 pm
by medelec35
If your still stuck can you post a flowchart and a circuit diagram of your hardware please.

Martin

Re: Do not know what I'm doing wrong.

Posted: Sun Mar 03, 2013 9:51 pm
by foppa
Realizing that it was badly connected on the pull-down resistors
after I read what you wrote.
Was linked 10K between I/O pin and 5V :oops:
But now I have connected it to the I/O pin and 0V
So now it works as it should.
Should build on my project.
Thanks for your help

John :D

Re: Do not know what I'm doing wrong.

Posted: Sun Mar 03, 2013 9:58 pm
by medelec35
Your welcome,
Glad it's now working for you.

Thanks for letting us know.

Martin

Re: Do not know what I'm doing wrong.

Posted: Sun Mar 03, 2013 11:05 pm
by foppa
medelec35
Can you look at my file and tell me why output
AO, A1 AND A2 will not go to high.
this led is use 5v.
because it is not necessary to use resistor for them
john

Re: Do not know what I'm doing wrong.

Posted: Sun Mar 03, 2013 11:21 pm
by medelec35
Hi John,
What version of Flowcode V5 are you using?

Professional, Student/Home or free?

Martin

Re: Do not know what I'm doing wrong.

Posted: Sun Mar 03, 2013 11:53 pm
by dazz
Hi foppa
Can you please sign up to the forum relevant to your flowcode version the link is in my sig, it allows others to help quicker as they can quickly see what version you are using, then you will be able toi post in the v5 forums which will get you a quicker responce

Regards
Dazz

Re: Do not know what I'm doing wrong.

Posted: Mon Mar 04, 2013 7:33 pm
by foppa
:D
professional
dazz I vill sign up