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 4806 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
  • jc2048
    0 jc2048 over 4 years ago

    It might help us if you gave a bit more detail of the thing you're having the problem with. A red oval isn't very illuminating.

     

    Having said that, the reason might be that you aren't using a 'buffer board', you're using a level-translation board.

     

    The 'A' side of the TXS0108E device can only go to 3.6V max, so don't power that side with 5V or you'll blow it up. You'd have to add a regulator to drop the 5V to power the 3.3V side. So Pi to 'B' side, display to 'A' side, and a 3.3V regulator to power the display and the 'A' side from the Pi's 5V.

     

    Does that make sense? If not, say and I'll try and draw something.

     

    If you wanted to [had to?] power the display from 5V, maybe two level-translate boards back-to-back, one at each end of the cable [depends how cheap they are, really]. The cable section would then operate 3.3V [you'd still need a 3.3V supply, though, for the cable section].

     

    But since you just want to buffer, why not use a buffer logic chip? Or even just try it without any buffering and see how far you can get: the Pi I/O pins probably drive quite well. With CMOS outputs to CMOS inputs, where the high and low side are fairly well balanced, series termination at the sending end works quite nicely [for ribbon cable, try something like 100R] and you could probably manage several feet without any problems at all, and further with abit of care [to improve your chances, best to keep crosstalk down and regularise the cable impedance by interleaving grounds with the signal wires]. The weakest part might be the return data from the display, depending how they've done it, but you could add a buffer at the display end or maybe you might be able to just ignore that if you don't use any return data.

     

    Edit, 31st March.

     

    I'm wrong here. I took it from your drawing that the signalling on the Pi was 5V, but it's not: it's 3.3V. So what I've written is gibberish [though the bit about getting signals down a ribbon cable still stands]. Perhaps take more note of what the others are writing below.

     

    If I were in your place, I'd ditch any idea of working with 5V, run everything on 3.3V, and, if it were even necessary to buffer, consider a bus buffer like a 74LVC125 ( SN74LVC125SN74LVC125  ) or something like that.

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

    I updated the drawing to provide a visual of the type of bidirectional modules the red circle represents. Each output operates on its own channel. I have used these type of units in the past with good success.

     

    I interchange the terms buffer and level shifter. A bidirectional level shifter is the name pulled from the parts sites. To me it buffers the Pi from the outside world.

     

    The power supply I have tried a number of power configurations. Power both sides from the Pi, power both sides from external sources, power one side 3.3v Pi and the other side external. I have also confirmed that each channel is working or the level shifts. Using gpiozero I confirm the output can turn an LED on and off.

     

    The choice of bidirectional module was dependent on what was on the shelf. I was hoping to not have to introduce another parts module to deal with the issue. Again never used this com protocol before so maybe that is something I need to be aware of.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Gough Lui
    0 Gough Lui over 4 years ago

    My best guess is that you're using level shifter boards or wiring which is too slow to accommodate the high-speed SPI that the display is demanding.

     

    The code you are using has this in the ST7789's __init__.py:

    SPI_CLOCK_HZ = 16000000

     

    This tells me that the communications between the Pi and the screen are going at 16MHz. This is not a speed you can just carelessly whip around jumper wires or any-old-level-shifter. My guess is the BSS138-based shifter you're using is one intended for I2C usage which is only 0.4MHz in the "fast" mode. The TXS0108E may well be able to do it - it does say it can do 60Mbps maximum at 3.3V in push-pull which is plenty but only 2Mbit/s in open-drain (check the configuration of the module you're using). But I fear that the wiring you're using just may not be good enough to get 16MHz consistently - I've not had much luck myself above 8MHz going with jumper wires. Long wires add capacitance that will serve to increase the load on the drivers and round-off your edges, but also have a tendency to radiate signal so may even cause radio interference to nearby electronics.

     

    Probably best to get a scope onto the lines with the display load connected to see what is arriving at the display ... I suspect the signal just isn't clean. Perhaps another way is to try and modify the library and use a slower SPI clock and see if the display would come up (perhaps with reduced performance if not timing critical).

     

    - Gough

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

    I'm using this design for FPGA level shifting: Make a Logic Analyzer from your Dev Kit Part 3: Level Translator and Buffer

     

    A shifter - not a buffer, and you have to use the exact IC that's listed in the blog. But the IC can handle GHz. 16 data lines.

    The use case here is one direction. But not sure if the use case needs a buffer. It's not common in this scenario. These displays are made to directly attach to the logic and seem voltage compliant.

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

    Sean, I have an additional question. The top line, indicating 3 - 5 V, is that the power for the display?

    That should not go through a data line shifter.

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

    Thanks for the insight folks. I'm going to attempt some testing to explore the areas of concern you have suggested. I will keep you informed of the results.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • 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
  • colporteur
    0 colporteur over 4 years ago in reply to colporteur

    image

    Are all these display communication protocols pins the same or are they different? Now I know. Back at it.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify 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
>
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