Using SD card to replace data cassette

kogz23:
First off thanks for all the help and thought you guys have put into helping me. It is greatly appreciated and blows me away! I've been gone dealing with 2 young kids the last few days. No,just load it back into the processor. That was a mistaken setting. The peak to peak off the data waveform is around 5V. Sorry for the misleading photo.
The frequency of the squarewave is 2083hz

The Sequencer saves 2 things to tape. It stores the patch settings and it saves the note information. My guess is that it sends the patch info first, then at the end it sends the note info. The data I recorded always has the same layout: 1/0s, chunk of data, around minute of 1/0s, second chunk of data. I think the long chunk of 1/0s is blank memory. The tape can store several thousand notes, I only put in a few to test. I think this minute of blank space would be filled up if I put in more notes.

So assuming it is Manchester encoding and I do not need to decode the data which way do you think would be best to proceed? Should I deal with it as raw data or go the audio route?

Thanks in advance!

If the data is actually Manchester Encoded, then the data storage volume is known. Since there is a one to one relationship between the waveform and binary data you do not need to store the entire waveform, just the data it represents.

What I am trying, (badly) to explain is that recording and playing back an audio file requires more storage (much more). The WAV file you recorded for a few minutes was 728k of compress data. If we have accurately identified the encoding, the same data would need 500 bytes/sec of storage. less than 30k per minute.

I would do the following:

  • Build an interface between the Sequencer and the Arduino.
  • Write code to convert the audio signal (hopefully actually Manchester encoded Digital) into a byte sequence.
  • Store this byte stream onto a SDcard
  • Read the byte stream from the SDcard
  • Play the byte stream as Manchester data back to the Sequencer

If the signal is actually a 5v p/p digital, (not AC coupled) that makes the interface easy. Directly connect it to two Arduino Pins, one Input, one Output.

The code gets more complex; I still think using interrupts as the basis for your software PLL would be the easiest. As @jremington identified the signal as having a long preamble, some data, long preamble, more data ... Your choices are:

  • Identify the preamble. Instead of storing multiple minutes of a 'known' pattern, just store a marker that represents the preamble (i.e. preamble (45seconds)).
    the actually store a byte stream of the Manchester bit pattern.
  • Or, store the entire bit stream of Manchester data.
    The problem with storing 'RAW' Manchester data, is if your software makes a mistake and inserts or deletes a single bit, does that cause the 'recording' to fail? Or is there some ECC functionality in the bitstream?
  • the Third option is too completely decode the bit stream.
    Decode the Manchester encoding.
    Decode the data format.
    Perform consistency checks of the data, this would allow editing, and generating new content.

The second is the easiest, the third is the 'best', the first is a path to the third.

I would probably do 2, 1, then 3. It all depends on how much effort you want to expend. The simplest would be to replace the cassette drive with another cassette drive.

Chuck.