3.5" TFT LCD - freeing up analogue input

Hi,

I have a display from eBay similar to this one

It all works fine with MCUFRIEND_kbv version: 2.9.8 (cames as ID = 0x6814).

The only problem I have is that standard configuration uses 4 out of 5 Analogue inputs and I would like to use at least 2 for my application.

Could anybody advise a way to reduce analogue input number by using software reset or moving reset to Arduino reset? I am also not planning to use a touch screen, would that allow to reduce the need for analogue inputs?

Much appreciate your help.

Thanks.

Oh, I love this Forum. You just finish typing a reply and it signs you out.

The easiest solution is to buy a Uno clone like this with extra header holes and extra ADC pins A6, A7.

Or I like 3.3V/5V switchable Uno clone but unfortunately does not have extra A6, A7

You can make a hardware mod to the shield to free up A4. This is normally done for I2C on a Uno.

Alternatively you can use a Due or Nucleo. A Mega2560 works but is really SLOW.

David.

I appreciate I can buy different Arduino however would be nice to utilise what I've got.

Sorry for jumping into creating a new post without properly searching through the forum, I will have a look now.

If connecting display with jumpers rather than as a shield, would that allow to free up some inputs then modifying drivers?

Regards,

Darijua

God invented shields so that all the male pins could find corresponding female sockets.

If you use jumpers there are a lot of wires to mate correctly. It is very important to use 3.3V pin.
Yes, you could hand-wire LCD_RD, LCD_CS, LCD_RST to PORTB.

LCD_WR, LCD_RS are commonly shared with Touch panel. It is wise to leave on Analog pins.

It is easy to write your own SPECIAL. Just change the defines for LCD_RD, LCD_CS, LCD_RST to PORTB

It takes a while for a Uno clone to arrive from China.
Pay local prices and you can buy most clones locally.
It is money well spent.

David.

Thanks David,

It much more clear now.

Let me ask one more question please. Is it possible not to use any of analogue inputs at all rather than transfering them to digital? I mean if touch screen is not required, is there any pins that are surplus then?

Thank you.

Best regards,

Darijus

You can use any pins for control if you don't use the Touch screen.

david_prentice:
You can use any pins for control if you don't use the Touch screen.

What I mean is, Do I still need all 5 analogue signals on top of 8 digital to control LCD even if Touch screen is not used?

Yes. Look at the pin names.

Write down your pin budget.

Thanks David,

I think I need to get back to drawing board and rethink what I have and what better to buy instead of just trying to use what is sitting on my shelf.

Basically what I am trying to do is to use Arduino and LCD to measure voltage of 2 batteries (through voltage divider), then connect 2 DHT22 to measure inside/outside temperature and humidity. Also would like to keep option to load bmp as screensaver.

I wrote a code for screen saver, dht22 and everything seems fine, but as only 2 digital and 1 analog input left, I used both digital for DHT22s and one for one voltage so now struggling to measure the second battery.

Budget is not important too much, couple tens of pounds one or another way won't make much difference, just was trying to use what I have.

Best regards,

Darijus