In SX Microcontrollers, SX/B Compiler and SX-Key Tool, g_daubach wrote: Keith, I absolutely agree with Peter - when your code is getting 10% of the data accurate, it is not working at all. To name it "working code", it must get 100% of the data (you also can't say that a woman is just a bit pregnant). The fact that 10% of the data is correct can only tell you that your approach might be the right one but that it requires a lot of refinements to make it work perfectly. I don't have one of these vintage floppy drives here, and I assume Peter doesn't have one either. Therefore, his and my code examples are a bit of theoretical nature and we can't test them in reality. When I prepared my code samples for you, I wanted to share with you some ideas of different approaches to solve your problem, and I assume Peter's intention was the same. Peter's idea to test the contents of the RTCC at the very beginning of the ISR to determine if an edge or an RTCC roll-over has caused the interrupt is a very interesting approach, and I like it. IMO, what is happening in this tread right now is "brainstroming", i.e. collecting various ideas how your problem could be solved, In the end, it is up to you to decide which bits and pieces can be combined to get the job done. OK, I got you - your major question was how to debug the code you had initially posted - to be honest, my answer is: "I have no idea". Using the SX-Key debugger's breakpoint feature can't really help with such a real-time application. As Peter mentioned, the only way might be to simulate the MFM raw data with a manually actuated push button while going through the code step by step each and every instruction to verify if it works as it should. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=78490#m79252 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)