Author Topic: help! how to make a nsc800 computer?  (Read 67801 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 #75 on: April 22, 2016, 04:50:24 am »

To read the 27C64 you must have CE and OE (pins 20 and 22) pulled low, and Vpp and /PGM (pins 1 and 27) pulled high. Vpp should be connected directly to Vcc.

will i did that.
With shift/load low it will load the 8 parallel data bits on each clock but it won't shift the bits, so you will just get Q7 over and over. You need to pull shift/load low and apply 1 clock to load the register and get Q7, then pull it high and clock out the other 7 bits.

sorry but i didn't quit get it, should i connect the clock pin to shift/load pin?
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #76 on: April 22, 2016, 01:22:49 pm »
Or shall I feed it the inverse of the clock?
 

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 #77 on: April 22, 2016, 06:52:30 pm »
You need to control Shift/Load and Clock individually with different pins.
 
 
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 #78 on: April 23, 2016, 05:25:51 am »
oh... ok
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #79 on: May 03, 2016, 06:26:17 pm »
Amusingly I found the board this chip was in...
Hoched it up  to power every thing up:
See images:
https://drive.google.com/file/d/0B5vW-k7HbsL4ZnVQRFkzdTQ1c0U/view?usp=docslist_api
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #80 on: May 03, 2016, 06:41:26 pm »
There are some weird things that I don't understand,
One of which is the presence of 8MHz crystal for the Xin and Xout while putting in mind that the NSC800N-4I is a 4MHz model the other is the presence of a watch clock crystal in  there and the absnce of dram or sram on board...
So if anyone knows what is going on here?!
Also I tried putting out the clock thing for the shift regester to read the eprom but no results...
See pics:
https://drive.google.com/file/d/0B5vW-k7HbsL4Nkw4YkdBVjVZbGc/view?usp=docslist_api

 

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 #81 on: May 03, 2016, 07:38:40 pm »
This appears to be an S-100 CPU board designed to plug into a back-plane, so the RAM and ROM will be on separate boards.

The watch crystal may be for a real-time clock (which would also explain the nearby CR2032 battery).

The NSC800 divides its clock input by 2 internally, so you need an 8MHz crystal to run the CPU at 4MHz.



   

 
The following users thanked this post: ali6x944

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 #82 on: May 03, 2016, 08:06:44 pm »
Also I tried putting out the clock thing for the shift regester to read the eprom but no results...
You still only have two lines connected from the Arduino to the 74LS166. You need 3 lines - CLOCK (pin 7), QH (pin 13), and SHIFT/LOAD (pin 15). To load the 8 parallel bits from the EPROM you must set SHIFT/LOAD low and then pulse CLOCK (high/low). This will transfer parallel input H to QH. To read the other bits out serially you must set SHIFT/LOAD high and pulse CLOCK.
   
 
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 #83 on: May 04, 2016, 03:01:22 am »
Do I need to configure any of the adress pins?
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #84 on: May 04, 2016, 03:21:09 am »
Like to get an output...
 

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 #85 on: May 04, 2016, 09:06:52 am »
Do I need to configure any of the adress pins?

Like to get an output...

To get output from the EPROM you must pull CE (chip enable) and OE (output enable) low. Something will then be output no matter how the address pins are 'configured', but obviously what is output will depend on what data is stored in the ROM at that address.   
 
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 #86 on: May 04, 2016, 01:18:30 pm »
Will I think I did it correctly this time...
Se pics:
https://drive.google.com/folderview?id=0B5vW-k7HbsL4c09XNjBIbDc4Zmc
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #87 on: May 04, 2016, 01:26:29 pm »

Binary Code
01110111
As Decimal: 119
As Binary: 01110111
As Hexadecimal: 77
Bits: 8


The wierd thing is that I got only zero's after that byte...
Did I do something wrong ?

 

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 #88 on: May 05, 2016, 11:33:01 pm »
The wierd thing is that I got only zero's after that byte...
Post your code so that I can check it...
 
The following users thanked this post: ali6x944

Offline ali6x944Topic starter

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

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 #90 on: May 06, 2016, 10:05:15 am »
Err... right. You couldn't paste the code into your post?

As far as I can tell from your 'screen shot', you are only reading the first bit after clocking in the parallel data. The last 3 digitalwrite()'s are useless. You need to pulse the clock another 7 times with SHIFT/LOAD high, and print the bit read after each clock.   

Looking at the EPROM wiring, you don't appear to have anything connected to A12 Pin 1) , A11 (pin 23) , A10 (pin 21) , A8 (pin 25) or A9 (pin 24). With these pins left floating the address can change randomly form one 256 byte 'page' to another at any time. Also  /PGM (pin 27) is connected to ground, which puts the EPROM into programming mode. It should be connected to +5V.
 
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 #91 on: May 26, 2016, 08:06:01 pm »
Err... right. You couldn't paste the code into your post?

As far as I can tell from your 'screen shot', you are only reading the first bit after clocking in the parallel data. The last 3 digitalwrite()'s are useless. You need to pulse the clock another 7 times with SHIFT/LOAD high, and print the bit read after each clock.   

Looking at the EPROM wiring, you don't appear to have anything connected to A12 Pin 1) , A11 (pin 23) , A10 (pin 21) , A8 (pin 25) or A9 (pin 24). With these pins left floating the address can change randomly form one 256 byte 'page' to another at any time. Also  /PGM (pin 27) is connected to ground, which puts the EPROM into programming mode. It should be connected to +5V.

sorry about that ...
here is the 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
}

void loop() {
  // put your main code here, to run repeatedly:
    digitalWrite(12,HIGH); //SHIFT-LOAD HIGH
    delay(10);
    digitalWrite(13,HIGH); //CLOCK HIGH
    delay(10);
    digitalWrite(13,LOW); //CLOCK LOW
    int val =digitalRead(11);   // read the input pin
    Serial.print(val,OCT);    // print the input pin
}
--------------------------------------------------------------
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #92 on: May 26, 2016, 08:19:48 pm »
And I fixed all conections and wired pins A8-A12 to a pull up resistor network and that to a dip switch array
https://drive.google.com/file/d/0B5vW-k7HbsL4aXRXTjdjdG15YXM/view?usp=drivesdk
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #93 on: May 27, 2016, 03:51:24 am »
The white and orang wires are /oe and /ce
 

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 #94 on: May 27, 2016, 11:53:23 pm »
void loop() {
  // put your main code here, to run repeatedly:
    digitalWrite(12,HIGH); //SHIFT-LOAD HIGH
    delay(10);
    digitalWrite(13,HIGH); //CLOCK HIGH
    delay(10);
    digitalWrite(13,LOW); //CLOCK LOW
    int val =digitalRead(11);   // read the input pin
    Serial.print(val,OCT);    // print the input pin
}

To read a byte you must first set shift/load LOW and pulse the clock. This loads the byte into the shift register and puts the first bit on QH. Then you set Shift/Load HIGH to enable shifting, and pulse the clock + read QH 7 times to get the next 7 bits. Something like this:-

Code: [Select]
#define CLOCK 13   // 74LS166 CLOCK
#define SHFTLD 12  //         SHIFT/LOAD
#define DATIN 11   //         QH

void loop() {
    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();


BTW, you shouldn't use raw numbers in your code unless that is all they are. Giving the pin numbers names makes the code self-documenting (no need to add comments to remind you what they do) and allows you to change a pin number globally by editing a single line of code. It's a little more effort initially, but in the long run saves typing and helps to avoid bugs - and makes the code easier to read.

 

 
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #95 on: May 29, 2016, 06:43:05 am »
it works! thanx man  :-+
i got these results:

A12-8 LOW:
it was random some time going in sequence and some times out ex.:
01111111
01111110
11111111
11101111
11111111
01111110
11111111
01111111
01111110
01111110
11101111
11101111
01111110
11101111
11101111
11101111
11111111
11101111
11111111
11111111
11111111
11101111
11111111
01111110
01111110
11111111
11111111
01111110
01111110
01111110
11101111
01111110
01111110
01111110
11111111
11111111
01111110
---------------------------------------------------
A12 hi, all low:
the same story as with the one before it.ex.:
01001011
01001110
11011111
11011111
01010010
01010010
01011011
01001000
01010111
11011111
01010010
10001111
11011111
10001111
11011111
01010010
01010010
11011111
01010010
11011111
10001111
01010110
01010010
10001111
11011111
01010110
10001111
11011111
11011111
11011111
11011111
01010010
01010010
11011111
11011111
01010010
10001111
10001111
11011111
01010010
01010010
11011111
10001111
11011111
11011111
11011111
01010010
01010010
01010010
01010110
11011111
01010010
11011111
01010010
01010110
01010010
01010111
10001111
01010010
11011111
01010110
11011111
11011111
01010110
10001111
11011111
11011111
01010010
11011111
10001111
10001111
11011111
11011111
11011111
11011111
10001111
11011111
11011111
11011111
11011111
11001111
11011111
11001111
11011111
01010010
10001111
11011111
10001111
01011111
01010010
01010110
11011111
11011111
11011111
10001111
10001111
11011111
01010010
01010010
01010110
01010010
11011111
01010010
11011111
11011111
01010010
11011111
10001111
10001111
11011111
11011111
10001111
01010010
11011111
11011111
01010010
11011111
11011111
11011111
11011111
10001111
01010110
10001111
01010010
10001111
11011111
11011111
01010010
01011111
01010010
10001111
11011111
11011111
01010010
11011111
----------------------------------------------------
A12-11 hi A10-8 LOW:
only one output comes out repeatedly:
01010110
----------------------------------------------------
A12-10 hi A9-8 LOW:
random some times in sequence in others:
11010100
11111101
11010100
11111101
11010100
11010100
11010100
11111101
11010100
11111101
11011101
11111101
11111101
11010100
11111101
11010100
11111101
11111101
11111101
11010100
11010100
11010100
00101101
11111101
00101101
00101101
11111101
11110101
11111101
11111101
11111101
00101101
00101101
11111101
11111101
11010100
11010100
------------------------------------------------
A12-9 hi A8 LOW:
only this:
10011010
------------------------------------------------
A12-8 HI:
only this:
00101100
------------------------------------------------
I tried converting them into ASCII and i got weird results so i don't think it is supposed to be ASCII  but maybe... maybe an image?!
correct me if I'm wrong in this one.
 

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 #96 on: May 29, 2016, 07:29:45 pm »
You need to put logic levels on all the address pins, including A0-7. If not connected to anything they will pick up noise and go up and down randomly, selecting different addresses.

If you have 8 spare outputs on the Arduino you could connect them to A0-7 and then be able to read 256 addresses (one 'page' of the ROM) without having to change the DIP switches. 

Then collect the 8 bits of each byte and print it out as Hex and ASCII.

 
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #97 on: June 02, 2016, 09:22:18 am »
Are A12-8 the Y-decoders and A7-0 are the X-decoders ?
What was I doing it right by aplying a parallel binary input to
Adress inputs In which Y-decoders get their own count and X-decoders their own count?
See datasheet -pg.1 block diagram-:
https://drive.google.com/folderview?id=0B5vW-k7HbsL4c09XNjBIbDc4Zmc
I will plot data in an excel sheet...
« Last Edit: June 02, 2016, 10:39:57 am by ali6x944 »
 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2328
  • Country: 00
Re: help! how to make a nsc800 computer?
« Reply #98 on: June 02, 2016, 12:49:03 pm »
This simulator can be a useful tool fro your task

http://www.natmac.net/zim/
 
The following users thanked this post: ali6x944

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 #99 on: June 02, 2016, 10:13:15 pm »
Are A12-8 the Y-decoders and A7-0 are the X-decoders ?
What was I doing it right by aplying a parallel binary input to
Adress inputs In which Y-decoders get their own count and X-decoders their own count?
The order that the address bits are connected to the row and column decoders inside the chip is not important. What is important is that all address lines have defined states. In your latest photo there are no wires going to A0-7.  Perhaps you have since added them, however your 'random' data suggests that some address lines are not stable. 

If you want to read the data out in the same order as the device the EPROM was programmed for then you should match the address connections used by that device. In 99.9% of cases you just have to match the pin designations, ie. A0->A0, A1->A1 etc. It's possible that the address lines have been mixed up  for some reason (eg. to make routing the PCB easier, or to obfuscate the data)  but that is very rare. 
     
 
 
The following users thanked this post: ali6x944


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf