How to get to work 2 loops at the same time?
-
- Posts: 79
- Joined: Mon Aug 03, 2009 12:14 pm
How to get to work 2 loops at the same time?
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?
- Attachments
-
- Flowcode3swithes7seg-1.fcf
- (7 KiB) Downloaded 365 times
Respectfully, Alexander
- 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: How to get to work 2 loops at the same time?
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 79
- Joined: Mon Aug 03, 2009 12:14 pm
Re: How to get to work 2 loops at the same time?
Thank you, I will study these examples.
Respectfully, Alexander
- 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: How to get to work 2 loops at the same time?
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 79
- Joined: Mon Aug 03, 2009 12:14 pm
Re: How to get to work 2 loops at the same time?
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.
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.
- Attachments
-
- TUT_20.FCF
- (9 KiB) Downloaded 325 times
-
- TUT_19.FCF
- (5.5 KiB) Downloaded 325 times
Respectfully, Alexander
- 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: How to get to work 2 loops at the same time?
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
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
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 79
- Joined: Mon Aug 03, 2009 12:14 pm
Re: How to get to work 2 loops at the same time?
What does mean call macros UPDATE_VALUES in the flowchart (TUT20)? In meny Window there is no such macros.
Respectfully, Alexander
- 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: How to get to work 2 loops at the same time?
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 79
- Joined: Mon Aug 03, 2009 12:14 pm
Re: How to get to work 2 loops at the same time?
Thank you, now this is clear.
Respectfully, Alexander
-
- Posts: 79
- Joined: Mon Aug 03, 2009 12:14 pm
Re: How to get to work 2 loops at the same time?
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)?
Respectfully, Alexander
- 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: How to get to work 2 loops at the same time?
Hello Alexander
Please see this article for instructions on creating your own LCD characters.
http://www.matrixmultimedia.com/mmforum ... =26&t=4796
Please see this article for instructions on creating your own LCD characters.
http://www.matrixmultimedia.com/mmforum ... =26&t=4796
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 79
- Joined: Mon Aug 03, 2009 12:14 pm
Re: How to get to work 2 loops at the same time?
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?
Respectfully, Alexander
- 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: How to get to work 2 loops at the same time?
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 79
- Joined: Mon Aug 03, 2009 12:14 pm
Re: How to get to work 2 loops at the same time?
Thank you, give please an exact link to EB005 datasheet
Respectfully, Alexander
-
- Posts: 79
- Joined: Mon Aug 03, 2009 12:14 pm
Re: How to get to work 2 loops at the same time?
Thank you, I found: http://www.matrixmultimedia.com/datashe ... 5-30-3.pdf
Respectfully, Alexander