element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Insight why display fails with buffer board
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 24 replies
  • Answers 16 answers
  • Subscribers 675 subscribers
  • Views 4807 views
  • Users 0 members are here
  • raspberry pi display
  • lcd display
  • spi data
  • raspberry_pi
Related

Insight why display fails with buffer board

colporteur
colporteur over 4 years ago

Can someone share their insight  into why no images are displayed on the LCD display when a buffer/level shifter board is inserted between the Pi and the display?

 

The project is to display images on a 1.3 inch display using a Raspberry Pi. Inspiration for the project came from Episode 465: Lego Raspberry Pi HQ Camera . I'm using the LCD screen Katie's  hifromkatie used in the project.

 

I can display images on the display https://github.com/pimoroni/st7789-python  connected directly to the Pi. Images are not displayed if I insert a buffer board between the Pi and the display. I have tried modules with TXS0108E and BSS138 chips and get the same results.

 

Attached is the pin out for connections. I confess I have limited experience with this communication protocol. I was hoping the buffer would provide some isolation for the Pi to enable me to move the display away from the Pi. I assumed a level shifter would not introduce issues but that does not appear to be the case.

 

Can you share any insight into what is causing the issue and possible solution.

 

 

 

image

 

Message was edited by: sean conway I added pictorials of the buffer/level shifting modules. The module on the left is is based on the TXS0108E chip and the right is a BSS138 fet based on an adafruit model https://www.adafruit.com/product/757

  • Sign in to reply
  • Cancel
Parents
  • colporteur
    0 colporteur over 4 years ago

    First, I stabilized power for the display. The display was getting power from the module, not a channel but the power rail, now the display power is completely independent with ground reference the same.

     

    Next, I established a setup that had the display working but enabled me to move each connection to a level converter (one type first and then the second). Any of the signals CS, SCK, MOSI or DC that are moved to the level converters (the two I have on hand) the display doesn't work.

     

    This new knowledge, motivated me to look at how SPI signals are amplified to extend distances. It seems SPI and LED arrays have spawned a number of amplifiers. My research took me to the Open Source Hardware Association link https://www.oshwa.org/a-resolution-to-redefine-spi-signal-names , the fog of my confusion started to lift. I wasn't aware that industry used different nomenclature to describe the signals for the same protocol. Awe Shite, no wonder I was confused.

     

    Self directed learning has it pit falls. If you don't know, what you don't know, how do you know, when you don't know. Oh well, now I know, this has aligned or realigned me towards finding a solution. I have tried to avoid using the adjective "simple" in my dialog. I think it fits in the same category as the words, common sense. Knowledge can lead to understanding that gives the allusion its simple.

     

    If anyone has an SPI signal extender they have had success with I would be interested in exploring any references.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • ralphjy
    0 ralphjy over 4 years ago in reply to colporteur

    The results of your experiment moving individual signals is interesting.  Maybe you should check that you aren’t missing something obvious.  The chip select pin is fairly low frequency.  You should check the levels and prop delay through your translator.  I think an issue on CS should be easy to spot.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • colporteur
    0 colporteur over 4 years ago in reply to ralphjy

    Thank you for reviewing my data. Another set of eyes can help uncover anomalies.

     

    I confess the cold medication induced stupor wasn't the ideal condition to be in for testing. On further review (i.e. testing) you observations are correct and the pins that won't work through the level converter are in fact different.

     

    Two pins (SCK & MOSI) if connected through the level converter cause the display to present no image. I thought maybe MISO would also would be included in the set but not according to my testing.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Reply
  • colporteur
    0 colporteur over 4 years ago in reply to ralphjy

    Thank you for reviewing my data. Another set of eyes can help uncover anomalies.

     

    I confess the cold medication induced stupor wasn't the ideal condition to be in for testing. On further review (i.e. testing) you observations are correct and the pins that won't work through the level converter are in fact different.

     

    Two pins (SCK & MOSI) if connected through the level converter cause the display to present no image. I thought maybe MISO would also would be included in the set but not according to my testing.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Children
  • Jan Cumps
    0 Jan Cumps over 4 years ago in reply to colporteur

    I think MISO is not used. All data goes from master to display.

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • dougw
    0 dougw over 4 years ago in reply to colporteur

    Is this module intended to shift voltage levels or drive a long cable?

    Presumably the Pi is 3.3 volts, what voltage is the LCD logic?

    How long is the cable? Some of these bidirectional level shifters cannot drive long cables.

    As Jan points out display driving signals are all unidirectional, so a bidirectional driver may not be needed.

    It sounds like the display works fine directly with Pi voltages - why is this buffer needed?

    Does the display cease to work because the cable gets too long?

    Make sure there is a good ground connection all the way from the Pi to the display, even with the buffer module in place.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • colporteur
    0 colporteur over 4 years ago in reply to Jan Cumps

    I would think the display would respond that it has received the data on the MISO line or is the line for sending data and not management like acknowledgements.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • ralphjy
    0 ralphjy over 4 years ago in reply to Jan Cumps

    I think in this instance the pin normally used for MISO is used for DC as shown in his first diagram (not sure why they did it that way).  Apparently, it can be remapped in the display class in the example programs from the library..

     

    # Create ST7789 LCD display class.

    disp = ST7789.ST7789(

        port=0,

        cs=ST7789.BG_SPI_CS_FRONT,  # BG_SPI_CS_BACK or BG_SPI_CS_FRONT

        dc=9,

        backlight=19,               # 18 for back BG slot, 19 for front BG slot.

        spi_speed_hz=80 * 1000 * 1000,

        offset_left=40 if display_type == "round" else 0

    )

     

    colporteur have you tried reducing the speed?  I think you do it by powers of 2.  Maybe you could try it at half speed to see if that helps.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Jan Cumps
    0 Jan Cumps over 4 years ago in reply to dougw

    dougw  wrote:

     

    Is this module intended to shift voltage levels or drive a long cable? ...

    The ICs mentioned here don't buffer. They are FETs in series with the signal.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • dougw
    0 dougw over 4 years ago in reply to Jan Cumps

    Understood, but what is the intended purpose if the display already works when directly connected?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • colporteur
    0 colporteur over 4 years ago in reply to dougw

    The display will be separated from the Pi by a cable.

     

    My testing has been addressing requirements. First was to prove the display worked (i.e. I could get it working). Then size and how it could be accommodated physically in the layout and now cable lengths.

     

    The Pi resides on a distribution panel approx three feet from the display. I'm hoping (maybe with the aid of a driver) the display will work.

     

    The final requirement is can two displays be operated from the same Pi. Each independent in term of images. This last requirement I hoping to reduce the need for another Pi.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Jan Cumps
    0 Jan Cumps over 4 years ago in reply to colporteur

    colporteur  wrote:

     

    (maybe with the aid of a driver)

    None of these ICs drive (the 2 you suggested, nor the one I put in the comments). They actually add resistance (and capacitance) to the path.

    There are FETs in the ICs. But they block or pass the signal (with the additional benefit of shifting the level). They will not buffer, protect or boost.

     

    They can't be used to allow for longer signal paths. They do the opposite - add an extra hurdle to the path.

    They have good use: they switch levels. But they don't do what you seem to be looking for.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • michaelkellett
    0 michaelkellett over 4 years ago in reply to Jan Cumps

    How about using SN74HCT244N (Farnell 3006173).

     

    This is a dual 4 way buffer which runs from 5V but the input thresholds are 3V friendly - I've picked the DIL version which is easy to prototype with.

     

    You can't use this to drive the Pi MISO (without a resistor divider) because it outputs 5V.

     

    It can drive serious current (although it would be worth adding some series resistors to improve the pulse shape if you use long leads.)

     

    You would  need a scope to check.

     

    I second Doug's point that running the SPI clock slower would improve chances.

     

    The '244 should be at the Pi (driving) end of the wires.

     

    You could do 2 displays by giving each one half of the '244 and driving both halfs from the Pi. You could then use 2 Pi GPIOs to control the '244 output enables.

     

    Put a pull up resistor on the display side of each /CS pin so that the disabled outputs set /CS to invalid.

     

    MK

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • nathandumont
    0 nathandumont over 4 years ago in reply to colporteur

    This is a great insight into your problem, thanks for the update.

     

    Have you tried the display with an approximately accurate length of cable?  I would suspect with a suitable SPI clock speed you'd be able to run that distance without any extra hardware.  How fast do you want to update the display, is it mostly static images or do you need to change images very frequently?

     

    Two displays off one Pi should be possible as the Pi has two Chip Select outputs on the SPI peripheral.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube