Giter VIP home page Giter VIP logo

Comments (17)

MockbaTheBorg avatar MockbaTheBorg commented on August 21, 2024

Hi Derryuk,

RunCPM initializes the DUE card using this code:

#else // Arduino DUE
  SdFatEX SD;
  #define SDINIT 4
  #define LED 13
  #define LEDinv 0
  #define BOARD "ARDUINO DUE"
#endif

Which means it will use Pin4 for accessing the SD card.
I have found this document: https://www.mouser.com/catalog/specsheets/A000056_DATASHEET.pdf
Which seems to be for a similar board, and suggests that it indeed should use Pin4, however I am not 100% sure this is the board you have.
Which example is working fine with the card reader? Maybe you can use the same init code and see if it works?
Which model of the Arduino Due you have? Is it the original Arduino one or a replica?
Mine is this one: https://store.arduino.cc/usa/due
Yours should look similar.

Also, make sure it is a Due, not the Duemilanove, they are different, have different processors and memory amounts (and probably SD card pins).

Let me know if any of the above helps, if not we think of something else.

Cheers!

from runcpm.

derryuk avatar derryuk commented on August 21, 2024

My interface card looks identical to your datasheet apart from the name in the top LH corner. I was using a clone DUE but switched to a genuine DUE with the same result.

The code I use is the same as yours apart from I get an error message with SdFatEX but SdFat works. The error I get is (end of the message file):

<<Using library SPI at version 1.0 in folder: C:\Users\I3 Nas\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\libraries\SPI
Using library SdFat-master at version 1.1.0 in folder: C:\Users\I3 Nas\Documents\Arduino\libraries\SdFat-master
exit status 1
'SdFatEX' does not name a type>>

from runcpm.

MockbaTheBorg avatar MockbaTheBorg commented on August 21, 2024

To use SdFatEx you need to make a few changes to the library .h file.
Take a look a the readme, the procedure should be there.
Let me know if it works.

from runcpm.

drawkula avatar drawkula commented on August 21, 2024

To use SdFatEx you need to make a few changes to the library .h file.
Take a look a the readme, the procedure should be there.
Let me know if it works.

https://github.com/MockbaTheBorg/RunCPM/blob/master/RunCPM/RunCPM.ino#L6-L9

from runcpm.

derryuk avatar derryuk commented on August 21, 2024

I added to two configs to the end of SdFatConfig.h but I get the same error message.

from runcpm.

MockbaTheBorg avatar MockbaTheBorg commented on August 21, 2024

Not sure if adding to the end of SdFatConfig.h would help. You might need to change them in-place.
Lines 71 and 87 I think, if you are using the latest SdFat library.

from runcpm.

derryuk avatar derryuk commented on August 21, 2024

OK, found those two lines and replaced them but still getting the same error message.

from runcpm.

derryuk avatar derryuk commented on August 21, 2024

Just to check I deleted the SDfat libray, reloaded it ver 1.1.0 edited the config file again but still the same error.

from runcpm.

MockbaTheBorg avatar MockbaTheBorg commented on August 21, 2024

Maybe you have two copies of the same library? One overriding the other?
On mine I did use the Arduino's library manager, and made sure I had no other folder on Documents\Arduino.

from runcpm.

derryuk avatar derryuk commented on August 21, 2024

No just the one now, in the early days I managed to have two so am aware of that. I'll keep rereading the documentation and trying things and see if anything turns up and I also have some 6 pin SD card holders so I may try connecting one of those rather than use a shield.

Thanks for your help and guidance.

Derry.

from runcpm.

derryuk avatar derryuk commented on August 21, 2024

Now I remember that when I first tried running a library program it worked so I tried it again and this time it faile. See attached text file. So I removed the current SD library and reinserted the original. It worked again.
Any guidance at what I should look at please?
RunCPM errors and fixes.txt

from runcpm.

MockbaTheBorg avatar MockbaTheBorg commented on August 21, 2024

So ... the only way I imagine to fix this would be to actually debug the library, and for that I cannot help much as I am an user of the library myself.
My feeling is that you have some conflict, probably caused by upgrading/replacing multiple libraries over time.
This may be an overkill, but I would uninstall the whole thing, including Arduino, and including the libraries under the documents/arduino folder, then do a minimal "vanilla" install adding SdFat from the library manager (1.1.0).
This should get you to the same status that I am, as this is exactly what I did on my environment.
I literally just installed Arduino and went to the library manager to install SdFat (1.1.0).
Then changed the two lines to 1, compiled RunCPM and it works right away.
Other than this I can only think about a bad card, or not so standard card, which could require different clock speeds to work, or something like that.

from runcpm.

derryuk avatar derryuk commented on August 21, 2024

Well I had similar thoughts so the other day I ordered a 128Mb SD card. Deleted the old Arduino installation and any file on drive c with SD/Arduino/RunCPM in it's name and ran CCleaner twice.

Reinstalled the Arduino IDE and library SDFat 1.1.0. and the results are the same - SD library examples work and SDFat does not. As I didn't use RunCPM I didn't change SDFatconfig my thinking being the SDFat examples should work out of the box.

New 128Mb SD card and library example results.txt

You mention that your system works OK was the IDE/library/RunCPM install done recently? Do your SDinfo library examples both work?

Normally I would build my own SDcard holder and connector and try that but the fact that the SD library exaples work puts me off.

from runcpm.

MockbaTheBorg avatar MockbaTheBorg commented on August 21, 2024

Yes, this is indeed very strange. I am travelling this week, with no access to my lab, but I will definitely check the examples when I get home.
Even though it would be even stranger if the examples didn't work for me (a reversed situation).
The fact that the examples work might mean we are missing something very obvious, or so simple that we are overlooking it.
Make sure you look inside RunCPM.ino, to see if all the #define are making sense.
I am pushing one extra change to the code tonight, small change, nothing related to the Arduino, but just go ahead and grab that one. At least it is the latest.
There has to be something hiding eluding us.

from runcpm.

derryuk avatar derryuk commented on August 21, 2024

Tried your latest and no change.

Thanks for your help.

from runcpm.

MockbaTheBorg avatar MockbaTheBorg commented on August 21, 2024

Just to be sure I have tested again tonight. All works fine.
At this point I am not sure anymore what it could be.
It might be something very simple, and we are not seeing it.

from runcpm.

MockbaTheBorg avatar MockbaTheBorg commented on August 21, 2024

Closing this one as "Can't reproduce / Can't fix".
Feel free to reopen if more clues appear.

from runcpm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.