Comments (17)
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.
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.
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.
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.
I added to two configs to the end of SdFatConfig.h but I get the same error message.
from runcpm.
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.
OK, found those two lines and replaced them but still getting the same error message.
from runcpm.
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.
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.
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.
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.
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.
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.
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.
Tried your latest and no change.
Thanks for your help.
from runcpm.
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.
Closing this one as "Can't reproduce / Can't fix".
Feel free to reopen if more clues appear.
from runcpm.
Related Issues (20)
- CR vs CR LF problem with Lua? HOT 4
- Problem with v5.8 under Linux/armbian/Raspbian HOT 8
- [Question] MBASIC and TPA Size 60K <-> 64K HOT 1
- [Info] Flashing LED waiting for serial connect HOT 1
- ESP32 C3 Support HOT 5
- Build errors in cpm.h HOT 4
- Allow RunCPM to be used as a Github Action for SUBMIT jobs. HOT 4
- COPY program HOT 5
- Transverse (copy/execute) between slices HOT 1
- Going Crazt HOT 4
- CCP-ZCP3.60K HOT 1
- Feature request: Console on ESP32 TTL Serial port HOT 9
- BASIC/Z compiler not supported HOT 3
- NULU open lbr files does not work HOT 9
- saving/loading Problem with HEBAS under RunCPM HOT 2
- Bdos Err on M: Select when I try ASM DUMP.ASM HOT 2
- ESP32-Wrover kit freeze HOT 8
- Request: Simple variation on LED.BAS as a Hello World using BDOS 9 HOT 3
- [Q] Difference for RunCPM between TYPE and TYPE in a .SUB? HOT 4
- [Q] How about updateing to LUA v5.4.6? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from runcpm.