Do not know what I'm doing wrong.

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
foppa
Posts: 45
Joined: Sat Dec 20, 2008 1:55 pm
Has thanked: 3 times
Been thanked: 1 time
Contact:

Do not know what I'm doing wrong.

Post 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
Attachments
f2.JPG
(145.96 KiB) Downloaded 676 times

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

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

Post 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
Martin

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

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

Post by medelec35 »

If your still stuck can you post a flowchart and a circuit diagram of your hardware please.

Martin
Martin

foppa
Posts: 45
Joined: Sat Dec 20, 2008 1:55 pm
Has thanked: 3 times
Been thanked: 1 time
Contact:

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

Post 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

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

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

Post by medelec35 »

Your welcome,
Glad it's now working for you.

Thanks for letting us know.

Martin
Martin

foppa
Posts: 45
Joined: Sat Dec 20, 2008 1:55 pm
Has thanked: 3 times
Been thanked: 1 time
Contact:

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

Post 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
Attachments
HEAT ATV.fcf
(15 KiB) Downloaded 216 times

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

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

Post by medelec35 »

Hi John,
What version of Flowcode V5 are you using?

Professional, Student/Home or free?

Martin
Martin

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

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

Post 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
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

foppa
Posts: 45
Joined: Sat Dec 20, 2008 1:55 pm
Has thanked: 3 times
Been thanked: 1 time
Contact:

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

Post by foppa »

:D
professional
dazz I vill sign up

Post Reply