Serial Command Reference

LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT Series

Moderators: Henry, Mods

Post Reply
tbyrd
LCD?
Posts: 4
Joined: Thu Feb 02, 2006 12:15 pm

Serial Command Reference

Post by tbyrd »

Greetings Orbitalites,

I have recently purchased an MX610 PLED display (just got it yesterday!) and I want to program this thing using the Serial interface. The unit installed perfectly fine, everything works, I've got C++ code to work with the display, everything is just dandy. But I can't seem to find a manual for the display on the web site for the MX series, and I'd like to know what the complete command set is for this unit, and what key codes I can expect from the keypad.

Can anyone point me to a complete reference of the commands that one can send over the Serial Interface? I seem to be too stupid to find it on any of the Matrix Orbital sites. I've been browsing through all the different code samples in all the different programming languages, and have picked up a few things, but I'd really like to know as much as I can about this unit.

-Ted

Tom
Matrix Orbital
Matrix Orbital
Posts: 1030
Joined: Mon Jul 19, 2004 4:43 pm
Location: Calgary
Contact:

Post by Tom »

Ted,

The manual will be under PK202-24-USB, which is the display that is fitted inside the MX610. You can download the manual at http://www.matrixorbital.ca/manuals/PK_ ... 02-24-USB/

If you have anymore questions or concerns, please feel free to post them.

Best Regards,

tbyrd
LCD?
Posts: 4
Joined: Thu Feb 02, 2006 12:15 pm

Post by tbyrd »

Tom wrote:Ted,

The manual will be under PK202-24-USB, which is the display that is fitted inside the MX610. You can download the manual at http://www.matrixorbital.ca/manuals/PK_ ... 02-24-USB/

If you have anymore questions or concerns, please feel free to post them.

Best Regards,
Thanks Tom!!

tbyrd
LCD?
Posts: 4
Joined: Thu Feb 02, 2006 12:15 pm

Programming 1-Wire Devices

Post by tbyrd »

Well, it's been about a month since the last post here, and I haven't had as much time to work with the MX610 as I had hoped, but I have made some considerable progress. Thanks again for the pointers to the manuals Tom.

I've picked back up in the last week, and have a good deal of working code, but I do have a question about using the 1-wire Dallas DS18S20 temperature probe, and 1-wire devices in general.

The search command documented in 6.4.2 works like a charm, I can enumerate the devices attached to the unit (only one at the moment), and get the addresses just fine, but I don't seem to be able to read the temperature information from the device. Can anyone describe in greater detail the format of the transaction commands used to initialize / address / read from the DS18S20, or point me to better documentation? Again, I seem to be having difficulty getting a search to turn up anything useful.

I'm an experienced programmer, but I'm new to I2C. I am also new to the protocol used by the displays. Maybe it will help to explain where I'm at with this. I am sending the Transaction command to the display as follows (all values in hexadecimal):

[0] FE Command Prefix
[1] C8 1-Wire command code
[2] 01 Request 1-Wire transaction
[3] 09 Flag (add crc8 to tx data, reset bus) (tried all sorts of combos here)
[4] 48 Send bits (9 bytes)
[5] 18 Receive bits (3 bytes) (tried several combinations of this too)
[6-n] Send data, tried various combinations of sending device address + crc8 + ROM command

I found a good reference for the DS81S20 on the Maxim IC website here:

http://pdfserv.maxim-ic.com/en/ds/DS18S20.pdf

From what I can tell reading that document, I should send a Convert command (0x44), and then expect a 16 bit value in return that represents the digital temperature reading. What I'm seeing from my experimentation is a display return protocol packet that looks like this (values in decimal):

[0] 35 preamble byte 1
[1] 42 preamble byte 2
[2] 3 packet length, no continuation
[3] 49 packet type, 1-wire data
[4] 0 error/result code???
[5] 255 MSB temp value???
[6] 255 LSB temp value???

So it looks like I'm getting a 1-wire packet back (pos 3 == 49), no errors (pos 4 == 0), but what I'd expect to see for the 16 bit temp value (pos 5 & 6) indicates (according to the maxim manual) that it's -0.5C in my house. I have the sensor in open air, and I know it's not THAT cold in here! :)

What the heck am I doing wrong?

Sections 6.0 - 6.4.1 of the PK202-24-USB manual do a fair job of describing the basic operations, but I'd like to see some more info added to explain in detail how to work with the 1-wire bus. I realize there are numerous 1-wire devices out there, and that it's beyond the scope of the manual to try and document them all. However, since you only really seem to support the DS18S20, and it's likely what most folks with the inserts are using, I think it would be good to provide an example of working with this device as a means of documenting the 1-wire interface. Just an idea.

I know, I should just use LCDC, but I find the interface clumsy, and I don't like the fact that it uses Delphi. I don't want to have to buy Delphi, and I *really* don't want to have to go back to working with Pascal, not even object Pascal. :o

-Ted

tbyrd
LCD?
Posts: 4
Joined: Thu Feb 02, 2006 12:15 pm

Post by tbyrd »

Ok, I AM an idiot...I just found this:

http://www.matrixorbital.ca/appnotes/1wire/1wire_intro

I'll RTFM, y'all kindly ignore me as I drool on myself.

-Ted

Post Reply