Announcement

Collapse
No announcement yet.

Question about serial ports on uLCD43

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

  • Question about serial ports on uLCD43

    I'm trying to get the example for the visi genie library running. It loads and all but nothing on the screen. I have a feeling I'm not using the serial ports properly. There are two on the 30 pin header and the programming port. I'm trying to communicate via the programming port. Is that incorrect? Should I have it hooked up to the 30 pin header serial ports instead? I'd just try it but I don't have anything to connect to that header so I'll have to buy some cable and a connector. Don't want to if that isn't the problem.

    Griz

  • #2
    Hi Griz,

    This application note should help you : http://www.4dsystems.com.au/appnote/4D-AN-00017/

    In 4D's website, there other application notes that should help you understanding how to connect the display to an arduino host, how to use the ViSi-Genie Arduino library etc.
    Symon

    Comment


    • #3
      I used the TX0 RX0 pins on the 30pin connector and it works perfectly except for one thing. I have multiple screens and when I switch over to the screen that displays the sensor data the led displays are all gibberish including some that have a red box with a cross through it. I tried loading them all with zeros right after init before I start taking data from the sensor using contrast = 0 to turn off the display while the first data are acquired and loaded but it always has the garbage in the displays when I switch over to that screen. Seems to be some kind of timing thing. If I wait for a period of time before I hit the button to switch to that screen all is well but if I do it right after it comes up the garbage is there. So I have a feeling I need a delay in there somewhere but can't seem to find where to put it. Just don't understand the hardware yet. Its an awesome piece of kit though. I'm using it for a handcontroller for my telescope mount. It does the movement keys dew control functions and focus motor control. And I'm thinking of things to add to it all the time. Going to try and interface it to an ESP8266 pico wifi board next. One other thing is it possible to write your own widgets? I need a double throw toggle switch for another piece of this project.

      Dan

      Comment


      • #4
        Please describe how you have 'multiple screens', how they are connected and how you 'switch them over'.

        Also describe what you are doing with the power and reset lines to the display.
        Mark

        Comment


        • #5
          By screens I mean forms. There are 3 forms. An arrows at the bottom of each form navigate between them. For the navigation I used the formxActivate in the events for each arrow key. Power is coming from the Arduino its connected to a large 12v battery.

          Comment


          • #6
            What do you mean by 'right after it comes up'? are you resetting the display using the reset line, or powering it up? If so how long are you waiting before trying to communicate with it?

            'Double throw'? That's a normal toggle, you can use any of the normal 'buttons' for that, or create your own.

            If you mean 'triple throw' then you can only currently use a dipswitch. You could potentially use Genie Magic, but we have not tried such a thing.
            Mark

            Comment


            • #7
              Double throw has a center off position and two possible on positions. The rest of it I figured out.

              Comment


              • #8
                Hmm, I've always thought of that as Triple throw, Center off. At least Wikipedia agrees http://en.wikipedia.org/wiki/Switch

                The best way to achieve that is by two multiplexed buttons (assuming they lock on), or two momentary buttons (if they don't lock on)
                Mark

                Comment


                • #9
                  So the only widgets available are what are in the IDE right? It needs to look like a toggle. Ever see the switch boxes for lowrider cars? Thats what it needs to look like. Push forward to inflate the bag and back to deflate. Your suggestion would work but it wouldn't go over as well as if it looked like what they have now. Trying to get rid of the long cable they use at contests using wifi or bluetooth attached to the display. By the way I think you misread the article.

                  " The terms pole and throw are also used to describe switch contact variations. The number of "poles" is the number of separate circuits which are controlled by a single switch. For example, a "2-pole" switch has two separate identical sets of contacts controlled by the same switch. The number of "throws" is the number of separate wiring path choices other than "open" that the switch can adopt for each pole. A single-throw switch has one pair of contacts that can either be closed or open. A double-throw switch has a contact that can be connected to either of two other contacts, a triple-throw has a contact which can be connected to one of three other contacts, etc.[4]"

                  In this application the power is on the center pin which gets directed by the switch to the solenoid that either inflates or deflates the bag. I'll use two relays per bag instead of the switch. Some sensors to detect the angle front to back and side to side to manipulate an outline image of the car showing the current orientation. All on a 7 in touch screen that fits in the dash and has the 4.3 panel for the remote controller.

                  The mount controller is also WiFi enabled. Replaces the handpad that came with the servo controller controls the dew heater system and an autofocus system. Its much more complex than the car project. 3 temp sensors 1 temp humidity sensor and encoder and servo motor pwm to heat the dew strips and it has to pass images back and forth between the scope outside and the computer inside so I can use Mathematica to analyze the images to implement the autofocus function. The Arduino or Pi can't handle it. The math is too complex. The graphs that Mathemathca puts out get transferred back to the touchscreen so you can use the controls to adjust everything based on the Full Width Half Maximum that you calculate from the image. Once a focus move doesn't make it go any lower you are at perfect focus.

                  The garbage digits were coming from the Senserion SHT1x sensor. Nothing to do with the display. I did a for loop in the init section of the Arduino code to sample it a few times then fall into the main loop. That fixed it. I should be good to go from here on out.

                  Dan

                  Comment


                  • #10
                    Hah, must be a regional variation with the nomenclature. Have a look at the third entry in the table (yeah I just looked at the pictures, didn't read the text)

                    Yeah, you can't add your own widgets to Workshop.

                    I'll gave a go with Genie Magic and see if I can do it.

                    So the 'up' and 'down' are momentary?
                    Mark

                    Comment


                    • #11
                      Here's a simple Genie Magic example that 'changes' a user button into an Up / Down Centre off toggle switch.

                      You will need to replace the 3 images with something that looks the part a bit better.
                      Attached Files
                      Mark

                      Comment


                      • #12
                        More likely I'm an old geezer and the meanings have changed over the years Looks like I can use a set of images over the existing controls to make it look like a double throw toggle. Yea they are momentary the solenoid is on as long as they are pressed. I picked up some ESP8266 WiFi modules. Looks like I can interface them directly to the display without using a nano in the mix. No libs required they use AT commands. So controlling them from the display shouldn't be a problem. The display and Arduino will see them as a serial port. Cheap too 8 bucks so if they don't work no great loss. I used to do tech support for Oracle and several other companies. I worked from home it was a primo job. Unix, large networks, application servers and such. I like this display more and more. Its really a slick device. I haven't fooled around with microcontrollers for years. Just picked up an Arduino and a Pi a few weeks ago. Sure is a lot easier now. No wire-wrapping or assembly coding. Thanks for the help.

                        Dan

                        Comment


                        • #13
                          Thanks I'll try that out.

                          Comment


                          • #14
                            Be interested to hear how you get on with the ESP8266.

                            A lot of the modules we have tried have too many shortcomings to be useful.

                            Too much latency (takes forever to respond to a command)
                            Too slow (over the air speed only 9600 or thereabouts)
                            Too easy to lose data (need extensive errors recovery)

                            Of course the 'true' wi-fi modules only seem to suffer from latency.
                            Mark

                            Comment


                            • #15
                              Someone recommended them to me. They are supposed to be good to 115200 which is still kinda slow but enough for what I want to do. His is a digital setting circle set up. Quite a bit more data going over that than will be going over my links. So we'll see. Hope it works I like the idea of interfacing it directly to the display. No hard requirements for wifi so if it doesn't work I'll wire it up. I'll let you know how it works out.

                              Dan

                              Comment

                              Working...
                              X