Announcement

Collapse
No announcement yet.

Unable to get sync with µLCD-320-PMD2 and μUSB-CE5 - resolved

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Unable to get sync with µLCD-320-PMD2 and μUSB-CE5 - resolved

    This is going to seem silly but i just can't seem to write a program that can communicate with the µLCD-320-PMD2. It has to be something really simple, but i just can't find the problem.

    You see, i had this crazy idea that i could get the µLCD-320-PMD2( http://www.4dsystems.com.au/prod.php?id=2 ), get the μUSB-CE5 ( http://www.4dsystems.com.au/prod.php?id=19 ), plug em together, plug it into my computer USB port and away i'd go making a cool little widget device.

    I got the USB controller drivers from here: http://www.ftdichip.com/Drivers/D2XX.htm
    I installed them, plugged in the completed device, set up the virtual com port, the display initializes and displays the splash screen.

    My problem though is that any attempts by me to write a program that tries to communicate with the screen just doesn't work. From my limited understanding these are basic steps required:
    [list type=decimal][*]Open COM port[*]Set baud rate(9600, doesn't really matter? does it??), parity(NONE), bits(7), stop(1), No hardware handshaking[*]Set DTR low, then high, so that the toggle causes the screen to reset(built in function of the μUSB-CE5)[*]Wait a specified time. 200-2000ms
    Setup auto-baud by sending the 'U'(0x55h) character by writing directly to the COM port.
    Wait for an ACK(0x06h) by reading back from the COM port
    Do other stuff[/list type=decimal]The problem i'm having is that the send command at step 5 doesn't seem to DO anything. The transfer LED doesn't light up on the USB board, and the wait for the ACK last forever(or until timeout), but the result of the send method always says it was successfull sending the byte.

    I know the connection works, as i downloaded the PmmCLoader and was able to use it to flash the screen to the latest version, which proves to me communication to the screen is working because the LED light on the μUSB-CE5 flashed as the data was being sent.

    I don't have a great understanding of COM ports, and i originally attempted to communicate using the D2XX driver library by directly accessing the DLL calls, but that also failed to achieve any recognizable results.

    Even attempting to communicate directly using terminal programs like putty(yes! it has direct COM support now) didn't do anything.

    If anyone can help me, i'd greatly appreciate it as this has been bugging me for a week, i'm fluent in C, C++(both Linux and Win32 flavours) and Java so if you have some example code to share, please do.

    It's something small and so very obvious, i just know it!

  • #2


    Set baud rate(9600, doesn't really matter? does it??), parity(NONE), bits(7), stop(1), No hardware handshaking

    Use bits(8).

    Serial Data format is
    : 8 bits, No Parity, 1 stop, No H/W handshake

    Hope this helps.
    Atilla

    Comment


    • #3


      Thank you for your quick reply, unfortunately changing the bits from 7-8 didn't help.

      Edit: Here is a link to my test program i'm trying to get working.(a mish mash of c/c++ and win32 calls.. you have been warned!) link

      Comment


      • #4


        Here is a link to a serial terminal program: http://www.docklight.de/download/Docklight.zip
        Docklight provides a very quick setup between the PC and the uLCD-320 via the CE5. Send the Auto Baud character (0x55, U) followed by some other commands. This will tell you if all is well.
        Atilla

        Comment


        • #5


          We found the problem, it was on the uLCD-320-PMD2 Auto Baud pin hogging the Rx line high. uUSB-MB5 has plenty of drive on its Tx line to pull it low but the uUSB-CE5 doesn't. Bug fixed so that Auto Baud pin is always forced to an input on Power-Up/Reset.PmmC rev 6 is now released and the problem resolved. Please download the latest PmmC from the uLCD-320-PMD2 product page. http://www.4dsystems.com.au/prod.php?id=2
          Atilla

          Comment


          • #6


            Ok, i tried it. A very cool program it is too. but still no luck.

            Here is a screenshot of what happens. Nothing is ever returned back from the device. I toggled DTR on/off then sent the U.


            Here is the result of the Mprog program used to read the chip from the micro usb device:



            Here is the pccm loader working. (while it's doing this the red LED on the micro usb is flashing crazily indication data transfer) and it completes successfully.

            Perhaps it's a driver error that i need to take up with FTDI?

            Comment


            • #7


              Whoops. sorry. didn't see your post about the update while i was typing the above out. will try now.

              Edit: It seems to do something. will check it out more later. thank you! at least it sends commands back now! I've got back to work. will do a more in-depth check later. Thanks again

              Comment


              • #8


                No worries, I'm sure it'll all work as it should. Just come back and let us know how you go.
                Atilla

                Comment


                • #9


                  THANK YOU! It works almost perfectly now. Just a small bug i found, will post it in another thread. I praise you and your team for the quick resolution. Although i am surprised no-one else had noticed this before.

                  Comment


                  • #10


                    Thanks Spikeles, we try to do the best we can. It went unnoticed because it works with some of the CE5 and not with others. Every module gets tested before it leaves the factory but not with every combination. At least we caught it in time and a quick PmmC release did the trick. Thanks for your help and patience.
                    Atilla

                    Comment

                    Working...
                    X