Announcement

Collapse
No announcement yet.

uOLED-160-G2 Serial purposes

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

  • uOLED-160-G2 Serial purposes

    Hi,

    We just got some uOLED-160-G2 and would like to use them as information displays with gauges.

    We have a board with an Analog Devices processor which would send informations to display on the screen through UART.

    Regarding to this thread (http://4d.websitetoolbox.com/post/ulcd144g2-sending-data-for-gauge-display-6539874), I just tested to display a gauges with a specific value. I don't have anything displayed on my uOLED, and so here are my comments:

    - What are the steps of initialization I should write in my code (SHARC ADSP-21489, C language) for this OLED-160-G2 ?

    - The Reset (/RES) pin is pull high by the processor before doing anything with the display

    - This is the kind of code I write :

    //Set Baud Rate - 115200
    UputC(0x00);UputC(0x0B);UputC(0x00);UputC(0x19); //media_InitUputC(0xFF);UputC(0xB1); //media_SetAdd - Address of Gauge FFB9 0025 E200UputC(0xFF);UputC(0xB9);UputC(0x00);UputC(0x25);UputC(0xE2);UputC(0x00);

    //media_Video Frame - Display value 48
    UputC(0xFF);UputC(0xBA);UputC(0x00);UputC(0x00);UputC(0x00);UputC(0x64);UputC(0x00);UputC(30);

    Note that the function UputC just transfer one Byte. It has already been tested and it holds if a transmission is in progress before sending the next byte.

    - Should I add delays between bytes or do my code looks good and should work?

    The screen does not seem to do anything, except doing like a encrypted TV channel for 1sec when I run my program, and then black screen. But it is working on Workshop.

    Thank you for your help,
    Marc

  • #2


    Well, you need the serial environment (do you get the splash screen?)

    You also need to wait, roughly 2.5 secs after resetting the display before sending anything.

    You also need to wait and check for the responses to the commands you are sending.
    Mark

    Comment


    • #3


      Hi,

      Thank you for your answer.

      Yes I get the splash screen.

      I actually found that our board was not giving enough power supply. We were at 4,2V but not enough current. Now I get the splash screen when I plug it to my board.

      But now, I don't get the ACK.
      Through the Serial Commander, everything is working and I get an ACK each time I send a cmd.
      Here I spy the port with a terminal. The command is correctly sent but I don't get any ACK.

      For example, to do some tests I delete the code wrote above and replaced it by the command which draw a hollow rectangle (example from the pdf SPE Command document).
      In my terminal, I get the correct command bytes but no ack.

      I must have missed something... ?

      Marc

      Comment


      • #4


        Serial Commander shows the time it takes to receive the ACK, maybe your system is 'timing out' too quickly.

        You can use the Terminal program and the RX connected in between your SHARP and the display to see what is going on (only one direction at a time, of course, but it may give you the hint you need)
        Mark

        Comment


        • #5


          Hi,

          Ok after some tests it works, I get the ACK. And I am waiting to receive the ACK before sending a new command.

          Now, the goal here would be to load a code (ViSi ?) in the Goldelox which would do some code (displaying an image for example) waiting for informations from the processor through UART.

          But when I create a new Serial Environment project, the comments says: "In the future you will be able to place ViSi objects here and generate pseudo code to drive it from your favorite microcontroller". What exactly means "in the future"?

          Can I write a code to load on the display board which will contains the basic gauges for example, and will be waiting for values from the processor?

          Thank you,
          Marc

          Comment


          • #6


            What exactly means "in the future"
            The future is a long way off

            But you can do essentially what was going to happen there now.

            1. Create a new ViSi Program, make it for your display as it will help visualize the layout
            2. Drop an object onto it
            3. Save it.
            4. Build it (Ctrl-F9)
            5. Copy the created .GCI and .DAT files to uSD (or get Workshop to do it using Shift-F9 in step 4)
            6. Look inside the programnameConst.inc file created to see what the image indexes are for each object (obviously 0 if you only added a single object)
            7. The object can now be used in a Serial program the same way as it can in ViSi. (Also see Appnote G5002, around P8 "Displaying a specific frame in a video", if you need help with that)

            We will be doing a more detailed app note for this in the (definitely nearer) future
            Mark

            Comment


            • #7


              Hi,

              Thank you for your answer. I was already doing this with an image, as the application note.

              Sorry if I badly explained, I'm not native english .

              In the Internal functions document, I see some functions related to Serial communications, and I particularly see the serin() function.

              Do you think I can create my project on Designer, with some gauges, and just listening to the Port, selecting the data we need and outputting it on the gauges? Everything just with Designer environnement.

              The point is that we have a software which is communicates through the same UART... If I continue through this serial environnement and have communication with our other software, I get "Internal function missing" on the screen. This is why I just would like to listen to the Com Port.

              If you have any idea, I take it .

              Anyway, thank you for your help.
              Marc

              Comment


              • #8


                The point is that we have a software which is communicates through the same UART... If I continue through this serial environnement and have communication with our other software, I get "Internal function missing" on the screen. This is why I just would like to listen to the Com Port.
                ViSi is 'just' designer with the objects, and ways to manipulate them added in the form of 'paste code' and examples.

                ViSi-Genie is 'just' ViSi with smarts to produce simplistic code to bind the objects together and manipulate them, based on commands from and to the serial port. (Goldelox is too small to support this)

                Serial is 'just' an externalization of most 4DGL functions via the serial port.

                So anything you can do in any of the other environments you can do in designer, it just needs a more comprehensive understanding of 4DGL.

                Can you tell me where and in what circumstances you get "Internal function missing"? It doesn't sound right. What version of Workshop and Serial are you using?
                Mark

                Comment

                Working...
                X