rs232 recieve and send

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

Moderators: Benj, Mods

Post Reply
jernelsa
Posts: 4
Joined: Sun Jul 03, 2011 12:58 pm
Contact:

rs232 recieve and send

Post by jernelsa »

Hi to all Im new in flowcode rs232

I know now how to send data in rs232 using flowcode, but heres the problem I dont know how to recieve a data

for example: (im using pic16f877a and vb6)

i have command button in vb6 and heres the code

Code: Select all

MSComm1.Output = "1"
w/c means I will send data in the MCU w/c the data to be receive by the MCU is 1.

I dont know how to start recieving data, or start coding I guess Im using flowcode V3

I attached my code in recieving data and I dont know If that is correct, hope you get my point

thanks in advance
Attachments
Flowcode2.fcf
(4.5 KiB) Downloaded 709 times

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: rs232 recieve and send

Post by DavidA »

Hello!

The program associated with this article has an example of two chips communicating via RS232: http://www.matrixmultimedia.com/article.php?a=366

The program is a V4 program, but you can download the free version of V4 and load it up to have a look, you will not be able to send to chip however.

Free version of Flowcode V4 can be download from here: http://www.matrixmultimedia.com/lc_index.php?p=22

Additionally there are V4 examples of RS232 send and receive in the components download on this page: http://www.matrixmultimedia.com/lc_index.php?p=18

jernelsa
Posts: 4
Joined: Sun Jul 03, 2011 12:58 pm
Contact:

Re: rs232 recieve and send

Post by jernelsa »

Ok I already tried flowcode v4 but still Im having problems sending char is solved but still recieving char is the problem

http://sodoityourself.com/max232-serial ... converter/

thats my connection max232 and pic16f877a. btw in sending data im using hyperterminal and vb6 and sending data is fine if the character send is "1" the output in the hyperterminal is "1"

in receiving data heres my code in vb6

Code: Select all

Private Sub Command1_Click()
MSComm1.Output = "1"
End Sub

Private Sub Command2_Click()
MSComm1.Output = "0"
End Sub

Private Sub Form_Load()
With MSComm1
    .CommPort = 1
    .Settings = "9600,n,8,1"
    .RThreshold = 1
    .InputLen = 0
    .PortOpen = True
End With
End Sub
when I try to press command button 1 w/c is "1" nothing happens.

now heres the scenario if the receiving character or data is "1" or 49 in bytes in flowcode the led in port A will be high at port 0 and then if the receiving character or data is "0" or 48 in bytes in flowcode the led in port A will be low port 0, nothing happens I dont know what is the problem im new in flowcode rs232 receiving and sending characters data

Image

Uploaded with ImageShack.us

hope you can help me on this thanks by the way DavidA I already see the examples. but still problem is receiving characters
Attachments
Flowcode1.fcf
(9 KiB) Downloaded 669 times

Post Reply