Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - Sending serial code like \xfe\x01 does not work, why?

(you are viewing a thread; or go back to list of threads)

Sending serial code like \xfe\x01 does not work, why? (by MGP)
I'm testing a serial display (Hobbybotics) and there is something i don't understand.
Sending hexcode like \xfe\x00 does not work, not even in simulationmode, it prints \xfe

When i'm sending hex code from the pc everything works.

Using a UART variable then it works!

I wonder if this is a bug? look at de code below for more information.

thx
Wed Sep 4 2013, 11:00:56, download attachment serial_test.ld
(no subject) (by Boris)
check this thread:

16x2 Serial LCD Line & Positions
Wed Sep 4 2013, 17:39:42
(no subject) (by MGP)
Hello Boris

Thx for the reply, but I have tryd almost everything and the only method is to use " UART send instruction".
This works fine.

So I think that there is something wrong with sending HEX code through "formatted string over UART instruction".

I'm trying to still solve the problem

regards
Fri Sep 6 2013, 10:21:56
(no subject) (by MGP)
hello

It's definitely a bug in ldmicro and i wonder if someone can make it work.
See my example attached.
Fri Sep 6 2013, 11:45:04, download attachment serial_test2.ld
(no subject) (by Boris)
It is not a bug. Which LCD You are using I think that Jonathan made program for CristalFontz LCD and then simulation is OK.
Is baudrate set correctly, some LCD use inverted signal (Scott Edwards).
Sat Sep 7 2013, 01:27:55, download attachment LCD.ld
(no subject) (by Boris)
If You have 16 long LCD:
text + no text + 3places must be 16 characters long

You must alwas have 16 character before \xFE command
look at my attacment and count caracters
I hope this helps.
Sat Sep 7 2013, 01:38:30
(no subject) (by MGP)
Hello Boris

I use a 4x20 lcd with a rs232 interface of
http://hobbybotics.com/project...cs-serial-lcd-controller-v3-0/
and clrscreen is \x00.
I can set the cursor where I want, everything else works.

But that's not the point, I want to make a serial addressable small network and want to send \x00 and \x01 but LDmicro sends a space.

You can see a printscreen from a RS232 pc analyzer.

Grtz
Sat Sep 7 2013, 04:16:29, download attachment RS232_analysed.jpg
(no subject) (by Jonathan Westhues)
It's a bug. I was using character codes 0 and 1 as flags to specify where the variable (if any) gets interpolated, so they didn't work as normal characters.

I've fixed that, and now any character value should work. I've attached a test build; let me know if that solves your problem, or if you see anything else.
Sat Sep 7 2013, 04:26:55, download attachment ldmicro-escape-fix.zip
(no subject) (by MGP)
Hello Jonathan

Everything works very well now, thank you very much.

A very good program that I've worked with a lot of hours.

Maybe I publish some small program's for the ldmicro community.

Regards

Jean Marie (MGP)

ps: if it's not too much work you may emty the transmitbuffer at startup. It's always sends something to the RS port, even with open contact.
But it's not urgent for me.

Again thank you.
Sat Sep 7 2013, 07:23:07
(no subject) (by Samukelo Shezi)
Jonathan, thank you for popping in every now and then despite your busy schedule. I hope the good Lord keeps you in good health and prosperity for us. Keep well!
Sun Sep 15 2013, 16:29:57
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):