RS232 Pins & Console

A forums to allow bugs and problems with Flowcode v6 to be reported and resolved.

Moderator: Benj

Post Reply
User avatar
Bachman
Posts: 116
Joined: Sun Sep 07, 2014 11:37 am
Location: Hungary
Has thanked: 9 times
Been thanked: 53 times
Contact:

RS232 Pins & Console

Post by Bachman »

Hello!

Flowcode show wrong pins, but the HW uses the correct ones.
RS232_Pins.jpg
RS232_Pins.jpg (95.8 KiB) Viewed 6270 times
Sending 0 (zero) via RS232, the information not shown in the console.
RS232_2.jpg
RS232_2.jpg (63.25 KiB) Viewed 6264 times

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: RS232 Pins & Console

Post by dazz »

Hi Bachman
Ive attached an fcdx for that chip, rename the one in your fcd folder and paste the attached one in, i cant test it as i don't have that chip on hand.
Can you then post back here if it's ok

Regards
Dazz


PLEASE FIND NEW ATTACHMENT FURTHER DOWN
Attachments
18F1320.fcdx
(21.38 KiB) Downloaded 245 times
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

User avatar
Bachman
Posts: 116
Joined: Sun Sep 07, 2014 11:37 am
Location: Hungary
Has thanked: 9 times
Been thanked: 53 times
Contact:

Re: RS232 Pins & Console

Post by Bachman »

Thank you!
The properties window is ok, only the chip name is too long. The console problem must be in the Flowcode, i think.
Shot_178.jpg
Shot_178.jpg (74.74 KiB) Viewed 6245 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: RS232 Pins & Console

Post by medelec35 »

Hi Bachman,
Bachman wrote:Sending 0 (zero) via RS232, the information not shown in the console.
When you use SendChar you need to look on the ASCII Table for the char being sent e.g 1 then look at the Dec number and send that value.
In the case of 1 you need to

Code: Select all

SendChar(49)
If you want to send 0 then you use

Code: Select all

SendChar(48)
:
SendChar1.png
(36.1 KiB) Downloaded 3295 times
An easier way to send a number is to send it as a string e.g SendString "0"
If you want to send a variable value e.g if VariableValue = 128
Then you could create a string then convert variable to a string then send the string:
SendChar2.png
(31.81 KiB) Downloaded 3295 times
Martin
Martin

User avatar
Bachman
Posts: 116
Joined: Sun Sep 07, 2014 11:37 am
Location: Hungary
Has thanked: 9 times
Been thanked: 53 times
Contact:

Re: RS232 Pins & Console

Post by Bachman »

Yes, it's a solution for the bug. If i convert the numbers into ASCII, i need extra steps on the RX side to convert it back to numbers. Sending zero via UART works fine in the HW, the bug "visible" only in the simulation.

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: RS232 Pins & Console

Post by dazz »

HI Bachman
Sorry about the name i used it for checking and forgot to remove the extra numbers (doh).
I have corrected and reattached to this post


Regards
Dazz


18F1320.fcdx
(21.38 KiB) Downloaded 276 times
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: RS232 Pins & Console

Post by medelec35 »

Bachman wrote:Yes, it's a solution for the bug. If i convert the numbers into ASCII, i need extra steps on the RX side to convert it back to numbers. Sending zero via UART works fine in the HW, the bug "visible" only in the simulation.
You don't need the extra steps to just send a 0.
Either sendChar(48)
or

SendString"0"

If you use SendChar(0) then that's a null character, not a 0.
So its just the termination of the string

The extra steps are only If sending a byte variable.
Martin

User avatar
Bachman
Posts: 116
Joined: Sun Sep 07, 2014 11:37 am
Location: Hungary
Has thanked: 9 times
Been thanked: 53 times
Contact:

Re: RS232 Pins & Console

Post by Bachman »

The extra steps are only If sending a byte variable.
This is why i send 0, not "0".

Post Reply