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

0 Members and 1 Guest are viewing this topic.

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 #50 on: March 30, 2016, 11:18:12 pm »
i didn't use the circuit of the z80 tester, instead i only used the external clock in pin 11 and i pulled the rest in pin high with a 2x 5.1k resistor
If you don't have anything connected to the Address/Data lines then you don't know what instructions the CPU is executing, and it could do anything. The tester relies on the CPU executing continuous NOPs (opcode 0x00) which requires that all data lines be pulled low. However the lower 8 address bits also come out on the same pins, so to avoid shorting the address outputs they must be pulled low with resistors.

Your scope traces are quite confusing. You should set all channels to 5V/div and separate them on the display. The clock signal doesn't tell you much. Change the top channel to /FRSH and trigger on that, then you can match up the addresses with opcode fetches. The PC address appears on A8-15 before /RFSH goes low on opcode fetches only (not during data read/write).   
 
The following users thanked this post: ali6x944

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 577
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #51 on: March 31, 2016, 02:46:00 pm »
here it is:
 

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 #52 on: March 31, 2016, 09:50:29 pm »
The refresh pulses in your capture are not evenly spaced, indicating that some of the instructions are taking multiple M cycles. Therefore the CPU must be getting instructions that are not NOPs.

Take some more captures, this time with channels 2-4 on address/data lines 0-2, 3-5 and 5-7 (with all channels set to 5v/div). Also, make sure that inputs /INTR,/INTA,/RSTA,/RSTB,/RSTC,/NMI,/WAIT,/PS,/BREQ are all pulled high.

If possible, zoom in on the trace immediately after releasing /RESET. You should see that all address/data lines are low just before each time /RFSH goes low. 

 
 
The following users thanked this post: ali6x944

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 577
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #53 on: April 02, 2016, 04:58:25 am »
AD0-AD2:
THE FIRST 3 CAPTURES ARE WHEN reset WAS PULLED LOW!
THE LAST ONE WHEN reset WAS PULLED HIGH!
I'm confused is it supposed to work like this...
note: pulled high with 10k resistors.
« Last Edit: April 02, 2016, 05:29:02 am by 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 #54 on: April 02, 2016, 07:19:16 am »
I'm confused is it supposed to work like this...
No, it isn't. When /RESET IN (pin 33) is pulled low the CPU should stop operating. Also RESET OUT (pin 37) should go high. Can you verify that RESET OUT goes high when /RESET IN is low, and goes low when /RESET IN goes high?
 
I suspect that you either have a serious wiring error, or your 'NSC800' is actually something else. Now might be a good time to show us some photos of your setup. Also, what circuit are you using to clock the CPU?
 
 
The following users thanked this post: ali6x944

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 577
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #55 on: April 02, 2016, 08:54:26 am »
oh god, the bloody switch, i forgot its a latching one, the captures are correct the first 3 are are when reset is high, the last is when reset is low,
i changed the switch to a slider switch so i don't get it mixed up again :-[
and about the wiring and the chip see this:
https://drive.google.com/folderview?id=0B5vW-k7HbsL4c09XNjBIbDc4Zmc&usp=sharing
and i didn't use discrete resistors for pulling it up, i use a resistor array. 
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 577
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #56 on: April 02, 2016, 09:03:26 am »
and for the clock, I'm using a 555 timer, for R1 and R2= 1k and for C=2.2uf   
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 13133
Re: help! how to make a nsc800 computer?
« Reply #57 on: April 02, 2016, 10:52:01 am »
I hope its a CMOS 555.  The bipolar NE555 tends to momentarily crowbar the supply due to excessive shoot-through when it transitions, and, even with a good ground plane and a lot of low ESR decoupling, this can result in glitches on the clock edges.  I know this can prevent a Z80 functioning, as I once spent a week debugging a board that incremented the address bus, but did not execute instructions!
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 577
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #58 on: April 02, 2016, 01:39:56 pm »
really? i didn't know that i will check...
but yes I'm using NE555P.
i will change it to some 74HC00N oscillator or i will use the the crystal option in it. 
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 577
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #59 on: April 02, 2016, 01:46:30 pm »
 i think i will not use the crystal, maybe will use external clock, saw this in the data sheet:
"FIGURE 7. Use Of Crystal
The CPU has a minimum clock frequency input (@ XIN) of
300 kHz, which results in 150 kHz system clock speed. All
registers internal to the chip are static, however there is
dynamic logic which limits the minimum clock speed. The
input clock can be stopped without fear of losing any data or
damaging the part. You stop it in the phase of the clock that
has XIN low and CLK OUT high. When restarting the CPU,
precautions must be taken so that the input clock meets
these minimum specification. Once started, the CPU will
continue operation from the same location at which it was
stopped. During DC operation of the CPU, typical current
drain will be 2 mA. This current drain can be reduced by
placing the CPU in a wait state during an opcode fetch cycle
then stopping the clock. For clock stop circuit, see Figure 8 ."
do i have to increase the frequency?
« Last Edit: April 02, 2016, 04:30:55 pm by 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 #60 on: April 02, 2016, 06:38:13 pm »
i think i will not use the crystal, maybe will use external clock, saw this in the data sheet:
"FIGURE 7. Use Of Crystal
The CPU has a minimum clock frequency input (@ XIN) of
300 kHz, which results in 150 kHz system clock speed. All
registers internal to the chip are static, however there is
dynamic logic which limits the minimum clock speed.
Interesting! CMOS Z80's are fully static and have no minimum clock frequency.

If the minimum permitted clock frequency is 300kHz then that is what you will have to provide. LEDs won't be any use at that frequency, but you have a scope so...
 
 
The following users thanked this post: ali6x944

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 577
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #61 on: April 03, 2016, 01:10:13 pm »
so that is what we were doing wrong i will fix it now...
thax  :-+
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 577
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #62 on: April 03, 2016, 03:59:35 pm »
but did the measurements i took still apply?
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 13133
Re: help! how to make a nsc800 computer?
« Reply #63 on: April 03, 2016, 08:53:27 pm »
Talk about Heath Robinson!



If I wanted to be able to slow-run or single step a NSC800, I'd look at implementing the clock generator and stop circuit in a PIC or AVR.   The other possibility is to use /WAIT to freeze it while leaving the clock running normally.  With a flipflop cleared by /M1 and set by a debounced push button, (or a CMOS 555 timer for a slow run mode) you could single-step effectively, but that doesn't let you freeze bus activity anywhere in the instruction cycle so will be less use when bringing up a board from scratch than the clock freezer.
« Last Edit: April 03, 2016, 08:55:01 pm by Ian.M »
 
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 #64 on: April 03, 2016, 10:27:52 pm »
but did the measurements i took still apply?
No. If some of the control circuitry is dynamic then it could misbehave at low clock speeds, and your traces would reflect this. You need to clock the CPU at the correct frequency. If possible, trigger the scope on /RESET rising edge, then you can see what happens on startup.

 
 
 
The following users thanked this post: ali6x944

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 577
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #65 on: April 05, 2016, 08:00:23 pm »
it works nicely with a 4 Mhz crystal i used , Thanx.
I also bought an arduino to help program the eproms i have after i erase them...
the problem is how? could a CFL bulb work for this?
also it seems like it's counting in slow rate but it isn't see captures below:
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 577
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #66 on: April 05, 2016, 08:05:46 pm »
i apologize if the captures weren't clear, i will post more soon...
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 577
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #67 on: April 05, 2016, 08:22:52 pm »
but for now i will use SRAM and DRAM to store memory...
 

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 #68 on: April 06, 2016, 07:00:47 pm »
I also bought an arduino to help program the eproms i have after i erase them...
the problem is how? could a CFL bulb work for this?
To erase a UV EPROM you need 'hard' ultraviolet. A germicidal UV lamp can do it, but be careful - it will burn your eyes out in a few seconds. I use a cheap UV eraser bought from eBay, like this one:-

New 110V to 240V Ultraviolet UV Light EPROM Chip Eraser

However an EEPROM is much more convenient, because it can be erased electrically during the programming cycle. I use Winbond W27C512, which is a drop-in replacement for 27C512 UV EPROM. I have also used BIOS flash ROMs extracted from old PC motherboards, eg. 28F101, 29EE010. My programmer is the Minipro TL866CS from Autoelectric.



 
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 577
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #69 on: April 07, 2016, 04:11:59 pm »
SEE CAPTURES
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 577
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #70 on: April 21, 2016, 08:14:55 am »
Do anybody know how to use the two line output control in a M2764A UV EPROM ?
 

Online grumpydoc

  • Super Contributor
  • ***
  • Posts: 2910
  • Country: gb
Re: help! how to make a nsc800 computer?
« Reply #71 on: April 21, 2016, 08:29:33 am »
Do anybody know how to use the two line output control in a M2764A UV EPROM ?
That just refers to the fact that it has a Chip Enable input as well as an Output Enable input
 

Offline obiwanjacobi

  • Super Contributor
  • ***
  • Posts: 1013
  • Country: nl
  • What's this yippee-yayoh pin you talk about!?
    • Marctronix Blog
Re: help! how to make a nsc800 computer?
« Reply #72 on: April 21, 2016, 09:13:28 am »
You enable the chip when the memory address is in the range of the rom (address decoding), you enable the output when its a read operation...
(just saying the obvious here)
Arduino Template Library | Zalt Z80 Computer
Wrong code should not compile!
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 577
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #73 on: April 21, 2016, 04:18:41 pm »
thanx for clearing that out :-+
i have built a simple circuit to try  and read what is on the uv eprom but the only thing i get is 0's, i used sn74ls166n by Motorola which is a parallel in,or serial in , serial out shift register i connected Q0-Q7 to the shift register parallel inputs, pulled clear hi, and the shift/load and clock inhibit and the serial in low, QH is connected to pin 12 of the arduino, pin 13 is connected to the clock, A0-A12 is connected to a dip switch array pulled low with 10k ohm resistor array.
see 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,INPUT); //QH OUTPUT
}

void loop() {
  // put your main code here, to run repeatedly:
digitalWrite(13, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(100);              // wait for a second
  digitalWrite(13, LOW);    // turn the LED off by making the voltage LOW
  delay(100);   // wait for a second 
int val =digitalRead(12);   // read the input pin
 Serial.print(val,OCT);    // print the input pin
}
 
 

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 #74 on: April 21, 2016, 05:45:46 pm »
shift/load and clock inhibit and the serial in low
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.

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.
 
The following users thanked this post: ali6x944


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf