• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » DLP & MEMS » DLP LightCrafter Development Platform » Packet example
Share
DLP & MEMS
  • Forums
Options
  • Subscribe via RSS

Forums

Packet example

This question is answered
Andreas Fritz
Posted by Andreas Fritz
on Jul 20 2012 03:03 AM
Prodigy100 points

Hey there,

Actually I am trying to communicate with the DLP Light Craft via the USB Cable.
I already get a connection over Matlab to the TCP/IP Connection but I have no clue how to write the Packet sending to the DLP. Do you have any example for a Packet?

Is there also a coding example how to send a command?

Kind regards,

Andi

Matlab command
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • PedroGelabert
    Posted by PedroGelabert
    on Mar 07 2012 13:48 PM
    Intellectual1980 points

    Andi,

    The packets sent through USB are described in this document DLP LightCrafter DM365 Command Interface Guide

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Andreas Fritz
    Posted by Andreas Fritz
    on Mar 08 2012 01:27 AM
    Prodigy100 points

    Hey PedroGelabert,

    Thanks for your response. I actually read this document but I am not sure how to combine the single Commands.

    Concerning to point 2.2 “Command ID (CMD1 & CMD2)

    Byte 1 and Byte 2 concerning to this both command ID’s but in the text a CMD2 and a CMD3 is mentioned. So I am a little bit confused.

    Is there a possibility to get any kind of example code for the communication?

    For example I want to read the DM365 SW Revision:

    Byte 0: 0x04
    Byte 1: 0x00
    Byte 2: ?????  
    Byte 3: 0x00
    Byte 4: 0x00
    Byte 5: MSB
    Byte 6: ??? (should contain no information when reading)
    Byte 7: checksum concerning to bytes

     

    Would it be possible to get the source code for the DLP LifhtCrafter Control Software GUI?

     

    Kind regards Andi

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Andreas Fritz
    Posted by Andreas Fritz
    on Mar 08 2012 04:28 AM
    Prodigy100 points

    Ok after using a network analysis program I was able to test my code and I am proud to say that I am able to communicate with the DLP over Matlab :)

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • 1973284
    Posted by 1973284
    on Mar 20 2012 20:40 PM
    Prodigy60 points

    Andreas

    I'm about a few weeks behind you it seems, in that I wan't to send signals to the lightcrafter from matlab.

    Is there any chance you can give the steps/code to do this and save the rest of us the headaches?

    Thanks in advance

    Lee

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Andreas Fritz
    Posted by Andreas Fritz
    on Mar 21 2012 02:38 AM
    Verified Answer
    Verified by Andreas Fritz
    Prodigy100 points

    Hey Lee,

    I could give you a hand full of code examples. This should help you to communicate with the LC.

     

    Generating a TCPIP object:

    tcpObject = tcpip(192.168.1.100,Port Number) %concerning to the manual the IP Address is fixed

    fopen(tcoObject);

    to send a command to the LC use following code:

    fwrite(tcpObject,uint8(hex2dec(['02';'01';'01';'00';'01';'00';'00';'05']))); %switch display mode to static

    fwrite(tcpObject,uint8(hex2dec(['02';'01';'01';'00';'01';'00';'01';'06']))); %siwtch display mode to internal

    fwrite(tcpObject,uint8(hex2dec(['02';'01';'03';'00';'01';'00';'00';'07']))); %switch to internal pattern: checkboard

     

    Use the DLP LightCrafter DM365 Command Interface Guide to get the necessary information for the commands.

    Hopefully I prevent you from headache ;)

     

    Andi

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • 1973284
    Posted by 1973284
    on Mar 21 2012 15:15 PM
    Prodigy60 points

    Fantastic!

    I was very close too.

    Thank you very much

    Lee

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • 1973284
    Posted by 1973284
    on Mar 21 2012 16:49 PM
    Prodigy60 points

    Nope, thank you for the help but it appears I spoke to soon.

    The tcpip object is reporting the correct number of bytes send but nothing is actually happening on the lightcrafter.

    I suspect there maybe something else I'm not setting... any advice would be appreciated.

    Thanks again, and in advance.

    Lee

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • 1973284
    Posted by 1973284
    on Mar 21 2012 17:00 PM
    Prodigy60 points

    Scratch that, it turned out I had just pressed a button I shouldn't have on the lightcrafer. The messages work now and I can change the test patterns.

    Just to confirm, the code posted by Andi above does appear to work.

    Lee

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • 1973284
    Posted by 1973284
    on Mar 28 2012 22:25 PM
    Prodigy60 points

    Hello

    Can I ask the Devs where things are at with releasing official code snippits.

    I ask because so far I've managed to do a few basic things like set the static colour, and choose a test pattern. But I've not managed to do critical things like upload and display an image from my own software.

    What is odd (and disconcerting) is that some operations haven’t worked at first. Then after some time, without making any changes to a particular piece of code, then said operations start working. I would be very helpful to have something to reference against.

    Thanks in advance.

    Lee

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Samir Zutshi
    Posted by Samir Zutshi
    on Jun 11 2012 10:30 AM
    Prodigy120 points

    Hi there,

    I am also attempting to integrate the Lightcrafter into matlab.

    Trying to decipher your code via the DLPC300 Programmer’s Guide is not giving me the most luck. 

    Could you please just give me a quick map of what each of those hex decimals represent in for example:

    fwrite(tcpObject,uint8(hex2dec(['02';'01';'01';'00';'01';'00';'00';'05']))); %switch display mode to static

    I know that the sequence to interface must be 
    START Condition, Slave Address Byte + R/W Bit, Sub-Address Byte, N-Data Bytes, STOP Condition

    so something like:
    S 37 00 00 00 00 P would make sense to me for a write situation.

    Although im confused as to what exactly your  code refers to for each hex value.

    Any help would be greatly appreciated.

    Thanks!

    Samir

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jan Winter
    Posted by Jan Winter
    on Jul 20 2012 03:03 AM
    Prodigy240 points

    HI guys,

    here is a link to my github repository providing sample code for MATLAB: http://e2e.ti.com/support/dlp__mems_micro-electro-mechanical_systems/f/850/p/200078/719700.aspx#719700

    Best regards

    Jan

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use