Author Topic: help! how to make a nsc800 computer?  (Read 67855 times)

0 Members and 1 Guest are viewing this topic.

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #100 on: June 06, 2016, 03:36:39 pm »
i connected the A0-7 PINS to 2 74ls161 4-bit BCD binary counters in series and connected it's clock to pin 10 of the arduino,  so i only use one pin of the arduino ,
maybe i will do the same with the A8-12 so no more dip switchs again!
here is the code, any ideas of code optimization or operation optimization will be welcomed, thanx for all help guys :-+
code:

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);      // open the serial port at 9600 bps:
  pinMode(13,OUTPUT); //CLOCK
  pinMode(12,OUTPUT); //SHIFT-LOAD
  pinMode(11,INPUT);  //QH OUT
  pinMode(10,OUTPUT);  //QH OUT
}

#define CLOCK 13   // 74LS166 CLOCK
#define SHFTLD 12  //         SHIFT/LOAD
#define DATIN 11   //         QH
#define CCLK 10   // COUNTER CLOCK
 
void loop(){
    digitalWrite(CCLK,HIGH); // COUNTER CLOCK needs a rising edge to count
    delay(10);
    digitalWrite(CCLK,LOW);  // COUNTER CLOCK low
    delay(10);
    int i;             
    digitalWrite(SHFTLD,LOW);     // 'parallel load' mode
    delay(10);
    digitalWrite(CLOCK,HIGH);
    delay(10);
    digitalWrite(CLOCK,LOW);      // clock the parallel inputs into the shift register
    delay(10);
    int val =digitalRead(DATIN);  // read the 1st bit at QH
    Serial.print(val,OCT);        // print the 1st bit
    digitalWrite(SHFTLD,HIGH);    // 'shift' mode
    delay(10);
    for (i=1; i<=7; i++){             // another 7 bits to read
        digitalWrite(CLOCK,HIGH);
        delay(10);
        digitalWrite(CLOCK,LOW);      // shift the next bit to QH
        delay(10);
        int val =digitalRead(DATIN);  // read the next bit
        Serial.print(val,OCT);        // print the next bit
    }
    Serial.println();
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #102 on: June 07, 2016, 12:53:09 pm »
Any ideas to make the output in the serial monitor easier to record?
 

Offline Bruce Abbott

  • Frequent Contributor
  • **
  • Posts: 627
  • Country: nz
    • Bruce Abbott's R/C Models and Electronics
Re: help! how to make a nsc800 computer?
« Reply #103 on: June 07, 2016, 09:18:13 pm »
Any ideas to make the output in the serial monitor easier to record?
Maintain a counter for the address. Start at address 0x0000 and reset the LS166's. Print the address, followed by a ':'.  Collect all the bits of each byte into a single number. Read 16 bytes and store them in an array, and print them out in Hex (all on the same line, with a space before each number). Then print the 16 bytes again as ASCII chars (changing any char below SPACE or above '~' to a '.', to avoid printing control codes).  Now send CR+LF (newline) and repeat to do the next 16 bytes. Stop when the address counter gets to the size of your ROM.


 
 
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #104 on: June 11, 2016, 05:40:56 pm »
Maintain a counter for the address. Start at address 0x0000 and reset the LS166's. Print the address, followed by a ':'.  Collect all the bits of each byte into a single number.
so should i reset all both the counters and the shift register, because that's what i did, and for output printing  should it be like:
the cell value : the 8-bit binary | hex | ASCII
or something like this ?
Read 16 bytes and store them in an array, and print them out in Hex (all on the same line, with a space before each number). Then print the 16 bytes again as ASCII chars (changing any char below SPACE or above '~' to a '.', to avoid printing control codes).  Now send CR+LF (newline) and repeat to do the next 16 bytes. Stop when the address counter gets to the size of your ROM.
not quit sure how should i do it am quit confused   :(
I'm a newbie at programing  :-\
so please excuse me...
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #105 on: June 11, 2016, 05:45:18 pm »
code:
void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);      // open the serial port at 9600 bps:
 
  //-----PIN SETUP------//
  pinMode(13,OUTPUT); //74LS166 CLOCK
  pinMode(12,OUTPUT); //SHIFT-LOAD
  pinMode(11,INPUT);  //QH OUT
  pinMode(10,OUTPUT);  //74LS161 CLOCK
  pinMode(9,OUTPUT);  //RESET ALL BOTH COUNTERS AND SHIFT REGESTER
  //-----PIN SETUP------//
 
  //-----RESET CYCLE OF BOTH COUNTERS AND SHIFT REGESTER------//
  digitalWrite(9,LOW);
  delay(50);
  digitalWrite(9,HIGH);
 //-----RESET CYCLE OF BOTH COUNTERS AND SHIFT REGESTER------// 

}

#define CLOCK 13   // 74LS166 CLOCK
#define SHFTLD 12  //         SHIFT/LOAD
#define DATIN 11   //         QH
#define CCLK 10   // 74LS161 CLOCK
 
void loop(){
    digitalWrite(CCLK,HIGH);
    delay(10);
    digitalWrite(CCLK,LOW);   
    int i;             
    digitalWrite(SHFTLD,LOW);     // 'parallel load' mode
    delay(10);
    digitalWrite(CLOCK,HIGH);
    delay(10);
    digitalWrite(CLOCK,LOW);      // clock the parallel inputs into the shift register
    delay(10);
    int val =digitalRead(DATIN);  // read the 1st bit at QH
    Serial.print(val,OCT);// print the 1st bit
    digitalWrite(SHFTLD,HIGH);    // 'shift' mode
    delay(10);
    for (i=1; i<=7; i++){             // another 7 bits to read
        digitalWrite(CLOCK,HIGH);
        delay(10);
        digitalWrite(CLOCK,LOW);      // shift the next bit to QH
        delay(10);
        int val =digitalRead(DATIN);  // read the next bit
        Serial.print(val,OCT);        // print the next bit
    }
     
    Serial.println();

 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #106 on: June 12, 2016, 12:10:54 pm »
wait i kinda got hold of it but still not reading it properly I'm still missing the cell location and the 16 byte reading...
code:
void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);      // open the serial port at 9600 bps:
 
  //-----PIN SETUP------//
  pinMode(13,OUTPUT); //74LS166 CLOCK
  pinMode(12,OUTPUT); //SHIFT-LOAD
  pinMode(11,INPUT);  //QH OUT
  pinMode(10,OUTPUT);  //74LS161 CLOCK
  pinMode(9,OUTPUT);  //RESET ALL BOTH COUNTERS AND SHIFT REGESTER
  //-----PIN SETUP------//
 
  //-----RESET CYCLE OF BOTH COUNTERS AND SHIFT REGESTER------//
  digitalWrite(9,LOW);
  delay(50);
  digitalWrite(9,HIGH);
 //-----RESET CYCLE OF BOTH COUNTERS AND SHIFT REGESTER------// 

}

#define CLOCK 13   // 74LS166 CLOCK
#define SHFTLD 12  //         SHIFT/LOAD
#define DATIN 11   //         QH
#define CCLK 10   // 74LS161 CLOCK
 
void loop(){
    digitalWrite(CCLK,HIGH);
    delay(10);
    digitalWrite(CCLK,LOW);   
    int x;
    int i;             
    int ByteArray[8];
    digitalWrite(SHFTLD,LOW);     // 'parallel load' mode
    delay(10);
    digitalWrite(CLOCK,HIGH);
    delay(10);
    digitalWrite(CLOCK,LOW);      // clock the parallel inputs into the shift register
    delay(10);
    int val =digitalRead(DATIN);  // read the 1st bit at QH
    ByteArray
  • = val;//assign a value to  ByteArray

    Serial.print(val,OCT);// print the 1st bit
    digitalWrite(SHFTLD,HIGH);    // 'shift' mode
    delay(10);
    for (i=1; i<=7; i++){             // another 7 bits to read
        digitalWrite(CLOCK,HIGH);
        delay(10);
        digitalWrite(CLOCK,LOW);      // shift the next bit to QH
        delay(10);
        int val =digitalRead(DATIN);  // read the next bit
        for(x=0; x<=7;x++){
        ByteArray
  • = val;//assign a value to  ByteArray

        }
        Serial.print(val,OCT);        // print the next bit
        }
     Serial.print(" | ");
     int ReadByteArray = ByteArray
  • ;

     Serial.print(ReadByteArray,HEX);
     Serial.print(" | ");
     Serial.print(ReadByteArray);
    Serial.println();

 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #107 on: June 13, 2016, 10:55:29 pm »
still not quit working...
code update:

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);      // open the serial port at 9600 bps:
 
  //-----PIN SETUP------//
  pinMode(13,OUTPUT); //74LS166 CLOCK
  pinMode(12,OUTPUT); //SHIFT-LOAD
  pinMode(11,INPUT);  //QH OUT
  pinMode(10,OUTPUT);  //74LS161 CLOCK
  pinMode(9,OUTPUT);  //RESET ALL BOTH COUNTERS AND SHIFT REGESTER
  //-----PIN SETUP------//
 
  //-----RESET CYCLE OF BOTH COUNTERS AND SHIFT REGESTER------//
  digitalWrite(9,LOW);
  delay(50);
  digitalWrite(9,HIGH);
 //-----RESET CYCLE OF BOTH COUNTERS AND SHIFT REGESTER------// 

}

#define CLOCK 13   // 74LS166 CLOCK
#define SHFTLD 12  //         SHIFT/LOAD
#define DATIN 11   //         QH
#define CCLK 10   // 74LS161 CLOCK
 
void loop(){
    digitalWrite(CCLK,HIGH);
    delay(10);
    digitalWrite(CCLK,LOW);   
    int x;
    int i;             
    int ByteArray[8];
    digitalWrite(SHFTLD,LOW);     // 'parallel load' mode
    delay(10);
    digitalWrite(CLOCK,HIGH);
    delay(10);
    digitalWrite(CLOCK,LOW);      // clock the parallel inputs into the shift register
    delay(10);
    int val =digitalRead(DATIN);  // read the 1st bit at QH
    ByteArray
  • = val;//assign a value to  ByteArray

    Serial.print(val,OCT);// print the 1st bit
    digitalWrite(SHFTLD,HIGH);    // 'shift' mode
    delay(10);
    for (i=1; i<=7; i++){             // another 7 bits to read
        digitalWrite(CLOCK,HIGH);
        delay(10);
        digitalWrite(CLOCK,LOW);      // shift the next bit to QH
        delay(10);
        int val =digitalRead(DATIN);  // read the next bit
        for(x=0; x<=7;x++){
        ByteArray
  • = val;//assign a value to  ByteArray

        }
        Serial.print(val,OCT);        // print the next bit
        }
     Serial.print(" | ");
      for(x=0; x<=7;x++){
      int ReadByteArray = ByteArray
  • ;

      Serial.print(ReadByteArray,HEX);
      }
    Serial.print(" | ");
      for(x=0; x<=7;x++){
      int ReadByteArray = ByteArray
  • ;

      Serial.print(ReadByteArray);
      }
    Serial.println();

 
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #108 on: June 14, 2016, 11:22:10 am »
see this:
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #109 on: June 16, 2016, 02:17:56 am »
I would suggest that you read what is on this link and what this page links to.
https://www.arduino.cc/en/Reference/HomePage

Such that you know what exists on those pages and can go back for details when needed.

Start a new sketch to do what Bruce Abbott suggested.
1. do not try to talk to hardware at first, you are just trying to get the format correct.
2. You have an address counter and in future will have a data byte from eprom. For now just use a varable for the eprom data byte.
3. When you increment the address counter also increment the eprom data byte while keeping it in range of 0-255 or 0-FF hex.
4 USE FUNCTIONS

When you get this matching what Bruce said
5 add a function to output address to chips driving address lines on eprom.  Run program again, verify output to PC did not change and address lines to eprom are changing properly.

6. comment out the call to function that does #3 and add function that reads data from eprom.

Do small changes to program that you can test by running the program again.

 
The following users thanked this post: ali6x944

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #110 on: June 22, 2016, 01:27:35 pm »
is it possible to use an EPCI to talk with the e prom instead of the arduino then send what the EPCI to the arduino using UART?
because i found it in the same pcb as all the uv e proms and S RAMs  I have salvaged all the parts  from.
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #112 on: June 22, 2016, 09:08:27 pm »
Also it would mean a one chip solution to this coding madness :scared:
 

Offline Bruce Abbott

  • Frequent Contributor
  • **
  • Posts: 627
  • Country: nz
    • Bruce Abbott's R/C Models and Electronics
Re: help! how to make a nsc800 computer?
« Reply #113 on: June 23, 2016, 12:00:26 am »
is it possible to use an EPCI to talk with the e prom
Engineering, Procurement, Construction, and Installation?
Enhanced Proliferation Control Initiative?
Electronic Payment Certification Institute?
Export Promotion Center of Iran (est. 1965)?

???
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #114 on: June 23, 2016, 10:14:36 am »
 
is it possible to use an EPCI to talk with the e prom
Engineering, Procurement, Construction, and Installation?
Enhanced Proliferation Control Initiative?
Electronic Payment Certification Institute?
Export Promotion Center of Iran (est. 1965)?

???

:-DD
It is Enhanced Programmable Communications Interface
The chip is SCN2661BC1N28.
See datasheet:
https://drive.google.com/folderview?id=0B5vW-k7HbsL4c09XNjBIbDc4Zmc
« Last Edit: June 23, 2016, 10:17:05 am by ali6x944 »
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #115 on: June 23, 2016, 03:21:01 pm »
after all, i think it will work better than shift registers and counters :) 
 

Offline Bruce Abbott

  • Frequent Contributor
  • **
  • Posts: 627
  • Country: nz
    • Bruce Abbott's R/C Models and Electronics
Re: help! how to make a nsc800 computer?
« Reply #116 on: June 23, 2016, 08:24:43 pm »
after all, i think it will work better than shift registers and counters :)
A UART chip? Somehow I don't think it will work any better.
 
Perhaps this will help:- How to read old EPROMs with the Arduino
 
The following users thanked this post: ali6x944

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #117 on: June 23, 2016, 11:38:08 pm »
U are right , I will duplicate the circuit...
Thanx m8 :-+
 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2328
  • Country: 00
Re: help! how to make a nsc800 computer?
« Reply #118 on: June 24, 2016, 11:08:45 am »
This board will help you on do all those crazy interfaces on same place

https://world.taobao.com/item/41676376586.htm?spm=a312a.7700714.0.0.zp9EnP#detail


Ps you will need to learn VHL
 
The following users thanked this post: ali6x944

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #119 on: July 19, 2016, 07:47:27 am »
Could it work with 74ls273 instead of the 573 he used in his circuit??
 

Offline Bruce Abbott

  • Frequent Contributor
  • **
  • Posts: 627
  • Country: nz
    • Bruce Abbott's R/C Models and Electronics
Re: help! how to make a nsc800 computer?
« Reply #120 on: July 19, 2016, 09:21:05 pm »
Could it work with 74ls273 instead of the 573 he used in his circuit??
Yes. The 273 clocks data in when pin 11 goes from low to high rather than latching when it goes low, but that doesn't matter in this case because the program works with either method. 

The only major difference is the 273 has /RESET on pin 1 rather than /OE, so you must connect this pin to +5V not ground.  Also the pinouts of the data lines are different. The 573 has all inputs on one side and outputs on the other, but the 273 has them going alternately one way and the other.

To avoid getting confused you should draw a circuit diagram with the correct pin numbers for the 273, and check your wiring!
 
The following users thanked this post: ali6x944

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #121 on: July 20, 2016, 07:46:32 am »
It didn't give any output I don't quite get what's going on?
See  circuit:
https://drive.google.com/folderview?id=0B5vW-k7HbsL4c09XNjBIbDc4Zmc
green wire is Address bus and vcc
red wire data bus
blue wire is ground
 
« Last Edit: July 20, 2016, 08:04:20 am by ali6x944 »
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #122 on: July 20, 2016, 08:12:32 am »
i also tried it with 74LS374 and it didn't work
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #123 on: July 22, 2016, 04:50:04 am »
I searched in YouTube and I saw this:
https://youtu.be/L1ypfbmYczA
And in the video he mention that he tried to use the processor it self to read the memory....
Is it possible to do what he did?
 

Offline Bruce Abbott

  • Frequent Contributor
  • **
  • Posts: 627
  • Country: nz
    • Bruce Abbott's R/C Models and Electronics
Re: help! how to make a nsc800 computer?
« Reply #124 on: July 22, 2016, 06:00:23 am »
Is it possible to do what he did?
"Fail, fail often - and boy have I been failing hard!".

Quote
It didn't give any output I don't quite get what's going on?...

i also tried it with 74LS374 and it didn't work
It's a very simple circuit and not much can go wrong - if it's hooked up correctly.  Check your wiring.

Quote
See  circuit:
https://drive.google.com/folderview?id=0B5vW-k7HbsL4c09XNjBIbDc4Zmc
I see a lot of red and green wires but no circuit diagram. How can you check your wiring when you don't have a circuit diagram?

 
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf