I'm doing a PCB layout for a project using the adafruit 2050 3.5" screen with integral SD card, and am running out of I/O. I want to save & retrieve SD data and also print text to the screen, but do not need the touch screen.
I have 0v,5v,CLK,MISO,MOSI,and D/C routed but am struggling to get more IO for the CS and Card CS.
My question is: can I tie either or both of these pins. The data sheets don't make it clear which of these 2 pins is required to read & write to the SD card.
neil
ADAFRUIT ID2050 Display & ESP32
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_mike
- Posts: 67459
- Joined: Thu Feb 11, 2010 2:51 pm
Re: ADAFRUIT ID2050 Display & ESP32
You can ignore the touchscreen if you don't want to use it.
Tying CS pins high or low is an all-or-nothing deal though. Either that device will think it owns the CIPO/MISO signal permanently, or it will never talk to the microcontroller at all.
Tying CS pins high or low is an all-or-nothing deal though. Either that device will think it owns the CIPO/MISO signal permanently, or it will never talk to the microcontroller at all.
- njepsen
- Posts: 3
- Joined: Mon Sep 13, 2021 12:35 am
Re: ADAFRUIT ID2050 Display & ESP32
Thanks for that mike. I realise I can ignore the touch screen.
Because I have only 1 device on my I2C can I tie cs high.
But what is card_cs used for? I'm guessing it selects SD card on or off?
Common sense tells me that to write to the LCD _ need cs high and card_cs low
To write to the sd card OI need cs lwo and card_cs high
To read from the Sd card I need cs low and card_cs low
What is the function of D/C ?
Does that make sense?
Because I have only 1 device on my I2C can I tie cs high.
But what is card_cs used for? I'm guessing it selects SD card on or off?
Common sense tells me that to write to the LCD _ need cs high and card_cs low
To write to the sd card OI need cs lwo and card_cs high
To read from the Sd card I need cs low and card_cs low
What is the function of D/C ?
Does that make sense?
- adafruit_support_mike
- Posts: 67459
- Joined: Thu Feb 11, 2010 2:51 pm
Re: ADAFRUIT ID2050 Display & ESP32
I2C doesn't have a CS signal. Every device on an I2C bus has a unique address, and the microcontroller selects the devices by starting each transaction with the correct address.njepsen wrote:Because I have only 1 device on my I2C can I tie cs high.
CS is an SPI signal.
Yes. When CARD_CS is pulled low, the SD card listens to the COPI/MOSI line and has control of the CIPO/MISO line.njepsen wrote:But what is card_cs used for? I'm guessing it selects SD card on or off?
That's a Data/Command signal used by the display. A display has to be able to accept arbitrary data, including bit patterns that could be commands telling the display what to do. The Data/Command signal tells the display how to handle the signals it hears on the COPI/MOSI line.njepsen wrote:What is the function of D/C ?
- njepsen
- Posts: 3
- Joined: Mon Sep 13, 2021 12:35 am
Re: ADAFRUIT ID2050 Display & ESP32
Thanks Mike. Your comments are a big help.
(my reference to I2c was a typo. I meant SPL.)
I have since consulted the HDX8357D data sheet and found the cct diag for the Adafruit 2050, the D/C is now clear to me. As I'm running out of IO I've decided to add an SPI expander (MCP23S18) to my board which will give me 16 more I/O and i dont need to cut corners with talking to the display.
(my reference to I2c was a typo. I meant SPL.)
I have since consulted the HDX8357D data sheet and found the cct diag for the Adafruit 2050, the D/C is now clear to me. As I'm running out of IO I've decided to add an SPI expander (MCP23S18) to my board which will give me 16 more I/O and i dont need to cut corners with talking to the display.
Please be positive and constructive with your questions and comments.