SOME DOUBTS ABOUT KIND OF TASKINGS

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
kilopondio
Posts: 11
Joined: Tue Feb 13, 2007 10:06 pm
Contact:

SOME DOUBTS ABOUT KIND OF TASKINGS

Post by kilopondio »

Hi everyone!.

I`m newie on this forum and I was studying with flowcode when I downloaded it yesterday.

I noticed that there are some task that I couldn`t do becasue I didn`t find the way to do it.

For example ,as follows:

a) If I want to make some RS232 by software to be able to read data from a TTL asynchronous serial device...how does flowcode this task?.

b) If I need to make some state machine ( made of "select case" or in C" switch" ...how does the flowcode do this task?.

c) I I need to make some array containing 11 elements to read and store data from outside the MCU ...how does the flowcode do this task?.


Thanks a lot for your help!


Greetings!



Kilopondio.

User avatar
Steve
Matrix Staff
Posts: 3422
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: SOME DOUBTS ABOUT KIND OF TASKINGS

Post by Steve »

kilopondio wrote:a) If I want to make some RS232 by software to be able to read data from a TTL asynchronous serial device...how does flowcode this task?.
Use the Flowcode RS232 component to poll the internal USART.
kilopondio wrote:b) If I need to make some state machine ( made of "select case" or in C" switch" ...how does the flowcode do this task?.
I toyed with adding some kind of "switch-like" icon when I made version 3 of Flowcode, but it got shelved until v4. It is still on the list as it would make certain tasks much easier to code. If you wanted to do this now, you would need to nest "decision" icons.
kilopondio wrote:c) I I need to make some array containing 11 elements to read and store data from outside the MCU ...how does the flowcode do this task?.
To create an array variable, put the array value in square brackets after its name when you define it. For example, MyArray[10] will create an array with 10 items (0 to 9).

kilopondio
Posts: 11
Joined: Tue Feb 13, 2007 10:06 pm
Contact:

Re: SOME DOUBTS ABOUT KIND OF TASKINGS

Post by kilopondio »

Dear Steve:

Thank you for your reliable explanation.

I mean I need some RS232 by software to read data form a TTL asynchronous serial device connected to one pin of my MCU.How do you do this task?.I noticed there is some RS232 icon but it`s is for USART using.

According question number 2 you mentioned about creating the array but this is the part I know.What I don`t know is what flowchart icon have I got to use to insert the declared array.

According to the machine state I can make it as you mentioned but I relize that it would be a heavy task.


Are there some samples about the explanation you gave me where I can get from?.

Thank you so much .


Kilo.

steve wrote:
kilopondio wrote:a) If I want to make some RS232 by software to be able to read data from a TTL asynchronous serial device...how does flowcode this task?.
Use the Flowcode RS232 component to poll the internal USART.
kilopondio wrote:b) If I need to make some state machine ( made of "select case" or in C" switch" ...how does the flowcode do this task?.
I toyed with adding some kind of "switch-like" icon when I made version 3 of Flowcode, but it got shelved until v4. It is still on the list as it would make certain tasks much easier to code. If you wanted to do this now, you would need to nest "decision" icons.
kilopondio wrote:c) I I need to make some array containing 11 elements to read and store data from outside the MCU ...how does the flowcode do this task?.
To create an array variable, put the array value in square brackets after its name when you define it. For example, MyArray[10] will create an array with 10 items (0 to 9).

User avatar
Steve
Matrix Staff
Posts: 3422
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Post by Steve »

If you means software on the PC that can interface to a UART on a PICmicro, see the "Using Visual Basic with E-blocks" article on this page:

http://www.matrixmultimedia.com/Learnin ... /index.php

When you use an array, you do so as if it's a normal variable. For example, if you had variables "MyIdx" and "MyVal", and an array variable "MyArray[10]", you could have code similar to the following:

Code: Select all

(calc) MyIdx = 0
(while) MyIdx < 10
(input) MyVal = PortB
(calc) MyArray[MyIdx] = MyVal
(calc) MyIdx = MyIdx + 1
(delay) 1s
(end while)
This short example program would populate your array with various values that were presented onto port b.

There are other examples in the "examples" directory of Flowcode, and the help file should also be able to offer some help.

Post Reply