MIDI player on eight floppy. Or how the electronics engineer went crazy
Once I watched a video about singing flops and a mountain of written-off computers. I decided to do something like that.
Do on Arduino like the rest? Are you serious? F * ck the system, as they say! It was decided to do at Atmega8A , because only she was at hand. Wires are also for wimps, so I found HC-05 (why unnecessary snot?). ')
Go!
Scheme
The first stage, as usual, the scheme. There are no problems with it.
It is simple and without unnecessary frills.
Pay
The board is also done without much stress using photoresist. Scattered in 10 minutes and manufactured in an hour.
PCB layout
Write the code
Now the most interesting thing is programming. I decided to write in C in order to save time. But did not have time to start, as already rake.
Rakes are to manage flops. As you know, if Direct pin = 0, and to give impulses to Step, then the flop steps forward, and if Direct pin = 1, then back, but the flop has only 80 steps. Little what to do? The solution is simple. The flop can do half a step, if you just change the state of Step, rather than pulsing it. Do it better this way:
Step ^= (1<<pin);
The first problem is solved! Further implementation of the entire control function.
Made! Now the timers. We set the timer in CTC mode with division by 8 and enable interrupt by Output Compare (hereinafter OC). In OCR we put 40. About once in 40 microsec an OC event occurs. The interrupt handler is quite capacious.
Now the connection with the computer. Here we do. A string is transmitted with a macro in the header (C / F) -> body (number) -> end of the packet (';'). First, processing through the state machine:
- Well, everything already? - Not! And how to manage?
The control program was broken from scratch, so I added functionality to my Tesla coil control program ( HETC control terminal ). Addiction? Of course. With its interface, you can figure it out yourself, I will not write much. The only thing that you need to select in the beginning is Floppy and the COM port of the device, then Connect.
Yes, it is possible without a biloba, it's just my problem.