Hello!
Flowcode show wrong pins, but the HW uses the correct ones.
Sending 0 (zero) via RS232, the information not shown in the console.
RS232 Pins & Console
Moderator: Benj
-
- Posts: 1314
- Joined: Sun Jan 15, 2012 3:15 pm
- Has thanked: 474 times
- Been thanked: 458 times
- Contact:
Re: RS232 Pins & Console
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
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
- 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
Thank you!
The properties window is ok, only the chip name is too long. The console problem must be in the Flowcode, i think.
The properties window is ok, only the chip name is too long. The console problem must be in the Flowcode, i think.
-
- 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
Hi Bachman,
In the case of 1 you need to
If you want to send 0 then you use :
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: Martin
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.Bachman wrote:Sending 0 (zero) via RS232, the information not shown in the console.
In the case of 1 you need to
Code: Select all
SendChar(49)
Code: Select all
SendChar(48)
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: Martin
Martin
- 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
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.
-
- Posts: 1314
- Joined: Sun Jan 15, 2012 3:15 pm
- Has thanked: 474 times
- Been thanked: 458 times
- Contact:
Re: RS232 Pins & Console
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
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
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php
-
- 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
You don't need the extra steps to just send a 0.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.
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
- 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
This is why i send 0, not "0".The extra steps are only If sending a byte variable.