Thomasx Posted March 8, 2018 Share Posted March 8, 2018 Hi I just got the MTDS, running it with my Mega ADK. However, when I try the MyDispDemo sketches, the MTDS will just blink once and then be all black, backlight on. I just keep getting "mydisp.begin() failed" What could the issue be? Thanks, Thomasx Link to comment Share on other sites More sharing options...
Thomasx Posted March 8, 2018 Author Share Posted March 8, 2018 Ok. I'll answer myself and follow up with another question. So I changed the CS pinning in the MtdsHal.H file. Hard-coded them to 8 and 10, ALT_CS and CS, respectively. And what do you know, it started working Now, you need to consider me a newbie at this (so don't ask how I figured that out ) Now my question is: Since hard coding like this in the library h-file isn't really a smart thing to do, quoting out all the "if defined"-stuff. How do I go about fixing this issue in a proper way? Thanx, Thomas Link to comment Share on other sites More sharing options...
JColvin Posted March 8, 2018 Share Posted March 8, 2018 Hi @Thomasx, What I would do (I don't have a Arduino Mega ADK so I can't confirm functionality) is I would add a new set of #if defined set for the ADK in that same MtdsHal.h. Since it appears that it is based of the AT MEGA 2560, I would probably add in the following lines after line 55 (the one just before the "#endif" after the "#define pinMtdsSelStd SS // standard SPI SS pin"). #elif defined(__AVR_ATmega2560__) #define pinMtdsSelStd 10 This provides a non-hard coded way to add in the functionality; what I suspect is occurring on your board is that it expects the chip select pin to be in a different location, though I am not certain where it thinks it is for the Mega ADK; probably on pin 53. Let me know how this works. Thanks, JColvin Link to comment Share on other sites More sharing options...
Thomasx Posted March 8, 2018 Author Share Posted March 8, 2018 Ok, thanks. Clearly someplace else, anyway There aren't any board specific defines in this h-file, as far as I can understand. It seems to me the assignment of the correct CS pin is made via PIN_DSPI0_SS which is set to board specific values someplace else. So I was thinking that's where the proper place would be to add the info for the Mega ADK board. But I guess your way will work too. I'll give it a try. Link to comment Share on other sites More sharing options...
Question
Thomasx
Hi
I just got the MTDS, running it with my Mega ADK.
However, when I try the MyDispDemo sketches, the MTDS will just blink once and then be all black, backlight on.
I just keep getting "mydisp.begin() failed"
What could the issue be?
Thanks, Thomasx
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.