Page 1 of 1
How to get to work 2 loops at the same time?
Posted: Tue Oct 13, 2009 6:54 am
by alexander70
Hello! For example, in my algorithm (attached) must operate 2 loops at the same time, the first loop is used for display at the 4-digit 7-segment LED, and the second loop - primary, perform pulse counting of the button. How to make the work simultaneously 2 (or more) loops?
Re: How to get to work 2 loops at the same time?
Posted: Tue Oct 13, 2009 8:31 am
by Benj
Hello Alexander
Timer interrupts are a good start, there should be a workable example in the examples section for V3.
Alternativley make one master loop and use a counter and a decision to decide which part of the loop to process.
Re: How to get to work 2 loops at the same time?
Posted: Tue Oct 13, 2009 12:27 pm
by alexander70
Thank you, I will study these examples.
Re: How to get to work 2 loops at the same time?
Posted: Tue Oct 13, 2009 12:59 pm
by Benj
Hello Alex
The 7 seg examples should help a lot. If your using version 3 then the standard examples can be found in your Flowcode v3/Examples folder.
Re: How to get to work 2 loops at the same time?
Posted: Thu Oct 15, 2009 6:57 am
by alexander70
Hi! In the example TUT20 (attached) indicates that there 4 macro:
INTERRUPT_PORTB
INTERRUPT_RB0INT
INTERRUPT_TMR0
UPDATE_VALUES
The algorithm is called macros UPDATE_VALUES, but this macro is not visible. There is only a macros INTERRUPT_TMR0. Where are the other macros?
And I want to ask about the example TUT19. How it should work? When I started simulation, there is lit digit 0.
Re: How to get to work 2 loops at the same time?
Posted: Thu Oct 15, 2009 8:26 am
by Benj
Hello
if you click on the macro menu and then show then you will get a list of the macros already included in the program.
TUT19 uses a timer interrupt, this does not simulate overly well but will run great on the hardware. Here is an article explaining the timer function a bit clearer.
http://www.matrixmultimedia.com/mmforum ... =26&t=6390
Re: How to get to work 2 loops at the same time?
Posted: Thu Oct 15, 2009 8:34 am
by alexander70
What does mean call macros UPDATE_VALUES in the flowchart (TUT20)? In meny Window there is no such macros.

- TUT20.jpg (12.62 KiB) Viewed 8919 times
Re: How to get to work 2 loops at the same time?
Posted: Thu Oct 15, 2009 11:33 am
by Benj
Hello Alexander
Click on the Macro Menu and select Show.
In the window that pops up select the UPDATE_VALUES item and click show.
Alternatively you can select the macro icon in the flowchart, double click it to reveal its properties and then click ok and edit to open up the macro window.
Re: How to get to work 2 loops at the same time?
Posted: Thu Oct 15, 2009 11:41 am
by alexander70
Thank you, now this is clear.
Re: How to get to work 2 loops at the same time?
Posted: Thu Oct 15, 2009 1:12 pm
by alexander70
Hi! I have a question about Example 21 "Printing a message to an LCD". If I have russified indicator, How to print to LCD non Latin characters (Cyrillic)?
Re: How to get to work 2 loops at the same time?
Posted: Thu Oct 15, 2009 3:42 pm
by Benj
Hello Alexander
Please see this article for instructions on creating your own LCD characters.
http://www.matrixmultimedia.com/mmforum ... =26&t=4796
Re: How to get to work 2 loops at the same time?
Posted: Tue Oct 20, 2009 6:48 am
by alexander70
Hi! I want to ask about the example TUT21. In the real indicator PC1602 present PINS R/W, DB4, DB5, DB6, DB7 (
http://www.winstar.com.tw/products_deta ... u&ProID=26 ) , which in the example are not connected. What level should apply for these PINS?
Re: How to get to work 2 loops at the same time?
Posted: Tue Oct 20, 2009 11:45 am
by Benj
Hello
The LCD is connected by connecting the Data lines to the high nbble of the LCD. Eg so D0 connects to Data 4 on the LCD etc.
The R/W pin on the LCD is connected to ground and the D0 - D3 pins are simply not connected.
For a bullet proof wiring guide please refer to our EB005 datasheet which includes a full board schematic.
Re: How to get to work 2 loops at the same time?
Posted: Tue Oct 20, 2009 12:08 pm
by alexander70
Thank you, give please an exact link to EB005 datasheet
Re: How to get to work 2 loops at the same time?
Posted: Tue Oct 20, 2009 12:15 pm
by alexander70