Announcement

Collapse
No announcement yet.

uOLED-96-G2 freeze and no response

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

  • uOLED-96-G2 freeze and no response

    Hello, I´m trying to use a uOLED-96-G2 as a slave with a PIC and I have a comunication problem.

    After the star-up the uOLED-96-G2 show the splash screen and start to move from top to bottom (like the credits of a movie). The PIC is programmed to wait 10 seconds and send a command, then the screen freeze showing the splash screen but no moving, after a few seconds it start moving again.

    The response is not always the same, if I use beep cmd it freeze but the device response 0x00; and if I use clear screen cmd it freeze and dont response anything.

    I don´t know if it is a software or a harware problem. I connect directly the TX RX pins from the PIC with the RX TX pins device (vice versa), I suppose it is the way to connect.

    My UART configuration is 9600 baud, no parity, 8 bits, stop bit 1.

    The screen shows, uOLED-96-G2(in colour)
    SPE2 rev 1.1
    PmmC rev 2.4
    Comms 9600


    Any idea?¿ thanks

  • #2


    Are you absolutely certain the PIC is talking at 9600, getting PICs to talk at the right baud rate can be tricky.

    The fact that the screen pauses indicates it has received something.

    The fact that it appears to return 0x00 makes me think the PICs baud rate is not right
    Mark

    Comment


    • #3


      Thanks for the quick reply

      I have use an oscilloscope to see the signal and each bits pulses have aprox 9.6KHz,

      I have made more test, I have use the example of the red rectangle.

      Send to the display: 0xFF, 0xCFReceive from the display: 0x06Send to the display: 0xFF, 0xCF, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x32, 0x00, 0x46, 0xF8, 0x00Receive from the display: 0x06
      When I use it, the first cmd (screen clear)have no reply , but the second (red rectangle) works, and it reply 0x1A, then I can see the rectangle over the splash screen and after a few seconds the screen start to move again. The splash screen never disappear.

      If I use only the fisrt cmd (screen clear) the device freeze forever and I have to shut down the power.

      Colud it be that the PIC is not making an exact 9600baud signal, maybe 9700 or 9500 ?¿

      Comment


      • #4


        Problem solved!!!!

        It was a software problem, I put a 10ms delay between each cmd and all works

        Thanks

        Comment


        • #5


          You shouldn't need a delay, although you certainly need to wait for the ACK from one command before sending the next one.

          0xFF, 0xCF is not the Clear screen command, are you sure you have the command right?
          Mark

          Comment


          • #6


            You are right, I thouhgt 0xFF, 0xCF was the clear screen command because I copied it from the example 4.3 of the GOLDELOX-SPE-COMMAND-SET-REV1.3 document, my mistake.

            Anyway I need the delays, without them it dosen´t work, I don´t wait for the ACK so maybe this gap of delay time (10ms) alows the device to send the ACK before I send the next cmd.

            Comment


            • #7


              You should not rely on delays as the time taken to execute a command varies according to the options contained in it.

              Also you will need the responses to be able to access files and the like.

              Best to get checking for ACKs working, it will save you a lot of headaches further down the track.
              Mark

              Comment

              Working...
              X