Menu

lgt328 is 3.3V logic,good or bad

2021-08-23
2021-08-24
  • stan cartwright

    stan cartwright - 2021-08-23

    I just lately I dug out a logic green technology 328 arduino nano clone to retry spi touch on ili9341 and found a board set up and it's 3.3V logic. Great for the glcd but what about 5V logic?
    And in the xpt touch it uses an analogue pin and remember posting 3.3V was 255.
    OK the xpt touch on the ili9341 is mystical to me but works with hardware spi on a mega328p.
    You need logic level converters though.
    Now if the lgt328 is 3.3V logic then will it work with devices that use 5V logic?
    What is the accepted 5V logic hi voltage?
    Also what about a to d being 0 to 3.3V not 0 to 5V. like 3.3V is 255 for 8bit a to d.

     
  • William Roth

    William Roth - 2021-08-24

    3.3V logic is neither good, nor bad. A better question might be what logic level is best suited for a particular application.

    When designing a project or system It is generally good practice to try to select devices with the same specified logic level. But, sometimes that is not possible or not "convenient" . In these cases level converters may be be necessary. It all depends ...

    Does the 3.3V device have "5V Tolerant I/0 pins? If so then a simple current limit resistor may suffice if the inputs of the 3.3V device are exposed to 5V logic signals. Then you have to determine if 3.3v logic signal levels are sufficiently high enough to reliably meet the required input threshold specification of the 5V logic level device ( Read the respective datasheets) .

    Haphazardly mixing devices with different logic levels will likely lead to disappointment.

     
  • stan cartwright

    stan cartwright - 2021-08-24

    Well the gcb ili9341 demo says
    "Note: for the correct operation of this display you MUST connect via a CD4050, see http://forum.arduino.cc/index.php?topic=181679.90"
    I think the ili9341 Anobium used was 5V logic, so how did he get it working with the lgt328?
    The displays are sold as 5V/3.3V compatible but that's just short the 3.3V regulator jumper so it will run on 3.3V.
    the touch pins , one is connected to a to d pin... #define XPT2046_IRQ ANALOG_5
    and as I mentioned using 8 bit a to d, on the lgt328 3.3V is 255.
    So again if Anobiums ili9341 was 5V logic how did the a to d work?
    I'm confused.

     
  • Anobium

    Anobium - 2021-08-24

    The comment in the header is a 'liability statement' - it means use a form of electrical seperation and do not call if you dont.

    I currently have an LGT connected to an ILI9341. As the LGT is in a UNO board and the ILI is in a GLCD shield ( it is therefore an 8bit bus not SPI ) I have no reason to check the voltages. I assume the Board and Shield operate. And, they do.

    So, now you know the config I have.. it should explain.

     
  • stan cartwright

    stan cartwright - 2021-08-24

    What's ILI is in a GLCD shield ( it is therefore an 8bit bus not SPI ) ?
    Lgt in uno board, mine's nano but should be the same if like an arduino uno is same as nano.
    So is your ili 5V logic and what logic level does uno lgt use?
    I think 5V logic treats 3,3V as hi.. dunno

     
    • Anobium

      Anobium - 2021-08-24

      The shield is an ILI9341/8 bit bus.

      Dont know what logic level. I will check tomorrow.

       
  • stan cartwright

    stan cartwright - 2021-08-24

    A link to where you got it as it's a 2 year old gcb idea and time flies like an arrow.
    Fruit flies like a banana.
    Seriously, is the lgt the fastest pic gcb supports?
    Is there some underlying problems that stop this chip being brill? It seems like a 328 on steroids but only if other users use it will any problems become apparent.
    Connected to ili and no converters needed is tidy (but a pic using a 3.3v supply is the same) and it's very fast... and cheap.
    Any dials etc. are so much smoother... using hwspi that is.
    Glad it's supported in gcb.

     
  • Anobium

    Anobium - 2021-08-24

    LGT is the fastest chip/GLCD 8bit combo.

    I am writing proof of 'copernicus circle theorem'. So, I benchmarked all the combos. LGT wins.

    Interesting to the work you are doing on the Touch I have determimed the LGT is too fast when reading the ILI9341. So, the function needs a delay to allow the ILI9341 to process the request to read pixel color. So, this timing issue is similar to the XPT read error when using SPI.

    To sort the XPT issue you need a working Mega328p solution using hardware and software. Then, swap out the Mega328p for the LGT. Does the LGT work at 16mHz? then, does the 32mHz work? With these reference results you can start to resolve.

     
  • stan cartwright

    stan cartwright - 2021-08-24

    On the case, have your code you posted to try in my xpt thread.
    https://www.youtube.com/watch?v=beSWr2tJZNw
    not a bad result actually... would be fine for boxes to tick :)

     
    • Anobium

      Anobium - 2021-08-24

      So, software SPI works, albiet slow. Good.

       
  • stan cartwright

    stan cartwright - 2021-08-24

    SWSPI works fine as does HWSPI on a arduino nano but needs logic converter.
    Great work creating this for us.
    My thoughts are the analogue interrupt pin does something when the screen is touched, so what does it do? Is it like an on pin interrupt? If so then what event does it trigger and how to use the interrupt to get software spi data.
    I over simplify stuff I don't understand. Still to try your xpt mods code.
    Cheers.

     
  • stan cartwright

    stan cartwright - 2021-08-24

    2 birds with 1 stone. test lgt against mega328 with the millis function.
    See if the timer 0 it uses works with lgt and get it to count 65535, 65535 times or summat.
    I think why the need for speed when people use 8MHz pics and are content.
    suppose it's what you use them for and I can't see a 32MHz (128MHz pic) ucontroller doing much for a simple robot project... unless it used a glcd for a face but it's nice to know there's a fast chip if needed.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.