Announcement

Collapse
No announcement yet.

uLCD-43PT connection to Arduino without shield

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

  • uLCD-43PT connection to Arduino without shield

    I am using a uLCD43-pt connected to an arduino mega 2560 via the arduino shield v2.0. I also have a Seed Shield ether shield on the stack. I would like to reduce the height of my stack by elimination of the arduino shield v2.0. I have read the application note

    http://www.4dsystems.com.au/download...4017_R_1_1.pdf

    as well as viewing the specific .pdf for my product

    http://www.4dsystems.com.au/productp...heet_R_1_5.pdf

    My question is, I am using D4 as the reset for the uLCD, can this be changed to another D pin? There is a J2 programming header and J1 expansion header on the back of the uLCD. Right now, while using the arduino shield for the uLCD there is a 5 pin connector that connects H1 (header on arduino shield) to J2 on the back of the uLCD. Those pins include +5v, TX, RX,GND and RES. So, if I remove the arduino shield, can I connect the +5v from J2 to +5v , can I connect TX to D18 (directly), RX to D19 (directly), GND to ground and finally RES to another D pin (such as D42 controlled by the code)?

    Or do I have to connect +5v to pin 12 on J1, TX D18 to pin 28 on J1, RX D19 to pin 30 of J1, GND to pin 11 on J1 and finally RES(perhaps D42) to RES pin 16 on J1?

    I am curious which scenario to use. The whole purpose is to be able to eliminate the uLCD shield and reduce the stack height.

    Thanks

    Brian


  • #2
    Hello Brian

    I am using D4 as the reset for the uLCD, can this be changed to another D pin?
    Yes, change it to whatever you want. Its just a GPIO.

    can I connect the +5v from J2 to +5v , can I connect TX to D18 (directly), RX to D19 (directly), GND to ground and finally RES to another D pin (such as D42 controlled by the code)?
    Yes. But you will see RX needs to go to TX, and TX needs to go to RX. If you look at the J2 header, the TX pin is next to +5V. If you then look at the 5 way cable, you will see RX is next to +5V. If you look at the Shield, you will see RX is also next to +5V. So the Cable/Shield swap RX and TX around so TX goes to RX (as to receive a transmission from the other device, you have to receive it in your RX....). But yes, you can connect all these signals directly.

    Or do I have to connect +5v to pin 12 on J1, TX D18 to pin 28 on J1, RX D19 to pin 30 of J1, GND to pin 11 on J1 and finally RES(perhaps D42) to RES pin 16 on J1?
    This would achieve the same thing as the above. The signals on the 5 way header are the same as those found on the 30 way header.

    In the App Notes it also describes to use a 1K resistor between RES and a GPIO. It is good to do this, but if its too hard it is not essential. You will also notice that in the Arduino reset code for the display, it is Active High, as in you set the pin high then set it back low. This is because the shield has a transistor doing the switching. If you remove the shield, then you need to change the logic, so its Active Low. set the pin Low, then set it High.

    Hope that helps

    If you look at the doc you referred to, the left hand side of page 37 shows it all. It illustrates using the 30 way header though.
    http://www.4dsystems.com.au/download...4017_R_1_1.pdf
    To go even further you could use RX1 and TX1 on the display module instead of RX0 and TX0. You just then change your settings in the Options of Workshop4 to use this Serial Port instead. You still program it over RX0 and TX0 though on the 10 way header. It does however mean you dont need to unplug things to program the display. Using RX1 and TX1 on the ARDUINO like you are wanting to do, means you dont have to unplug the Arduino to program it either.

    Regards
    James

    Comment


    • #3
      James,

      Thank you very much for your reply. I appreciate your help,

      Sincerely

      Brian

      Comment


      • #4
        James,

        I am a bit confused on the last comment you made about using RX1 and TX1 instead of RX0 and TX0. I have already changed the line of code in Arduino to genie.Begin(Serial1) and was using jumper wires to connect from the shield to D18 and D19 (mega 2560) because of a conflict with the ether shield. So are you saying that when I remove the shield and wire the uLCD directly to the Arduino that I would go to Options/Genie/Comms Port in Workshop 4 and change the settings from 0 to 1? Then I would save my program? Or is using genie.Begin(Serial1) and connecting the TX and RX to pins D18 and D19 sufficient.

        Thanks
        Brian

        Comment


        • #5
          Hi Brian

          There are 2 devices. Arduino and Display.

          Arduino Mega you are using has a number of Serial ports, you have chosen Serial1. All good there.

          Display also has 2 serial ports. You are currently using Serial0 or RX0/TX0 which is what is on the 10 way header. I am just telling you that you can use RX1/TX1 on the 30 way header if you would prefer. You select the Display serial port you are using in the WS4 options, it has nothing to do with your Arduino code.

          D18 and D19 is your Arduino serial1 port.
          I am talking about your Display serial1 port.

          Regards
          James

          Comment


          • #6
            James,

            Ok, now I understand that Serial 1 on the uLCD is on the 30 pin header, not on the 10 pin header. I further understand that I choose that Serial port in the WS4 options tab, choosing the Genie tab and then choosing Comms port 1.

            Thanks very much.

            Brian

            Comment


            • #7
              I want to use my display without shield on a Arduino Mega.
              I ask you to look even know if I have understood everything correctly (before I destroy the display).




              Settings in Worksop IDE. Do I have to transfer the settings with SPE Load?




              Thank you !

              Comment


              • #8
                Hi GiJay

                Looks good to me.
                However you have set those pins up in the ViSi-Genie tab, but you talk about SPE.
                SPE is under the Serial tab.
                ViSi-Genie (aka Genie) is not the same as SPE (aka Serial). They are two totally separate things, so you need to choose which way you are going to go.

                Regards
                James

                Comment


                • #9
                  Hi James,
                  can you delete post #7 ? The drawing has an error !!! Pin 1 is at the bottom left - in my drawing at the top right.
                  Thank You !

                  GiJay

                  Comment


                  • #10
                    Sorry to jump on this post, but is it also possible to connect say a SK-GEN4-70DT-AR directly to either ESP32 board. All my projects use internet access for data and was hoping to connect directly to the ESP32 and bypass the need for a Mega with an wifi adapter and the 4D shield by just using the 5v, Gnd, RX, TX, and Res leads from the 5core cable. My current project is all hard coded and I want to make it portable with the ability to use different wifi setting depending where I am and the 4D system looks the best way to do it.

                    (Once again, sorry for the hijack. Couldn't post a new thread )

                    Comment


                    • #11
                      Hi,

                      Welcome to the forum

                      No problem with adding to the post.

                      The ESP32 works very well when connected to a SK-gen4-70DT-AR. The ESP32 has been extensively tested by us without any issues and as you say is a very convenient way of adding Wifi and Bluetooth in a easy to use Arduino environment.

                      I hope this helps

                      Best regards

                      Paul

                      Comment


                      • #12
                        Thank you Paul. Thats what I was hoping. I can now order my screen and complete the project.

                        Thanks John

                        Comment


                        • #13
                          The ESP32 also has a 2nd and 3rd Hardware Serial port which is very useful as it is means you can still use a seperate com port for comms to the display just like you would with the Mega so that the ESP32 can be flashed without being disconnected from the display or the USB programming port causing Serial comms problems.

                          Comment


                          • #14
                            Yes. Which is why I like the ESP32. I currently have an ESP32 with 2 SPI 128x64 screens each with multiple pages. Hence my looking for a better system to make it mobile and capable of adding a querty keyboard for inputting various wifi settings. Will be fun learning something new

                            Comment

                            Working...
                            X