Announcement

Collapse
No announcement yet.

Sleep command issues

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

  • Sleep command issues

    I'm experimenting with the uLCD-28PT. After sending the Autobaud command I follow up with a generic string to the display which works fine - so the comms are working. I'm sending the sleep command example from the manual, which is 0x5A 0x04 0x32. This is supposed to put the graphics processor in sleep mode and wake up in 50 seconds unless the state of P0 changes. I expected to get the 0x06 ACK back from the display following the command string, but I don't. No other commands are acknowledged at this point either. After about 25 seconds the processor returns a 0x15 NACK. After that the processor works normally. I eventually want to use 0x5A 0x04 0x00 so the unit will stay asleep until P0 changes state. Is there something about using the sleep command that I'm missing?

    Phil

  • #2


    There is no immediate response to sleep. The response is at the end of the sleep period.



    The sleep time is only approximate, however I'm surprised you are seeing such a difference.
    Mark

    Comment


    • #3


      That explains it. thanks!

      On another note...
      Is there a reason that every time I try to set a new baud rate, 0x51 0x08 for example, it returns 0xF9? Then nothing works at that point without resetting the display?

      Comment


      • #4


        When you set a new baud rate, there is ~100ms delay (IIRC) and the ACK comes back at the new baud rate
        Mark

        Comment


        • #5


          Thanks! That's one of those Duh! moments.

          Comment


          • #6


            Hi,

            I m living the same problem with sleep command. I m sending sleep command then the module wents to sleep but nevew returns back altough i gave 10 seconds to sleep.

            Any idea?
            Serkan

            Comment


            • #7


              Which PmmC and what was the exact command and options?
              Mark

              Comment


              • #8


                PmmC Rev 2 is used. My commands are;

                0x5A, 0x01, 0x0A

                Best regards,
                Serkan

                Comment


                • #9


                  There was a problem with R19 PmmCs, but I cannot reproduce your issue on the R22 PmmC.

                  If I send the command shown and wait I receive a NAK about 10 seconds later.

                  Are you perhaps on accepting an ACK?
                  Mark

                  Comment


                  • #10


                    Yes i m expecting ACK? isn't it correct?

                    Regards,
                    Serkan

                    Comment


                    • #11


                      For that particular sleep request, if it wakes because of it receives serial data you get an ACK. If it wakes because 10 seconds is up you get a NAK.

                      Hope that makes sense
                      Mark

                      Comment


                      • #12


                        Thanks for clarification, i will correct my function.

                        The ACK is serial command's ACK rigth? I just wonder whether double ACK will be get after sending serial command

                        Regards,
                        Serkan

                        Comment


                        • #13


                          Yes, you will potentially get a double ACK.

                          Because the display is asleep, the response from any serial commands may be a bit 'sleepy, waking up'.

                          So the first ACK will be for awaking from the sleep, what follows will be an attempt to respond to what caused and follows the wakeup, but it may not be interpreted correctly.

                          To try and get around that I suggest using Autobaud('U') commands until the first ACK comes back.

                          Then wait a little while and either discard the comms buffer or just read it and ignore it.

                          Then you can resume processing as normal
                          Mark

                          Comment


                          • #14


                            It worked well. By the way, sleep just puts picasso sgc processor into low power mode and it does not related with none of display function. Display keeps powered on altough sleep sends.

                            Regards,
                            Serkan

                            Comment


                            • #15


                              You can turn the display off if you want to, using the control commands.

                              You could also display something 'dark'.

                              It's up to you
                              Mark

                              Comment

                              Working...
                              X