Can I hook up a HAT and a Screen to the same I/O port?

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
SuperIridium
 
Posts: 6
Joined: Mon May 05, 2014 9:35 am

Can I hook up a HAT and a Screen to the same I/O port?

Post by SuperIridium »

This is probably obvious to others, but I am a beginner and am interested in building a project that uses both a small display and the Capacitive Touch HAT. It looks like both boards connect to the same 40 pin I/O port on the Pi 2. Is it possible to connect these two without any troubleshooting or intricate reprogramming? I'm only asking because it looks like there are other displays available that use the HDMI output from the computer, and these will work fine too, but I'd prefer to use the small PiTFT display, if possible.

Thanks.

User avatar
adafruit_support_mike
 
Posts: 67459
Joined: Thu Feb 11, 2010 2:51 pm

Re: Can I hook up a HAT and a Screen to the same I/O port?

Post by adafruit_support_mike »

It would take intricate programming.

The PiTFT uses SPI, which is a shared-bus protocol. In theory you can can connect other devices to the same bus, but they have to take turns using the pins.

The PiTFT's SPI signals are generated by a driver built into the kernel, and it won't play nicely with any code you run from the command line. The OS suspends regular programs so the kernel drivers can do their thing, so any SPI code you run from the command line would have the rug yanked out from under it on a frequent-but-random basis.

It's technically possible to make two displays cooperate, but would involve deep wizardry.

User avatar
michaelmeissner
 
Posts: 1825
Joined: Wed Aug 29, 2012 12:40 am

Re: Can I hook up a HAT and a Screen to the same I/O port?

Post by michaelmeissner »

The following options are perhaps bigger than you wanted and more expensive, but one way to do it is to use screens that don't use the 40 pin connector.

For example, you can get HDMI screens where the screen is connected via the HDMI plug and the touch screen is done via a USB connection. In terms of Adafruit products, there is the 5" HDMI display with backpack: https://www.adafruit.com/products/2260. This is useful in that the screen is bigger than the PiTFT displays (which are rather cramped for running a general X session), but unlike the larger Adafruit displays with backpack connections, it can be powered via USB, and doesn't need a separate power connection.

Another option is the official Raspberry Pi PiTFT 7" display that uses the DSI port: https://www.adafruit.com/products/2718. You would need to hook up the power to the shared power ports from the gpio pins, or possibly use a USB plug to supply the 5v power it needs. I believe this has mounting holes so that you can attach t a Raspberry Pi B+, 2, or 3 directly to the display (but not the A+ or Zero since the mounting holes are located in a different position).

Unfortunately, at the moment, both of these are sold out at the Adafruit store. There are other options (such as waveshare displays) if you look around.

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”