Saturday, September 6, 2014

Ferrite Core Memory

I read Mark's blog posting on Brainwagon about rope core memory and it's relation to the Apollo program with great interest, I have always been a fan if this tech. I also found another great posting on Wayne's blog HERE searching for other core memory stuff.

I set out to duplicate Wayne's work but tried to do it with only off the shelf modules and really no circuit building. I did want to step it up a little so I did build a 4-bit core memory unit.

I obtained my cores just as Wayne did, from eBay. It took a few weeks for the cores to ship but they came in a very small package from Bulgaria. The extra URLs that Mark provided in his posting gave me the pattern for my 4-bit core array. I used a proto board PCB to make a tiny breakout  assembly with header pins to allow me to plug it into a standard breadboard. My idea is to use a standard L298N motor controller board instead of building a driver circuit from scratch like Wayne.
The L298N boards are very available and I use them to drive both relays and motors. For the 4-bit array you would just need two of these boards. Here is the basic hook-up with two boards. Note; You will need a load resistor in each motor line (4 total) to limit the current, I use a 10 ohm resistor with 5 volts just like Wayne.

I lashed up a single L298N board to one core initially to see if it would work and I pretty much duplicated Wayne's results.



I am pulsing to the core three times just as Wayne did, first to set it to a "1" then followed by two pulses writing it to "0". On the scope I am displaying the three sync pulses (top trace) and the output of the sense wire (bottom trace), note the noise too. The sync pulse line is separate from the drive lines to be used with the scope, in the code this is PIN 12. The sync is just for the scope to use since the drive lines change polarity making the display not as clean. 

You can see I get the "kickback" on the "0" to "1" transition (first pulse) and then the "1" to "0" (second pulse), but not the "0" to "0" transition. My sense signal had an amplitude of about 50 mV with a 1 microsecond pulse length. The X/Y core pulses are about 8 microseconds long and the "kickback" occurs at about 6 microseconds from the leading edge, this would be the window to look for the read data to avoid the noise that you can see on trace two.

So with just a basic Arduino UNO and a L298N motor control board you can build Wayne's 1-bit wonder. You do also need a 10 ohm resistor in each motor line and a separate 5 volt power supply that can deliver at least 1 Amp but that is it!

I am not sure if I will expand mine to use the full 4-bits of the array and/or build a sense amplifier to read the data but it was fun to experiment with this piece of computer history. Here is my code for my 1-bit wonder, enjoy!


 /* Core Memory Experiment  
   
 Core Memory experiment using a L298N H-Bridge motor interface  
   
 Single Bit Core  
   
 Set the Core to "1" state then "0" state then "0" and repeat at the cycleDelay rate  
   
 */  
 int pin8 = 8;  
 int pin9 = 9;  
 int pin10 = 10;  
 int pin11 = 11;  
 int pin12 = 12;  
   
 int cycleDelay = 150;  
   
 // the setup routine runs once when you press reset:  
 void setup() {          
  // initialize the digital pin as an output for motor controler  
  pinMode(pin8, OUTPUT);   
  pinMode(pin9, OUTPUT);   
  pinMode(pin10, OUTPUT);   
  pinMode(pin11, OUTPUT);   
  pinMode(pin12, OUTPUT);   
 }  
   
 // Loop the single core with 1-0-0 repeat  
 void loop() {  
  delayMicroseconds(cycleDelay); // cycle delay time  
    
  // Set Core to "1" state  
  digitalWrite(pin12, HIGH);  
  digitalWrite(pin11, HIGH);  
  digitalWrite(pin9, HIGH);  
  //onDelay ~8 microseconds  
  __asm__("nop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\t");  
  __asm__("nop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\t");  
  __asm__("nop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\t");  
  __asm__("nop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\t");  
  __asm__("nop\n\t");  
  digitalWrite(pin12, LOW);  
  digitalWrite(pin11, LOW);  
  digitalWrite(pin9, LOW);  
  //offDelay ~8 microseconds  
  __asm__("nop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\t");  
  __asm__("nop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\t");  
  __asm__("nop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\t");  
  __asm__("nop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\t");  
  __asm__("nop\n\t");  
    
  // Set Core to "0" state  
  digitalWrite(pin12, HIGH);  
  digitalWrite(pin10, HIGH);  
  digitalWrite(pin8, HIGH);  
  //onDelay ~8 microseconds  
  __asm__("nop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\t");  
  __asm__("nop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\t");  
  __asm__("nop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\t");  
  __asm__("nop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\t");  
  __asm__("nop\n\t");  
  digitalWrite(pin12, LOW);  
  digitalWrite(pin10, LOW);  
  digitalWrite(pin8, LOW);  
  //offDelay ~8 microseconds  
  __asm__("nop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\t");  
  __asm__("nop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\t");  
  __asm__("nop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\t");  
  __asm__("nop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\t");  
  __asm__("nop\n\t");   
    
    
  //Set Core to "0" state  
  digitalWrite(pin12, HIGH);  
  digitalWrite(pin10, HIGH);  
  digitalWrite(pin8, HIGH);  
  //onDelay ~8 microseconds  
  __asm__("nop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\t");  
  __asm__("nop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\t");  
  __asm__("nop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\t");  
  __asm__("nop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\t");  
  __asm__("nop\n\t");  
  digitalWrite(pin12, LOW);  
  digitalWrite(pin10, LOW);  
  digitalWrite(pin8, LOW);  
  //offDelay ~8 microseconds  
  __asm__("nop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\t");  
  __asm__("nop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\t");  
  __asm__("nop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\t");  
  __asm__("nop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\t");  
  __asm__("nop\n\t");  
 }  
   

No comments:

Post a Comment