Please help!!!

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
iman05
Posts: 7
Joined: Mon Feb 14, 2011 5:41 pm
Has thanked: 1 time

Please help!!!

Post by iman05 »

Heey everyone,

I'm making a project, but flowcode V4 and Eblocks are giving me a really hard time. I made this programme and when i debugg it on flowcode v4 it works but when i send it to eblocks ( using microcontroller 16f887A ) it does nothing, the switches doesnt react and the lcd is blank. I checked my programme over and over again i just can't find whats wrong with it, i really really hope someone here can help me cause im kinda running out of time. i used eblocks programmer + eblocks lcd + eblocks switches, i put +5v on the lcd and switches, i set the clock on Cristal but it still doesnt work, it only works when i debugg it.
Attachments
GIPPPPPPPPPP.fcf
(12.5 KiB) Downloaded 278 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

Re: PLEASE HELP!!!

Post by medelec35 »

I would say the 1st thing to do is create a 1Hz flasher to check hardware and configuration settings.
Have LED connected to port A1 for example
Loop{
port A1 = 1
delay 500ms
port A1 = 0
delay 500ms
}
Also make sure switch (S12) on the programmer is set for XTAL and not RC
If LED is flashing at correct rate then adjust you flowchart so you get a message appear on LCD e.g displays Waiting.. when power is first applied to hardware, then display can change after switch has been pressed.
Try both these steps, then can take it further if still no joy.
Martin

iman05
Posts: 7
Joined: Mon Feb 14, 2011 5:41 pm
Has thanked: 1 time

Re: PLEASE HELP!!!

Post by iman05 »

I tried what you said, the lad flashed correct and i made a string that said "hello" to lcd when i press switch 5, and it showed hello on lcd, so there must be something wrong with my programme but i cant find it
medelec35 wrote:I would say the 1st thing to do is create a 1Hz flasher to check hardware and configuration settings.
Have LED connected to port A1 for example
Loop{
port A1 = 1
delay 500ms
port A1 = 0
delay 500ms
}
Also make sure switch (S12) on the programmer is set for XTAL and not RC
If LED is flashing at correct rate then adjust you flowchart so you get a message appear on LCD e.g displays Waiting.. when power is first applied to hardware, then display can change after switch has been pressed.
Try both these steps, then can take it further if still no joy.

User avatar
DavidA
Matrix Staff
Posts: 1076
Joined: Fri Apr 23, 2010 2:18 pm
Location: Matrix Multimedia Ltd
Has thanked: 58 times
Been thanked: 258 times
Contact:

Re: PLEASE HELP!!!

Post by DavidA »

Initialise the variables

Laser1, Laser2 and Laser3

The simulation will assume them to start at zero, in hardware this may not be the case, if you use a variable before you populate it always initialise it.

Change your first calculation block from:

Time1 = 0
Time2 = 0

To:

Time1 = 0
Time2 = 0
Laser1 = 0
Laser2 = 0
Laser3 = 0

Should work now.

Oh and no more all caps titles please.

iman05
Posts: 7
Joined: Mon Feb 14, 2011 5:41 pm
Has thanked: 1 time

Re: PLEASE HELP!!!

Post by iman05 »

DavidA wrote:Initialise the variables

Laser1, Laser2 and Laser3

The simulation will assume them to start at zero, in hardware this may not be the case, if you use a variable before you populate it always initialise it.

Change your first calculation block from:

Time1 = 0
Time2 = 0

To:

Time1 = 0
Time2 = 0
Laser1 = 0
Laser2 = 0
Laser3 = 0

Should work now.
omg, thankss man it did really work, jeez didn't that such a small stupid mistake can ruin the whole programm, do you know if i have a decimal 1.4589 for example how i can show that on LCD ?

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: Please help!!!

Post by Benj »

Hello,

To display floating point variables such as 1.4589 on a LCD you fist need to use the FloatToString conversion function available from the string manipulation icon "functions" button to convert the variable into a string. Once you have converted the value to a string you can output the string to the LCD as normal.

Post Reply