Comments (6)
Yes, ArduDOS does not automatically detect a disk change. This is shown in the list of limitations (item 3): https://github.com/dhansel/ArduinoFDC#ardudos
To notify ArduDOS that the disk has changed, re-select the curent drive (e.g. "a:" followed by ENTER).
from arduinofdc.
Laziness :) I was focused on reading/writing the actual data, which is what the ArduinoFDC library is about. Adding ArduDOS was just an idea to demonstrate what can be done using the library.
Checking whether the disk has changed is not hard. Just connect pin 34 [edit: incorrectly said pin 33 before] of the floppy cable to an unused Arduino pin. In the sketch, call pinMode(pin, INPUT_PULLUP)
to configure the input pin. Then you can use if( digitalRead(pin)==LOW ) { /* disk change detected */ }
to detect the change.
Note that the pin will continue reading LOW until you clear the "disk change" flag in the drive. The only way to clear that flag is to move the disk drive head. So you'll have to (attempt to) read some sector data on a track different from the one that the head is currently on.
from arduinofdc.
Thank you for your quick reply :) and my apologies, I must not have read.
I think you can close the topic. Regards.
from arduinofdc.
Or not. :)
What is the reason for the lack of detection?
from arduinofdc.
heh... I see, I asked because I thought it was something more complicated :)
By the way, thanks for giving the way.
However... pin 33? isn't that GND by any chance? ;)
I noticed, while looking for information about the DSKCHG# signal (i.e. pin 34), that - according to Wiki - it's an input pin, which surprises me a bit, that you set pinMode()
to INPUT_PULLUP
no but.... there's always a chance that there's an error in the Wiki :)
from arduinofdc.
Oops sorry yes I meant pin 34. I fixed it in my original comment so as to not misinform anybody reading this thread. Thanks for the correction!
from arduinofdc.
Related Issues (14)
- Extension for HD possible? HOT 24
- Custom Format Problem HOT 12
- Very slow xmodem transfer, errors HOT 2
- Problem when compile the code HOT 2
- problem HOT 2
- Migrate to stm32 HOT 2
- USB mass storage Uniform Floppy Interface device class HOT 6
- Compile error HOT 12
- Support for old FM Formats and different Sector sizes ?? HOT 11
- FormatDisk hangs forever HOT 2
- HD Floppy doesn't work without formating it in low leve disk mode HOT 2
- Power connection? HOT 3
- Constantly getting Error #1: Low-level disk error HOT 4
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 arduinofdc.