Giter Club home page Giter Club logo

Comments (6)

dhansel avatar dhansel commented on August 21, 2024 1

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.

dhansel avatar dhansel commented on August 21, 2024 1

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.

GSoftwareDevelopment avatar GSoftwareDevelopment commented on August 21, 2024

Thank you for your quick reply :) and my apologies, I must not have read.

I think you can close the topic. Regards.

from arduinofdc.

GSoftwareDevelopment avatar GSoftwareDevelopment commented on August 21, 2024

Or not. :)

What is the reason for the lack of detection?

from arduinofdc.

GSoftwareDevelopment avatar GSoftwareDevelopment commented on August 21, 2024

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.

dhansel avatar dhansel commented on August 21, 2024

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)

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.