Jump to content
  • 0

MTDS LCD How to use the Alt CS ?


Tbreak

Question

A previous thread noted use on the Arduino Mega seemed imposable because there is no obvious easy way to change the CS pin in the software libraries. My attempts to find what code needs changing and the attempts in the previous threads attempts, result in the display performing a short flash and then going black/dead. I do need to solve this as Digilents DMM card that I also need in my project uses the same CS as this LCD. This previous thread had an official response of 'oops perhaps it is not Arduino Mega compatible we had better take it out of the brochure web pages'. 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

I can now answer my own question. It is not a 'nice' solution but it works and may help others. 

The following would seem to be the logical way to change to using the Alt CS on this LCD shield but this fails.

bool MTDS::begin() {

//    return begin(pinMtdsSelStd, frqMtdsSpiDefault);
    return begin(pinMtdsSelAlt, frqMtdsSpiDefault);  // My change for alternate pin selection

}

In MtdsHal.h  there is code to define the two IO pins used for CS,   pinMtdsSelStd and pinMtdsSelAlt,  for various types of hardware.  

Following all these #'define if elses,  just force the library to always use the Arduino Uno's IO pin 8 by redefining everything the  ' if elses' have setup. 

#define    pinMtdsSelAlt        8
#define    pinMtdsSelStd       8

Do not bother alter the MTDS::begin() code.

 

 

 

 

Link to comment
Share on other sites

Sadly I've progressed to see this hardware is not reliable on the Arduino. Hit and miss if it decides to work, I suspect depending on what it was doing when last powered off. This is work and not a hobby so I cant waste more time on it. I've now ordered a display from a different company.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...