I2C Queue

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
graemec
Posts: 11
Joined: Thu Dec 24, 2009 10:26 pm

I2C Queue

Post by graemec »

Hi,
In the I2C component there is a queue box and in the help file it says "The simulation also has a queue for data that has been received so that users can simulate incoming I²C data."
Sorry, I'm probably a bit thick but I just can't figure out how this works and can't find any info in the forum posts.
Can anyone help?
Thanks
Graeme

Sean
Valued Contributor
Valued Contributor
Posts: 548
Joined: Tue Jun 26, 2007 11:23 am
Has thanked: 6 times
Been thanked: 44 times

Re: I2C Queue

Post by Sean »

Hello,

When the program is being run in simulation, clicking on the '+' button causes a text box to appear allowing a sequence of comma separated data values to be added to the queue. When the OK button is pressed, the data values appear in the queue section of the component.

These values will be read sequentially by the component each time an I2C receive byte macro is executed (the values will be transfered into the Data section of the component as they are read). This allows either individual bytes or complete data sequences to be entered during program simulation.

graemec
Posts: 11
Joined: Thu Dec 24, 2009 10:26 pm

Re: I2C Queue

Post by graemec »

Sean,
Thanks
G

graemec
Posts: 11
Joined: Thu Dec 24, 2009 10:26 pm

Re: I2C Queue

Post by graemec »

Hi,
The I2C queue feature doesn't appear to be working on my installation. With the simulation running I press the + button but no text box appears. Nothing happens at all.
I've repaired and uninstalled and reinstalled a number of times but still no text box. Any ideas....?
I'm running xp sp3. Flowcode Installation is ver 4.3. Have tried 4.2 with same result.
Thanks
Graeme

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: I2C Queue

Post by Benj »

Hello Graeme,

Please can you try adding an RS232 component to your program, start the simulation and then try clicking the + on the RS232 component.

Does the text box appear corrrectly for this on your machine?

graemec
Posts: 11
Joined: Thu Dec 24, 2009 10:26 pm

Re: I2C Queue

Post by graemec »

Hi Ben,
I added the rs232 component and still no text box from the + button. I tried clicking the + button randomly at different points in the simulation and every now and then the text box does appear. No discernable pattern to it appearing or not. However, after playing around I found that if I quickly press the + button as soon as I start the simulation the box consistently appears. If I wait just a few seconds longer the box does not appear. Strange....
Does that give you any clues?
Graeme

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: I2C Queue

Post by Benj »

Hi Graeme,

Please can you send me your flowcode file either via an attachment here on the forums or via a PM if you do not want your code to be made public. You could also try creating a blank program with a I2C component and a while 1 loop and see if this is any better. If this does not get any better then please can you try adding a 10ms delay to the while 1 loop to see if that changes anything.

We have done some testing here on a XP machine and so far we have been unable to replicate your problem.

graemec
Posts: 11
Joined: Thu Dec 24, 2009 10:26 pm

Re: I2C Queue

Post by graemec »

Hi Ben,
Thanks for looking. I figured out a work around by slowing down the simulation. I was running the simulation in "as fast as possible" and by slowing to 1000 I can get the text box up. I have to click the + button somewhere between 1 and 4 times but it does at least appear. The problem apprears to related to flowcode just being too busy to see the keypress. I've got a deadline to meet with this program and don't want to get bogged down with this issue so if you don't mind I'll send you the program to test when it's completed next week.
Thanks
Graeme

Post Reply