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

0 Members and 1 Guest are viewing this topic.

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
help! how to make a nsc800 computer?
« on: January 31, 2016, 05:18:02 pm »
help! how to make a nsc800 computer?
and how to upload a simple sketch on it?
please help! 
datasheet:
« Last Edit: January 31, 2016, 05:20:24 pm by ali6x944 »
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #1 on: January 31, 2016, 05:40:21 pm »
That's very vague.

The nsc 800 is a z80 compatible processor, so you build the system as you would a z80 based one.
As for sketches, well, the z80 and this chip boot from rom so you have to cross compile your code into z80.
If you want an arduino interface to program it, then you have to port wired and all the rest of the libraries to support the z80 and the nsc 800 capabilities.

Maybe someone already has ported the Arduino IDE to support the Z80, seems like someone would have thought about it, not sure what for, but sometimes people just do it just to see if it can be done.

Anyway, I would start by looking on how to build a z80 computer and adapt it to your ncs800 chip.
 
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 #2 on: January 31, 2016, 06:01:22 pm »
thanks man really appreciated  :-+
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #3 on: January 31, 2016, 06:05:18 pm »
oh does it work with RAM or OTPROM instead of ROM ?
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #4 on: January 31, 2016, 06:54:23 pm »
You'll need CMOS ROM, you can do the one time programable as you mentioned, or EEPROM. If you want something that can be programmed on the fly you could implement a boot loader in the lower ROM memory, then you are going to need CMOS Ram as well, I would go with SRAM.

There are many ways you can go about this.

I guess the important part is to leave the lower address space on a One Time Programable ROM that can transfer ROM images into an EEPROM section that will hold your custom ROMs, and of course you will need RAM and other things depending what you have in mind. Also the programs can be executed from RAM and the ROM can handle moving the images into RAM.

Without knowing what you are trying to achieve is hard to say.

Look for example at Ben's build of a ZX Spectrum with dual selectable ROMs, although he uses One Time Programable ROMs so pretty much the only software that can be modified would be on RAM.



But I wouldn't just build that with yours unless you can get a hold of the ULA, not sure where he got his.
And as far as I know he doesn't upload the project anywhere so you have to do it on your own and finding some details that he assumes you'll know.
« Last Edit: January 31, 2016, 07:12:55 pm by miguelvp »
 
The following users thanked this post: ali6x944

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #5 on: January 31, 2016, 07:06:04 pm »
I take it back, there are files available for download:

https://www.element14.com/community/docs/DOC-66060/l/ben-hecks-build-design-files?ICID=benheck-buildkit-videodoc

But I haven't look at them.
 
The following users thanked this post: ali6x944

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #6 on: January 31, 2016, 07:12:36 pm »
Also it appears the ZX Spectrum ULA can be done with an FPGA or CPLD. Interesting.

There is a book called "the zx spectrum ula" and there might be VHDL or Verilog code out there to do it.
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #7 on: January 31, 2016, 10:03:12 pm »

ali6x944
   You might think of a NSC800 as a Z80 instruction set CPU with a 8085 like interface.
You use a 8-bit latch to get A0-A7 from the shared AD0-AD7 bus. The latch is controlled by ALE.

There were CP/M based computers using the NSC800. Note that CP/M can be all ram memory when running.

At power up reset, the NSC800 like most microcomputers needs a program. Anything that can store a program while the NSC800 is powered off will work. This power up boot program needs to be on a parallel bus device. The simple is use a rom, eprom, eeprom or flash chip with parallel memory interface.
Some systems use a second processor to load the power up boot program in ram before releasing the NSC800's reset line. An Arduino, STM32 discover board, MBED board or something like this could preform this task.
 
The power up boot program does not have to be large if it can load a program from something. One system I have uses 512 bytes for example.

You often see the term bootstrap. A very small program loads a bigger more powerful program that then loads the system. The advantage is very small program in rom, eprom, eeprom or flash does not often change while the following programs are easy to change.

Note the "power up boot program" not just boot program. This is very simple and at the same time very powerful idea.  This would let you create a new boot and test it using ram memory.

A reset button resets the NSC800.
A power up reset button resets the NSC800 and clears a FF or a 8-bit latch like a 74xx273.
With the FF or 273 clear the power up boot program device is in memory to be used for power up boot.
Setting the FF or setting a bit in the 273 removes the power up boot device from memory. This allows 64k of ram or some other memory map.

When you have the basics look at simple yet powerful I/O
Think of packets of data.
A floppy disk controller is a register based data packet controller. A hard disk controller, larger registers.
When you are talking to a smart controller, it is cheaper and more powerful to use a command packet stream. One byte in the stream could select which of 256 devices or locations to use. Two bytes increases this to 65,536.
You have command, what device, what location.
SCSI, HPIB, IEE488, HDLC, SDLC and many other interfaces use this idea.

For a write you send the command stream followed by the data stream.
For a read you send the command stream and wait for the data stream return.
You must at the logic level be able to tell the command stream from the data stream. For parallel interface a 9th-bit would work.  A command stream is with 9th-bit set while a data stream the 9th-bit is clear. Simple yet very powerful. Many ways to do  this.

Using modern parts and ideas can make your NSC800 simpler and at same time more powerful.
The newer static ram is both faster and larger then when NSC800 came out.




 
The following users thanked this post: ali6x944

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: help! how to make a nsc800 computer?
« Reply #8 on: February 01, 2016, 01:03:02 am »
is the nsc800 chip still in production ?
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #9 on: February 01, 2016, 01:20:09 am »
is the nsc800 chip still in production ?

Probably not, but there is a little stock left:
http://www.findchips.com/search/nsc800

Actually more than a little:
https://octopart.com/search?q=nsc800

A lot of home security systems used z80 based boards, maybe that's enough to keep on making them?
« Last Edit: February 01, 2016, 01:22:46 am by miguelvp »
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #10 on: February 01, 2016, 03:30:23 pm »
what is "Small Device C Compiler"  common toolchain? and how to connect nsc800 with  "Small Device C Compiler"  common toolchain?

 just so u know i don't have any micro controller or usb to ttl converter of any kind to help me do any icsp or to send data from my computer to the nsc800 except USB -of course- ,RS-232 from a d-sub connector, and LAN.
is their is a method i could use to transfer data using those things listed above?
thanks a lot every body and thanks for generous support :-+
 

Offline Moondeck

  • Regular Contributor
  • *
  • Posts: 142
  • Country: dk
  • i really like compilers
Re: help! how to make a nsc800 computer?
« Reply #11 on: February 01, 2016, 03:36:21 pm »
Do you have any experience with this stuff at all? Microcontrollers? Microprocessors?
« Last Edit: February 01, 2016, 03:54:06 pm by Moondeck »
I'm selling 100ml bottles of free energy, PM me for pricing.
 
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 #12 on: February 01, 2016, 05:26:54 pm »
just so u know i don't have any micro controller or usb to ttl converter of any kind
But you do have the NSC800 CPU itself, right?

Quote
just so u know i don't have any micro controller or usb to ttl converter of any kind
Just so you know, you might have to buy some other things to get your NSC800 working.  ;)

Quote
USB -of course- ,RS-232 from a d-sub connector, and LAN.
is their is a method i could use to transfer data using those things listed above?
RS-232 can be converted into TTL with a simple level shifter circuit using a MAX232 or a couple of transistors and resistors. Or you could use your USB port with a cheap USB-TTL converter.

However you still need some way to translate the serial data into parallel bytes that can be loaded into memory. The conventional way to do that is with a UART such as NSC16550 or 82C51, controlled by a program in ROM. This is similar to how the Arduino does it - but the NSC800 doesn't have any ROM, RAM or UART built in so you need external chips to do the job.
 
And just like if you were trying make an Arduino from scratch, you have the problem of how to get the bootloader into ROM. Conventionally this is done with an EPROM programmer. If this is too expensive then you could build you own EEPROM programmer using a cheap Arduino dev board and a pair of 74HC595 shift registers. Instead of a parallel EEPROM you could use a static RAM (eg. HM65536) with a capacitor or battery to keep the data alive when it is not powered.
 
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 #13 on: February 02, 2016, 05:30:39 am »
U know this the first time i do something heavy digital...
So exuse me if i have sounded like an absolute fool
Great detailed explanation will be appreciated
« Last Edit: February 02, 2016, 10:33:31 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 #14 on: February 02, 2016, 04:38:14 pm »
Great detailed explanation will be appreciated
What exactly do you want an explanation of?
 
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 #15 on: February 02, 2016, 04:54:42 pm »
technical terms and how it works...
and schematics if u don't mind...
thanks a lot anyway guys, thanks for the help :-+
 

Offline Moondeck

  • Regular Contributor
  • *
  • Posts: 142
  • Country: dk
  • i really like compilers
Re: help! how to make a nsc800 computer?
« Reply #16 on: February 02, 2016, 05:01:15 pm »
U know this the first time i do something heavy digital...
Heavy digital? What did you do before?
Quote
So exuse me if i have sounded like an absolute fool
no problem  m8
Quote
Great detailed explanation will be appreciated
RTFM
I'm selling 100ml bottles of free energy, PM me for pricing.
 
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 #17 on: February 02, 2016, 06:03:54 pm »
nothing difficult...
 ttl full adders,and simple logic circuits to drive simple brain robots, and analog op amp sumer and comparetor things like that.   
not very fancy stuff...
 

Offline Moondeck

  • Regular Contributor
  • *
  • Posts: 142
  • Country: dk
  • i really like compilers
Re: help! how to make a nsc800 computer?
« Reply #18 on: February 02, 2016, 07:00:20 pm »
nothing difficult...
 ttl full adders,and simple logic circuits to drive simple brain robots, and analog op amp sumer and comparetor things like that.   
not very fancy stuff...
Ok, how much do you actually understand? Because if you wanna build a computer from scratch, you need to understand some things. There are no tutorials on this stuff.
I'm selling 100ml bottles of free energy, PM me for pricing.
 
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 #19 on: February 02, 2016, 07:08:15 pm »
am struggling to understand what is an address lines, buses, data transfer protocols, and the software things ...
i just stare at the screen saying  :wtf:
seriously man i know nothing! simply nothing  :-//
 

Offline Kilrah

  • Supporter
  • ****
  • Posts: 1852
  • Country: ch
Re: help! how to make a nsc800 computer?
« Reply #20 on: February 02, 2016, 08:00:47 pm »
am struggling to understand what is an address lines, buses, data transfer protocols, and the software things ...

Well it's already a good thing that you recognise these are things you'll hve to care about, but then... well you'll have to go read up on them and hopefully understand. If you don't understand try again, if you still don't understand then... maybe start thinking about proper courses, or other projects...  :-\
 
The following users thanked this post: ali6x944

Offline Moondeck

  • Regular Contributor
  • *
  • Posts: 142
  • Country: dk
  • i really like compilers
Re: help! how to make a nsc800 computer?
« Reply #21 on: February 02, 2016, 08:16:56 pm »
am struggling to understand what is an address lines, buses, data transfer protocols, and the software things ...
i just stare at the screen saying  :wtf:
seriously man i know nothing! simply nothing  :-//
Dude do some basics, real basics, learn, read and then come back to it.
I'm selling 100ml bottles of free energy, PM me for pricing.
 
The following users thanked this post: ali6x944

Offline Kilrah

  • Supporter
  • ****
  • Posts: 1852
  • Country: ch
Re: help! how to make a nsc800 computer?
« Reply #22 on: February 02, 2016, 08:43:23 pm »
A good starting point in my opinion is old computers, both for documentation and the machine itself for experimentation. Everything's made of discrete components that are big and you can thus physically touch and access and you can sometimes find quite comprehensive documentation down to component level, for example this:

http://www.club100.org/
ftp://ftp.whtech.com/club100/doc/m100ServiceManual.pdf
ftp://ftp.whtech.com/club100/doc/m102TechReference.pdf

If you're serious about it you can even buy some of these old computers for relatively cheap, some will pop up on eBay once in a while (picked myself up a 102 in mint condition for $100 a couple of months ago), get a logic analyzer to go along and start poking at things. Might help you given you don't seem to be very well versed to theory/text only approach.

Another good source of docs is datasheets/reference manuals for (simple) microcontrollers, a microcontroller being pretty much the exact same thing as a computer but on a single chip it's just as valid to learn about the concepts. The major difference is that you can obviously not physically poke at the innards like you can on a machine made of discrete compnents. For example Microchip's 8-bit PICs have good "general" info about the internal structure in their doc.

But by all means before you can actually design a system you'll obviously need to first learn how one works. You might know from prior experience what's the best way for you to teach yourself about something.
« Last Edit: February 02, 2016, 09:10:32 pm by Kilrah »
 
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 #23 on: February 03, 2016, 07:17:38 am »
I did search, i have theas books :
TTL cookbook, teach your self electrecity and electronics
And a few more...
 

Offline Moondeck

  • Regular Contributor
  • *
  • Posts: 142
  • Country: dk
  • i really like compilers
Re: help! how to make a nsc800 computer?
« Reply #24 on: February 03, 2016, 07:30:28 am »
Great, how much do you actually understand? Now if you understand it all/most go read something on the z80 CPU. Read about memory and registers. If you have been using Awwdooeenoo before you probably dont know what registers are.
I'm selling 100ml bottles of free energy, PM me for pricing.
 
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 #25 on: February 03, 2016, 10:35:53 am »
what is defrance between registers and shift registers?
 

Offline Moondeck

  • Regular Contributor
  • *
  • Posts: 142
  • Country: dk
  • i really like compilers
Re: help! how to make a nsc800 computer?
« Reply #26 on: February 03, 2016, 10:57:02 am »
more like what they have in common... well, they both can store data, but thats it. Google it. https://en.wikipedia.org/wiki/Processor_register
I'm selling 100ml bottles of free energy, PM me for pricing.
 
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 #28 on: February 23, 2016, 07:11:27 pm »
great now i understand so lets talk about it...
i was doing what u bros told to do and i found this pages:
http://z80.info/z80test0.htm
then i went and modified  for the nsc800, i fed pin 11 a clock of 1.03kHz -from a 6 stages frequency divider-, 5v pk-pk, with around 50% duty cycle, with a period of 970.00us,an on time of 480.00us, and an off time of 490.00us.
and the address pins was not responding!
i will post some photos soon of this...
thanks for all help and patience, I'm sorry if i annoy anyone of u guys ... :-[
« Last Edit: February 24, 2016, 01:46:25 pm by ali6x944 »
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #29 on: February 23, 2016, 07:13:33 pm »
all the resistor values were 1k ohm.
 

Offline obiwanjacobi

  • Frequent Contributor
  • **
  • Posts: 988
  • Country: nl
  • What's this yippee-yayoh pin you talk about!?
    • Marctronix Blog
Re: help! how to make a nsc800 computer?
« Reply #30 on: February 24, 2016, 09:21:23 am »
Arduino Template Library | Zalt Z80 Computer
Wrong code should not compile!
 
The following users thanked this post: ali6x944

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12851
Re: help! how to make a nsc800 computer?
« Reply #31 on: February 24, 2016, 10:17:55 am »
Its probably better to start with a real Z80 chip.  The extra complexity of a multiplexed address bus isn't worth it nowadays, as one can easily get double sided PTH PCBs made.   The only advantage was eight fewer signals needed for each memory or peripheral chip, but suitable multiplexed bus memory is far rarer now, and if you stick to a 'vanilla' Z80 design you will find far more resources on how to build one.

The next question is what do you want to use it for, as that has a large impact on how complex the design needs to be.
 
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 #32 on: February 24, 2016, 01:05:45 pm »
Will i currently have these chips:
1x NSC800N
 6xAM2746
4xTMS4416-15NL
3x 8464A-10L
1xSCN2661BC1N28
1xP8279-5
1xD7220AD
5x 74ls273N
4x sn74ls374n
Nand,nor,or,and,xor,inverters, tristate buffers is what i have.
« Last Edit: February 24, 2016, 01:41:30 pm by ali6x944 »
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: help! how to make a nsc800 computer?
« Reply #33 on: February 24, 2016, 06:05:35 pm »
@ali6x944
I have a 68000 board for sale, I also have an 8051 board for sale
they both come with schematic and chips in DIP package

why don't you buy a card like those, in order to make you started ?
 
The following users thanked this post: ali6x944

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12851
Re: help! how to make a nsc800 computer?
« Reply #34 on: February 24, 2016, 06:45:20 pm »
68000 is a really nice chip if you want to get into retro computing.  The assembly language is considerably easier to learn than Z80, as the instruction set is far more orthogonal, so there are far fewer special instructions and modes that only work with specific registers.  There are also C compilers and other languages like Forth readily available, so you can set up a PC hosted cross-development toolchain exclusively using FOSS software.

8051 is the classic MCU for embedded systems.  Derivatives are still being designed in to commercial products 35 years later.  Due to its historical massive popularity, and long lifespan, there are vast numbers of academic resources for it, and again the toolchains for cross-development are readily available.

Either would be  a far better choice for a relative beginner than an obscure Z80 derivative and a pre-build board lets you 'hit the ground running' and get your feet wet designing add-on boards for various purposes before you tackle the major project of designing your own processor board and writing a monitor program for oit from the ground up.

One caution however:  If either of the boards has logic in a PAL chip that is no longer available, and has no compatible replacement, or if the source 'code' for the PAL is no longer available, you would have to be incredibly careful NOT to make any mistakes interfacing to it.   You should prioritise writing a program to dump any ROMs over a serial link to your PC, and get a spare one programmed and tested as soon as possible, certainly before you do any hardware interfacing.  All the other chips should be reasonably generic or at least findable as N.O.S, so can be replaced if you blow something up.
 
The following users thanked this post: ali6x944

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: help! how to make a nsc800 computer?
« Reply #35 on: February 24, 2016, 08:50:14 pm »
If either of the boards has logic in a PAL chip

never used in my projects, instead I used the 74138 chip, in order to "divide" the address space into useful chunks.
My boards use 74xxx chips, and common CPUs, pure genuine 68000, and genuine 8051, so fully documented and known

I think it's the good point to stay away of troubles, in order to enjoy the fun without time wasted in "replacing strange old parts".
 
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 #36 on: March 26, 2016, 10:07:46 am »
in the NSC800 datasheet there is multiple reest pins and i'm confuse which one to use for the tester by Thomas scherrer in z80.info.
excluding reset out these are the ones i'm confused with:

"Reset Input (RESET IN): Active low. Sets A (8±15) and AD
(0±7) to TRI-STATEÉ (high impedance). Clears the contents
of PC, I and R registers, disables interrupts, and activates
reset out"
"Restart Interrupts, A, B, C (RSTA, RSTB, RSTC): Active
low level sensitive. The CPU recognizes restarts generated
by the peripherals at the end of the current instruction, if
their respective interrupt enable and master enable bits are
set. Execution is identical to NMI except the interrupts vector
to the following restart addresses:
Name
Restart
Address (X')
NMI 0066
RSTA 003C
RSTB 0034
RSTC 002C
INTR (Mode 1) 0038
The order of priority is fixed. The list above starts with the
highest priority."
 

Offline obiwanjacobi

  • Frequent Contributor
  • **
  • Posts: 988
  • Country: nl
  • What's this yippee-yayoh pin you talk about!?
    • Marctronix Blog
Re: help! how to make a nsc800 computer?
« Reply #37 on: March 27, 2016, 06:20:46 am »
I don't know the part but it looks to me that Reset (in) is the one you need. The reset out you don't connect and all the interrupt line you tie high (use a pull up resistor)...?

[2c]
Arduino Template Library | Zalt Z80 Computer
Wrong code should not compile!
 
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 #38 on: March 27, 2016, 10:34:05 pm »
in the NSC800 datasheet there is multiple reest pins and i'm confuse which one to use for the tester by Thomas scherrer in z80.info.
You use RESET IN to reset the MPU. RESET OUT is an output from the MPU which is used to reset external devices. The RSTx lines are inputs used to generate interrupts.

As far as its bus interface is concerned the NSC800 is more like an 8085 than a Z80. The lower 8 address bits are multiplexed with the data bus. At the start of a Read cycle A0-7 is sent out on the Address/Data lines, then the bus is switched to input mode to read D0-7. You can still pull the Address/Data lines low like in Thomas scherrer's circuit, but you should increase the values of the pull-down resistors to ~2.2k Ohms so they won't overload the bus when it is outputting the address.

Using A0-2 for the LED indicators is not very satisfactory because they will blink 'randomly' when showing the refresh address. So connect the LEDs to A8-10, and increase the clock frequency by ~256 (eg. by changing the 68k resistor to 47k and the 1uF capacitor to 4.7nF) to make them blink at a similar rate. These addresses alternate with the I register, but this has a constant value so it will be easier to pick out the instruction address increment in the blinking pattern.
   
 
 
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #39 on: March 28, 2016, 02:55:05 pm »
test results where kind of weird, i got this really odd oscillation pattern in pins 1,2,3 which are pin A(8,9,10) which correspond to pins A(0,1,2)in the diagram ,one time the rest of the time after they finch either they stay on, or one of them just floats or they turn off even after i push reset it doesn't seem to do anything exipt turn of completly
in the NSC800 datasheet there is multiple reest pins and i'm confuse which one to use for the tester by Thomas scherrer in z80.info.
You use RESET IN to reset the MPU. RESET OUT is an output from the MPU which is used to reset external devices. The RSTx lines are inputs used to generate interrupts.

As far as its bus interface is concerned the NSC800 is more like an 8085 than a Z80. The lower 8 address bits are multiplexed with the data bus. At the start of a Read cycle A0-7 is sent out on the Address/Data lines, then the bus is switched to input mode to read D0-7. You can still pull the Address/Data lines low like in Thomas scherrer's circuit, but you should increase the values of the pull-down resistors to ~2.2k Ohms so they won't overload the bus when it is outputting the address.

Using A0-2 for the LED indicators is not very satisfactory because they will blink 'randomly' when showing the refresh address. So connect the LEDs to A8-10, and increase the clock frequency by ~256 (eg. by changing the 68k resistor to 47k and the 1uF capacitor to 4.7nF) to make them blink at a similar rate. These addresses alternate with the I register, but this has a constant value so it will be easier to pick out the instruction address increment in the blinking pattern.
   
 
 
 

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 #40 on: March 28, 2016, 11:18:27 pm »
test results where kind of weird, i got this really odd oscillation pattern in pins 1,2,3 which are pin A(8,9,10) which correspond to pins A(0,1,2)
A8,9,10 put out the program counter address during instruction read, and the I register during refresh. On power up the I register has a random value, so each time you test the MPU the pattern could be different. However once powered up the I register contents don't change, so the LEDs should alternate between counting up and a fixed (random) pattern.
 

Offline obiwanjacobi

  • Frequent Contributor
  • **
  • Posts: 988
  • Country: nl
  • What's this yippee-yayoh pin you talk about!?
    • Marctronix Blog
Re: help! how to make a nsc800 computer?
« Reply #41 on: March 29, 2016, 05:36:05 am »
[..] On power up the I register has a random value, so each time you test the MPU the pattern could be different.

But on reset it is zeroed out...
Arduino Template Library | Zalt Z80 Computer
Wrong code should not compile!
 

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 #42 on: March 29, 2016, 08:21:41 pm »
But on reset it is zeroed out...
You are right! (I forgot that unlike other the registers, I and R are cleared on reset). So provided that the CPU only gets NOPs, the LEDs should flash the address count. If the LEDs are flashing 'weirdly' then either the CPU isn't getting NOPs, or one of the control lines is not set correctly.
 
 

Offline obiwanjacobi

  • Frequent Contributor
  • **
  • Posts: 988
  • Country: nl
  • What's this yippee-yayoh pin you talk about!?
    • Marctronix Blog
Re: help! how to make a nsc800 computer?
« Reply #43 on: March 30, 2016, 07:30:50 am »
If you run the test circuit long (or fast) enough, you will see a difference at 7 address bits between the instruction fetch cycle (M1) address and the DRAM Refresh cycle (R register)...

In my blog post I describe this in a bit more detail.

But up until that the address overflows into A7 you should see a normal binary counter progress on A0..A6.
Arduino Template Library | Zalt Z80 Computer
Wrong code should not compile!
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #44 on: March 30, 2016, 01:38:00 pm »
see results:
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #45 on: March 30, 2016, 01:40:00 pm »
.
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #46 on: March 30, 2016, 01:42:25 pm »
.
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #47 on: March 30, 2016, 02:12:27 pm »
some times it acts kind like what is on the video by obiwanjacobi, like it starts counting normally then starts going mad random then it stops, reset just turn of the address lines, so i tried turning the clock and the CPU of by cutting power and it rested it to start oscillating for a few seconds... 
 

Offline obiwanjacobi

  • Frequent Contributor
  • **
  • Posts: 988
  • Country: nl
  • What's this yippee-yayoh pin you talk about!?
    • Marctronix Blog
Re: help! how to make a nsc800 computer?
« Reply #48 on: March 30, 2016, 05:08:30 pm »
I have no idea what I am looking at - but it looks pretty messed up indeed.
How come those levels are not all high and low - some seem to be in-between...?
Arduino Template Library | Zalt Z80 Computer
Wrong code should not compile!
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #49 on: March 30, 2016, 07:10:24 pm »
is this the way to do it, i finally got it to count in some sequence but its incredibly slow and it flashes a for a minute or so, then it changes it's value,
but 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, and i changed the power source to a battery pack that is it:
 

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: 567
  • 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: 567
  • 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: 567
  • 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: 567
  • 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   
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12851
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: 567
  • 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: 567
  • 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: 567
  • 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: 567
  • 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?
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12851
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: 567
  • 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: 567
  • 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: 567
  • 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: 567
  • 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: 567
  • 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 ?
 

Offline grumpydoc

  • Super Contributor
  • ***
  • Posts: 2905
  • 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

  • Frequent Contributor
  • **
  • Posts: 988
  • 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: 567
  • 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

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

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?

 
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #125 on: July 22, 2016, 09:11:32 am »
Sorry I will post it soon....
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #126 on: June 25, 2017, 02:50:58 pm »
Latest improvements:
https://youtu.be/vTl3MrPyTHM
I well probably do the rom reader with a pic microcontroller and counters with 8bit shift register:
https://drive.google.com/file/d/0B5vW-k7HbsL4UFJNNThVSDhnRDQ/view?usp=drivesdk
I used an MC14040 to generate the all the address bus except the last bit, so MC14040 generate A0-A11,  address A12 however is generated by two 74LS30 octal input nand gates connected to all the address,the put of the second nand gate is connected to RB7 of PIC16F77  which controls
To tri-state buffers that connect to the address bus via the green wires, the shifr register and the data bus 8bits are shifted to pin RB3 and is controlled by RB0-RB2.
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #127 on: June 25, 2017, 03:00:44 pm »
For the CPU it self, I started to get the hang off it...
I also noticed that it is a Z80 microprocessor with an Intel 8085 interface, that means I could easily adapt existing 8085 designs to work with the NSC800 or Z80 designs by adding a transparent latch  to AD0-7 and connecting the output by ALE signal...
 

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: help! how to make a nsc800 computer?
« Reply #128 on: June 25, 2017, 09:20:40 pm »
Some ref material -


http://www.cryptomuseum.com/spy/fs5000/files/NSC800.pdf

https://archive.org/details/bitsavers_nationaldacroprocessorFamilyHandbook_8034824

http://www.hparchive.com/Journals/HPJ-1985-07.pdf


There is a cookbook, NSC800 Microprocessor Cookbook, cannot seem to find a free download link anywhere.


Regards, Dana.
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 
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 #129 on: June 26, 2017, 03:10:36 am »
Thanks dana for the great reference material :-+
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #130 on: June 26, 2017, 10:54:46 pm »
this is the diagram:
https://drive.google.com/open?id=0B5vW-k7HbsL4MEdfRG1fWWlBSDg
sorry for the crudity of the drawing I didn't find some chips in eagle cad so I had to do it by hand and it didn't help that I rushed in drawing it too...  :-[
« Last Edit: June 27, 2017, 05:41:31 pm by ali6x944 »
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #131 on: June 27, 2017, 05:47:28 pm »
code in the pic so far:
config.h
Code: [Select]
#include <xc.h>
// include processor files - each processor file is guarded. 
// PIC16F77 Configuration Bit Settings

// 'C' source line config statements

// CONFIG
#pragma config FOSC = LP        // Oscillator Selection bits (LP oscillator)
#pragma config WDTE = OFF       // Watchdog Timer Enable bit (WDT disabled)
#pragma config PWRTE = OFF      // Power-up Timer Enable bit (PWRT disabled)
#pragma config CP = OFF         // FLASH Program Memory Code Protection bit (Code protection off)
#pragma config BOREN = ON       // Brown-out Reset Enable bit (BOR enabled)
#define _XTAL_FREQ 32786


/*THE FIRST BIT OUT IS D7 & THE LAST BIT OUT IS D0, LIFO*/
char OUTPUT_SHIFT_REGISTER(){
    int i; //Set bit position in OUTPUT_ARRAY and counts the bit number
    char OUTPUT_ARRAY[8]; //Stores the byte OUTPUT OF THE SHIFT_REGISTER
    for(int i=0; i<=8;i++){
       
        PORTBbits.RB0=1; //Set the SHIFT/LOAD of 74ls166 to shift _high
        char Qh=PORTBbits.RB3; // Set char Qh to the value of RB3
        OUTPUT_ARRAY[i]=Qh; //Writes Qh value to the array OUTPUT_ARRAY in position i
        /*Clock for shifting the bits*/
        PORTBbits.RB2=1; //Set the CLOCK of 74ls166 to _high
        __delay_us(100);
        PORTBbits.RB2=0; //Set the CLOCK of 74ls166 to _low
    }
    return OUTPUT_ARRAY;

}

main.c
Code: [Select]
#include "config.h"
#include <stdio.h>
#include <xc.h>



void main(void) {
    TRISBbits.TRISB0=0; //RB0 set to output [ctrl SHIFT/LOAD of 74ls166]
    TRISBbits.TRISB1=0; //RB1 set to output [ctrl CLEAR of 74ls166]
    TRISBbits.TRISB2=0; //RB2 set to output [ctrl CLOCK of 74ls166]
    TRISBbits.TRISB3=1; //RB3 set to input  [read QH of 74ls166]
    TRISBbits.TRISB4=0; //RB4 set to output [ctrl CLOCK of MC14040]
    TRISBbits.TRISB5=0; //RB5 set to output [ctrl RESET of MC14040]
    TRISBbits.TRISB6=0; //RB6 set to output [ctrl tri-state buffer stage 74ls541]
    TRISBbits.TRISB7=1; //RB7 set to input  [read Y of 74ls30]
    TRISDbits.TRISD7=0; //RD7 set to output [ctrl A12 of tri-state buffer stage 74ls541]
    int a; //Set OUTPUT bit position of OUTPUT_SHIFT_REGISTER, LIFO -LAST IN FIRST OUT- ,MSB=0
    while(1){
        PORTBbits.RB6=1; //Set the tri-state Buffer of 74ls541 to _tri-state
        PORTBbits.RB1=0; //Set the CLEAR of 74ls166 to _low 
        __delay_us(100);
        PORTBbits.RB1=1; //Set the CLEAR of 74ls166 to _high
        PORTBbits.RB5=1; //Set the Reset to _high
        __delay_us(100);
        PORTBbits.RB5=0; //Set the Reset to _low
        int Clock; //clock count of MC14040
        for(int Clock=0; Clock<=8191; Clock++){
            if(PORTBbits.RB7!=1){
            PORTBbits.RB4=1; //Set the CLOCK of MC14040 _high
            __delay_us(100);
            PORTBbits.RB4=0; //Set the CLOCK of MC14040 _low
            PORTBbits.RB6=0; //Set the tri-state buffer stage 74ls541 to _enable
            PORTBbits.RB0=0; //Set the SHIFT/LOAD of 74ls166 to load _low
            OUTPUT_SHIFT_REGISTER();
            }
            else{
            PORTBbits.RB4=1; //Set the CLOCK of MC14040 _high
            __delay_us(100);
            PORTBbits.RB4=0; //Set the CLOCK of MC14040 _low
            PORTBbits.RB6=0; //Set the tri-state buffer stage 74ls541 to _enable
            PORTBbits.RB0=0; //Set the SHIFT/LOAD of 74ls166 to load _low
            PORTDbits.RD7=1; //Set A12 of tri-state buffer stage 74ls541 _high
            OUTPUT_SHIFT_REGISTER();
            }
        } 
       
    }
        return;
}
I'm using a pic16f77 with XC8 compiler.
« Last Edit: June 27, 2017, 05:49:32 pm by ali6x944 »
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #132 on: June 27, 2017, 06:00:53 pm »
I would like to use UART to get the memory data to my computer using a cp2102 USB bridge, so the controller is only sending data through UART...
but I'm really not that great yet in programming in XC8, but I'll try my best to make it work.
if u know any other way I can use to get the data of the micro, I would be happy to hear it :-+
 

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 #133 on: June 27, 2017, 06:59:13 pm »
I would like to use UART to get the memory data to my computer using a cp2102 USB bridge, so the controller is only sending data through UART...
USB to serial is a good way to do it, but...

What do you intend to do with the 'data' once you get it into the computer? If you want to download code and run it on the NSC800 then you will need some RAM and a way to load the 'data' into it.

 
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 #134 on: June 27, 2017, 08:20:46 pm »
I would like to use UART to get the memory data to my computer using a cp2102 USB bridge, so the controller is only sending data through UART...
USB to serial is a good way to do it, but...

What do you intend to do with the 'data' once you get it into the computer? If you want to download code and run it on the NSC800 then you will need some RAM and a way to load the 'data' into it.


mmmm....
well I have a couple of  MB8464A static 8K byte ram, and TMS4416 DRAM...
I will certainly use the MB8464A SRAM, but for the  "way to load the 'data' into it." to the NSC800 computer I will use SCN2661BC1N28 EPCI to load the program to ram from my computer through a USB bridge similar Grant Searle  Z80 design.
What I intend to do with the 'data' once I get it into the computer is to see what the roms contain, these roms where salvaged with the processor from a scrap electronics from the same unit, also I'm ordering a minipro programmer and a uv eraser to erase the roms and reprogram them again... 
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #135 on: June 27, 2017, 08:52:33 pm »
if u know cheaper more reliable programmers or erasers post them please... ur post will help me alot :-+
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #136 on: June 28, 2017, 02:24:57 am »
if you have to buy a UV Eraser, it would be much cheaper to use any of the many other choices that function like a rom that do not require a UV Eraser.

The information from old UV based roms can easily be transfered to a newer device.

Today unless you are trying make a very old clone, I would let the TMS4416's collect dust.
The MB8464A is not much better.

From digikey
64kx8 static ram. $2.65
128Kx8                  $3.16
512Kx8                 $5.48

ROM like
512kx8 flash based $1.70
64kx8 EEPROM      $3.12

So if you wire up just two 32 pin dip sockets, you should have all the ROM & RAM you need to start with and the extra space could be used in future.

So can you buy a UV eraser for less than $3.12?
 
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 #137 on: June 28, 2017, 04:19:02 am »
if you have to buy a UV Eraser, it would be much cheaper to use any of the many other choices that function like a rom that do not require a UV Eraser.

The information from old UV based roms can easily be transfered to a newer device.

Today unless you are trying make a very old clone, I would let the TMS4416's collect dust.
The MB8464A is not much better.

From digikey
64kx8 static ram. $2.65
128Kx8                  $3.16
512Kx8                 $5.48

ROM like
512kx8 flash based $1.70
64kx8 EEPROM      $3.12

So if you wire up just two 32 pin dip sockets, you should have all the ROM & RAM you need to start with and the extra space could be used in future.

So can you buy a UV eraser for less than $3.12?

I guess u are right, I went to digikey and I saw:
SST39SF010A-70-4C-PHE         FLASH 1MBIT 70NS   1.44000$
AS6C62256-55PCN                    SRAM 256KBIT 55NS  2.53000$

this is great value for money, my only concern is the extremely low address propagation delay and its effects on the processor ability to take to it...
for the AM2764 UV ROMs I have, the propagation delay is 250ns max@5v +-5%
for the SST39SF010A-70-4C-PHE ROM, the propagation delay is 70ns max@5v
the same thing holds true for the SRAM also...
will this reduction in propagation delay have any effect on a multiplexed bus processor, if so is it bad or good, if its bad how can I fix it?
 

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 #138 on: June 28, 2017, 06:15:08 am »
if u know cheaper more reliable programmers or erasers post them please... ur post will help me alot :-+
The Minipro is one of the cheapest and is pretty reliable. Watch out though because they have apparently been 'cloned' and the fakes may not work as good. 

I got a cheap nasty eraser from eBay which actually works fine. However for the same price you could buy several EEPROMs, which program faster and erase in a few seconds. 'Vintage' W27C512 EEPROMs sell on eBay for ~$1 each including postage. Unlike more modern EEPROMs these come in a 28 pin DIP package which is easier to work with.

I used a 28F101 in PLCC for the prototype of my current Z80 project. The PLCC socket was a pain to wire up and the chip is not easy to remove, and every now and then I have to sandpaper the pins to get good contact. I changed to the W27C512 for the production version of my project.   
 
Quote
I will certainly use the MB8464A SRAM
Yes that should be fine. You could map the ROM to the lower 48k and the RAM to the upper 8k, or allocate 32k to each and then you would be able to upgrade to 32k RAM later on.

Quote
for the  "way to load the 'data' into it." to the NSC800 computer I will use SCN2661BC1N28 EPCI to load the program to ram from my computer through a USB bridge similar Grant Searle  Z80 design.
In that case you just need to modify Grant Searle's code to work with the SCN2661. This may take a bit of trial and error to get working, so using an EEPROM would be a good idea (having to wait 20 minutes to erase your UV EPROM makes for a very slow development cycle!).

Quote
will this reduction in propagation delay have any effect on a multiplexed bus processor, if so is it bad or good, if its bad how can I fix it?
Short propagation delays can be a problem if the memory responds too quickly and violates setup and hold times. However I don't think that will be a problem with the NSC800 as the bus timing doesn't appear to rely on long propagation delays. Another potential problem is noise on the bus caused by fast transitions. Make sure you have good low resistance ground wiring and power supply bypass capacitors on every chip.
   
 
« Last Edit: June 28, 2017, 06:17:21 am by Bruce Abbott »
 
The following users thanked this post: ali6x944

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #139 on: June 28, 2017, 07:48:43 am »
One big difference between the
W27C512 EEPROM & newer generation chips is how easy the chips are to erase and program.

For  W27C512 you really need a programmer.

For SST39SF010A-70-4C-PHE a micro controller or a running NSC800/Z80 can program the chip. The only hard part is the need to enable chip for writes which is not that hard to do. You can not run a program in the chip you are programming, but it's not that hard to put programming code in ram if your using the NSC800/Z80 to program chip.

Once you have a microcomputer running, you may not even need a rom.
Look at

Here an Atmega32A loads a program in the Z80's ram starting at address 0H and then releases the Z80 reset.

So if you want to be cheap, no programmer like Minipro is needed.
 
 
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 #140 on: June 28, 2017, 09:19:54 am »
Interesting....
I have never thought of using a micro as a ram program loader...
It's certainly a cool trick to use :-+
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #141 on: June 28, 2017, 04:42:59 pm »

In general terms a shorter propagation delay is a good thing.
What matters is how the memory is connected.
Back in the 80's I used/worked on a system that had the equal of the Z80/NSC800 wait states. Some memory functioned with 0 wait states. Some functioned with 1,2,? wait states. It was all the same speed memory. The difference was the connection path. Some memory had 6 buffer/transceiver chips in signal path while others had fewer to none.
It had a system bus that was shared with other CPU's and when busy with different CPU, this CPU had to wait.   

To see what works you need to check each signal. When does it become valid? When does it go in-valid. Can the logic output a glitch (a signal that looks valid at receiver but is not).
When a signal goes to a chip, how is effected in time. 

In general as you speed up the clock of a microprocessor you need faster memory. When memory is too slow you have to add wait states to tell the CPU more time is needed. Or you have to slow down the CPU clock which also gives more time. If memory is faster then most memory can wait for slow CPU.

It is possible that that you can have a faster system with a slower CPU clock. Wait states are steps in time. 1 ns too slow and you have to add a wait state that costs time.

The critical part is that data is there and stable at CPU pins when the CPU reads it. That data is stable at memory chips pins when memory needs it. The same is true for other chips.
It is good to have extra time as many things can change when the signal actually changes at the pin of a chip.

The Z80 puts some data on it's address bus. At some time it outputs a signal that says address data should be good. With out this logic signal the logic, memory & IO would not know that address data is unchanging.
As the Z80 has a separate data bus the same thing happens on a write, the WR signal states write data is stable and signals " grab it " when WR goes inactive.
Note that these two (address & data ) are separate and one could be valid before or after the other. Some very old memory required external logic to insure that address happened before data.
For NSC800 you have a multiplexed address bus and data bus. For a read from memory or io this is not a big problem. The memory or IO needs some time before data can be valid on it's pins. For a memory or io write, this sharing reduces the time write data can be on the bus.   

To get from multiplexed address/data bus to separate complete address bus, you use ALE signal & a latch. 
Is address data stable at the input of latch for a long enough time before it's latched with ALE signal?
When is address on the output of latch stable?
When does low address get to memory chip?
When does high address get to memory chip?
Need to do same for each and every pin on all.

In old designs, you might see some inverters or gates connected in series. Two inverters in series = time delay.
A faster or slower inverter part could break the system.

You need to check the time each signal takes to see if it's in the allowed range.

A fun fact, The CRAY 1 to get the speed actually put the address data and address valid signal on the output at same time. The Address valid signal's wire  length was adjusted to meet needs at destination
.
 
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 #142 on: June 28, 2017, 08:57:17 pm »
quick question:
can wires have some sort of propagation delay? 
I know for certain that long power lines have horrible inductive behavior, that might case power up problems, and increasing the on-chip noise....
 
 

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 #143 on: June 28, 2017, 08:58:15 pm »
For  W27C512 you really need a programmer.
True, but a programmer is a good tool to have around anyway. The Minipro can also program GALs and MCUs that need high voltage, and test RAM and logic chips.

Quote
For SST39SF010A-70-4C-PHE a micro controller or a running NSC800/Z80 can program the chip. The only hard part is the need to enable chip for writes which is not that hard to do. You can not run a program in the chip you are programming, but it's not that hard to put programming code in ram if your using the NSC800/Z80 to program chip.
But you need to write the code and get it into the RAM somehow, which means either burning it into an EPROM for the CPU to boot from (chicken and egg problem) or loading it via DMA with some other device.

Quote
Look at

Here an Atmega32A loads a program in the Z80's ram starting at address 0H and then releases the Z80 reset.
It's a clever idea, but quite a bit more complicated than just programming an EPROM and plugging it in. The more complex the design the more things can go wrong with the build, and the harder it is to debug. Since ali6x944 struggled just to read an EPROM with an MCU, I suggest going with the simplest solution - at least to start with.
 
   
 
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 #144 on: June 28, 2017, 09:05:30 pm »
For  W27C512 you really need a programmer.
True, but a programmer is a good tool to have around anyway. The Minipro can also program GALs and MCUs that need high voltage, and test RAM and logic chips.

Quote
For SST39SF010A-70-4C-PHE a micro controller or a running NSC800/Z80 can program the chip. The only hard part is the need to enable chip for writes which is not that hard to do. You can not run a program in the chip you are programming, but it's not that hard to put programming code in ram if your using the NSC800/Z80 to program chip.
But you need to write the code and get it into the RAM somehow, which means either burning it into an EPROM for the CPU to boot from (chicken and egg problem) or loading it via DMA with some other device.

Quote
Look at

Here an Atmega32A loads a program in the Z80's ram starting at address 0H and then releases the Z80 reset.
It's a clever idea, but quite a bit more complicated than just programming an EPROM and plugging it in. The more complex the design the more things can go wrong with the build, and the harder it is to debug. Since ali6x944 struggled just to read an EPROM with an MCU, I suggest going with the simplest solution - at least to start with.
 
   

I agree, maybe in the future I can do this but for now I should stick to the basics as Bruce Abbott said. :-+
 

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 #145 on: June 28, 2017, 09:10:00 pm »
quick question:
can wires have some sort of propagation delay? 
I know for certain that long power lines have horrible inductive behavior, that might case power up problems, and increasing the on-chip noise....
Yes, wires do have propagation delay. However in the typical lengths required it is very small compared to the chips you are using. Inductance and capacitance can become a problem if they cause ringing or 'ground bounce'. High speed designs often have small resistors in series to damp oscillations, and 'meander' wires to fine tune the delays.     
 
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 #146 on: June 28, 2017, 09:13:14 pm »
if u know cheaper more reliable programmers or erasers post them please... ur post will help me alot :-+
The Minipro is one of the cheapest and is pretty reliable. Watch out though because they have apparently been 'cloned' and the fakes may not work as good. 

I got a cheap nasty eraser from eBay which actually works fine. However for the same price you could buy several EEPROMs, which program faster and erase in a few seconds. 'Vintage' W27C512 EEPROMs sell on eBay for ~$1 each including postage. Unlike more modern EEPROMs these come in a 28 pin DIP package which is easier to work with.

I used a 28F101 in PLCC for the prototype of my current Z80 project. The PLCC socket was a pain to wire up and the chip is not easy to remove, and every now and then I have to sandpaper the pins to get good contact. I changed to the W27C512 for the production version of my project.   
 
Quote
I will certainly use the MB8464A SRAM
Yes that should be fine. You could map the ROM to the lower 48k and the RAM to the upper 8k, or allocate 32k to each and then you would be able to upgrade to 32k RAM later on.

Quote
for the  "way to load the 'data' into it." to the NSC800 computer I will use SCN2661BC1N28 EPCI to load the program to ram from my computer through a USB bridge similar Grant Searle  Z80 design.
In that case you just need to modify Grant Searle's code to work with the SCN2661. This may take a bit of trial and error to get working, so using an EEPROM would be a good idea (having to wait 20 minutes to erase your UV EPROM makes for a very slow development cycle!).

Quote
will this reduction in propagation delay have any effect on a multiplexed bus processor, if so is it bad or good, if its bad how can I fix it?
Short propagation delays can be a problem if the memory responds too quickly and violates setup and hold times. However I don't think that will be a problem with the NSC800 as the bus timing doesn't appear to rely on long propagation delays. Another potential problem is noise on the bus caused by fast transitions. Make sure you have good low resistance ground wiring and power supply bypass capacitors on every chip.
   
 
can u give me the seller name of TL866, I don't really trust the current one I have:
http://www.ebay.com/itm/191796916274
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #147 on: June 28, 2017, 11:45:51 pm »

If you have a TL866 now then test it!

If the chip you use to test it with came from some place like digikey then chance of bad chip is small.
 
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 #148 on: June 29, 2017, 12:35:13 am »

If you have a TL866 now then test it!

If the chip you use to test it with came from some place like digikey then chance of bad chip is small.
No, u misunderstood me...
What I meant was I will be ordering one and I don't trust the seller I have posted the link for...
 

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 #149 on: June 29, 2017, 04:22:46 am »
can u give me the seller name of TL866, I don't really trust the current one I have:
http://www.ebay.com/itm/191796916274
The official eBay store listed on Autoelectric's dealer page is Electronic DIY.

TL866CS with 4 adapters is US$47.
 
The following users thanked this post: ali6x944

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #150 on: June 29, 2017, 05:47:33 pm »

Been thinking about this.

1. You tried to use an Arduino to write an EEPROM. Failed, could be lack of programming skills or lack of hardware skills or both.
If this step had worked you would only know what you tried to write to EEPROM matched when when verify read matched. If you had a hardware wiring problem like a swap of A5 with A6, the chip world still verify properly but would not function properly when used with Z80/NSC800.
You would just find it does not work. Hard problem to find with limited test tools.

2. You are now trying to replace a Z80 with an NSC800. Not a big change, but still a change. Hardware change is mostly adding an ALE Latch to capture lower address. Not very hard to test if this is working.

3. You are trying to replace a Z80 SIO chip in grant's CPM design with a  SCN2661. This requires both hardware design & change, and result must be correct. Then you have to create/change grant's code to function properly with this chip.
When you fail, you will have a blob that just does not work. You are missing one very important thing, A way for CPU to tell you some information on what it thinks and sees..
Sticking to this route, you would probably need at min output display for testing programs. Could be simple 8-bit output latch with led's connected to output. In addition to latch, you would need logic that would tell the latch when to capture data( write address decode).

Only if you get all this to work do you start to have some help from a Z80/NSC800 program on what is working or not working.

Now if you were making an exact copy of grant's design & got all the wiring correct, you have a fair chance of of getting IO to and from serial port and have a foundation you can add new software or hardware. One thing wrong and IT's a BLOB.
And when this is all working, it is just the first step. More hardware is needed to to run CPM.   

I would think baby steps that you can verify would be much easer.
A complicated system can be used easer to develop something new. You have more tools you can use to find the problems.

I think you have some knowledge gained when you tried to use an Arduino to program EEPROM.
If a simple step was to connect a small circuit on breadboard to an Arduino and then program the Arduino with an existing program and run it. You have little hardware with known connections and no creating software. If this step is more useful to you then just getting a Z80 running, you gain two ways.

So this is getting long. Short simple steps.
1. use Arduino as ISP to program the Arduino boot loader in blank ATMEGA32A.
2. You now have Arduino boot loader on ATMEGA32A, so you can now use 
 Arduino IDE to program an existing program to ATMEGA32A
At this point you should have a working serial port connection to PC.
3. You wire up 4 chips.
4. At this point when you run the program on ATMEGA32A the first step is to load some existing code into Z80 ram(the Z80 boot loader) and start Z80. For the Z80 the ATMEGA32A is all the IO needed.

You now have access to a lot of software. Basic, CP/M and more.

If you do not like the idea of a  ATMEGA32A supplying IO then you can start adding to system. You have a system that works, adding the SCN2661 will be a lot easer as you have tools to test it's function and not have to work in the dark.
You could add the flash rom you picked to system. Use it to start system when and then as storage(a disk drive)
When you have all the functions and have tested them then the ATMEGA32A could be removed.

1. Arduino as ISP


2. Wire
https://cdn.hackaday.io/files/19000812896000/A041116%20schematic.pdf

3. Run
RETROCOMPUTING FOR $4 WITH A Z80
https://hackaday.com/2017/01/02/retrocomputing-for-4-with-a-z80/


Now that you have a cheap working Z80, You can use what you learned to create a second version with the NSC800 working.

Think this makes more sense then a BLOB that might work.

 
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 #151 on: June 29, 2017, 07:49:42 pm »
More hardware is needed to to run CPM.

I would think baby steps that you can verify would be much easier.
Agreed. CP/M is something to think about once you have a basic setup working. You need a disk drive (preferably two drives) and controller, some way to make disk images etc. Not a simple project!

I would start by programming a ROM with a very simple machine code program and replacing the 'nop' generator with it. Run the CPU at 1Hz and verify that the bus lines are doing what you expect. Then add the serial chip and get that to do some simple stuff (eg. send characters to the PC). Finally, add the working serial code to Grant Searle's Nascom BASIC ROM, and you have a complete computer which can run programs written in BASIC etc.

I made a simple Z80 SBC with a 16550 serial chip and 32k ROM and RAM, running Grant Searle's BASIC. I was going to add a 37C665 floppy drive controller but I am now thinking of using a CH376 USB module - just have to port the code over from my other project. The CH376 is very easy to interface and dramatically increases functionality.
 
   
 
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 #152 on: June 29, 2017, 08:31:04 pm »

Been thinking about this.

1. You tried to use an Arduino to write an EEPROM. Failed, could be lack of programming skills or lack of hardware skills or both.
If this step had worked you would only know what you tried to write to EEPROM matched when when verify read matched. If you had a hardware wiring problem like a swap of A5 with A6, the chip world still verify properly but would not function properly when used with Z80/NSC800.
You would just find it does not work. Hard problem to find with limited test tools.

mostly lack of programming skills... :-[

Been thinking about this.

1. You tried to use an Arduino to write an EEPROM. Failed, could be lack of programming skills or lack of hardware skills or both.
If this step had worked you would only know what you tried to write to EEPROM matched when when verify read matched. If you had a hardware wiring problem like a swap of A5 with A6, the chip world still verify properly but would not function properly when used with Z80/NSC800.
You would just find it does not work. Hard problem to find with limited test tools.

2. You are now trying to replace a Z80 with an NSC800. Not a big change, but still a change. Hardware change is mostly adding an ALE Latch to capture lower address. Not very hard to test if this is working.

3. You are trying to replace a Z80 SIO chip in grant's CPM design with a  SCN2661. This requires both hardware design & change, and result must be correct. Then you have to create/change grant's code to function properly with this chip.
When you fail, you will have a blob that just does not work. You are missing one very important thing, A way for CPU to tell you some information on what it thinks and sees..
Sticking to this route, you would probably need at min output display for testing programs. Could be simple 8-bit output latch with led's connected to output. In addition to latch, you would need logic that would tell the latch when to capture data( write address decode).

Only if you get all this to work do you start to have some help from a Z80/NSC800 program on what is working or not working.

Now if you were making an exact copy of grant's design & got all the wiring correct, you have a fair chance of of getting IO to and from serial port and have a foundation you can add new software or hardware. One thing wrong and IT's a BLOB.
And when this is all working, it is just the first step. More hardware is needed to to run CPM.   

I would think baby steps that you can verify would be much easer.
A complicated system can be used easer to develop something new. You have more tools you can use to find the problems.

I think you have some knowledge gained when you tried to use an Arduino to program EEPROM.
If a simple step was to connect a small circuit on breadboard to an Arduino and then program the Arduino with an existing program and run it. You have little hardware with known connections and no creating software. If this step is more useful to you then just getting a Z80 running, you gain two ways.

So this is getting long. Short simple steps.
1. use Arduino as ISP to program the Arduino boot loader in blank ATMEGA32A.
2. You now have Arduino boot loader on ATMEGA32A, so you can now use 
 Arduino IDE to program an existing program to ATMEGA32A
At this point you should have a working serial port connection to PC.
3. You wire up 4 chips.
4. At this point when you run the program on ATMEGA32A the first step is to load some existing code into Z80 ram(the Z80 boot loader) and start Z80. For the Z80 the ATMEGA32A is all the IO needed.

You now have access to a lot of software. Basic, CP/M and more.

If you do not like the idea of a  ATMEGA32A supplying IO then you can start adding to system. You have a system that works, adding the SCN2661 will be a lot easer as you have tools to test it's function and not have to work in the dark.
You could add the flash rom you picked to system. Use it to start system when and then as storage(a disk drive)
When you have all the functions and have tested them then the ATMEGA32A could be removed.


Now that you have a cheap working Z80, You can use what you learned to create a second version with the NSC800 working.

Think this makes more sense then a BLOB that might work.


I agree, but around 1 month ago I fried my only z80 so I must work and learn solely on the NSC800 until the Z80 I ordered from ebay get to saudi...
see unlike the z80, the NSC800 has a minimum operating system clock of around 300khz with oscillator frequency of around 600khz, so it is a bit tricky to do the testing that Bruce Abbott have suggest, but if u have seen the video I made; u can see the testing circuit obviously neglecting the ALE signal and the Address multiplexing action  for eases of demonstration and recreation.

I was thinking of buying a logic analyser but the register based approach seems much practical, and cheaper to employ  :-+
thanks for the great advice m8  :-+
also I have ordered an MC68B50 like the one used in grant's minimal chip count Z80 computer so it cuts a bit of the fiddling around with UART's code which will save me the headache of modifying grant's excellent work and hopefully limit any errors caused by my poor coding skills  :)
« Last Edit: June 29, 2017, 08:33:02 pm by ali6x944 »
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #153 on: June 29, 2017, 08:40:51 pm »
More hardware is needed to to run CPM.

I would think baby steps that you can verify would be much easier.
Agreed. CP/M is something to think about once you have a basic setup working. You need a disk drive (preferably two drives) and controller, some way to make disk images etc. Not a simple project!

I would start by programming a ROM with a very simple machine code program and replacing the 'nop' generator with it. Run the CPU at 1Hz and verify that the bus lines are doing what you expect. Then add the serial chip and get that to do some simple stuff (eg. send characters to the PC). Finally, add the working serial code to Grant Searle's Nascom BASIC ROM, and you have a complete computer which can run programs written in BASIC etc.

I made a simple Z80 SBC with a 16550 serial chip and 32k ROM and RAM, running Grant Searle's BASIC. I was going to add a 37C665 floppy drive controller but I am now thinking of using a CH376 USB module - just have to port the code over from my other project. The CH376 is very easy to interface and dramatically increases functionality.
 
   
:-+
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #154 on: June 29, 2017, 09:08:37 pm »
More hardware is needed to to run CPM.

I would think baby steps that you can verify would be much easier.
Agreed. CP/M is something to think about once you have a basic setup working. You need a disk drive (preferably two drives) and controller, some way to make disk images etc. Not a simple project!
For Grant Searle's version more hardware is needed for CPM. Grant uses a COMPACT FLASH which acts like many big hard drives.

For this version using the ATMEGA32A you have two I2C Flash chips as drives.
https://cdn.hackaday.io/files/19000812896000/A110417.pdf

So NO you do not need Disk Drives and Controller and all that big pile of problems. Both do better then poor floppy drives. The only real need for floppy drives is if you have floppy disks with data or programs as only source.
These days you get programs, data & disk images from INTERNET with a PC.

I would start by programming a ROM with a very simple machine code program and replacing the 'nop' generator with it. Run the CPU at 1Hz and verify that the bus lines are doing what you expect. Then add the serial chip and get that to do some simple stuff (eg. send characters to the PC). Finally, add the working serial code to Grant Searle's Nascom BASIC ROM, and you have a complete computer which can run programs written in BASIC etc.
As stated No ROM needed to start Z80 and no mess getting a working serial interface. The ATMEGA32A is IO, what looks like serial ports and hard drives to the Z80.
If You looked at hackaday you would have seen Basic also.
The ATMEGA32A supplies Z80 clock so should be able to slow z80 clock at any time.
 
I made a simple Z80 SBC with a 16550 serial chip and 32k ROM and RAM, running Grant Searle's BASIC. I was going to add a 37C665 floppy drive controller but I am now thinking of using a CH376 USB module - just have to port the code over from my other project. The CH376 is very easy to interface and dramatically increases functionality.

So what I am reading here is that the  Z80-MBC (Mobile Breadboard Computer) {what I linked to} is more functional then what you have now. It is easer to wire and cheap. To get close to what this is you have to do a lot of Z80 programming and add hardware.


mostly lack of programming skills... :-[
I agree, but around 1 month ago I fried my only z80 so I must work and learn solely on the NSC800 until the Z80 I ordered from ebay get to saudi...
The remaining of quote to me is saying you are going to do what you have had problems doing in the past and only then if all works out have a working system, did I miss something here?

Just quick look at the schematic I linked to looks like very little change is needed to switch from a Z80 to NSC800. A ALE latch with tri-state output could be all change needed.

When you have a working computer things get easer.
« Last Edit: June 29, 2017, 10:36:29 pm by C »
 
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 #155 on: June 29, 2017, 10:49:16 pm »
More hardware is needed to to run CPM.

I would think baby steps that you can verify would be much easier.
Agreed. CP/M is something to think about once you have a basic setup working. You need a disk drive (preferably two drives) and controller, some way to make disk images etc. Not a simple project!
For Grant Searle's version more hardware is needed for CPM. Grant uses a COMPACT FLASH which acts like many big hard drives.

For this version using the ATMEGA32A you have two I2C Flash chips as drives.
https://cdn.hackaday.io/files/19000812896000/A110417.pdf

So NO you do not need Disk Drives and Controller and all that big pile of problems. Both do better then poor floppy drives. The only real need for floppy drives is if you have floppy disks with data or programs as only source.
These days you get programs, data & disk images from INTERNET with a PC.

I would start by programming a ROM with a very simple machine code program and replacing the 'nop' generator with it. Run the CPU at 1Hz and verify that the bus lines are doing what you expect. Then add the serial chip and get that to do some simple stuff (eg. send characters to the PC). Finally, add the working serial code to Grant Searle's Nascom BASIC ROM, and you have a complete computer which can run programs written in BASIC etc.
As stated No ROM needed to start Z80 and no mess getting a working serial interface. The ATMEGA32A is IO, what looks like serial ports and hard drives to the Z80.
If You looked at hackaday you would have seen Basic also.
The ATMEGA32A supplies Z80 clock so should be able to slow z80 clock at any time.
 
I made a simple Z80 SBC with a 16550 serial chip and 32k ROM and RAM, running Grant Searle's BASIC. I was going to add a 37C665 floppy drive controller but I am now thinking of using a CH376 USB module - just have to port the code over from my other project. The CH376 is very easy to interface and dramatically increases functionality.

So what I am reading here is that the  Z80-MBC (Mobile Breadboard Computer) {what I linked to} is more functional then what you have now. It is easer to wire and cheap. To get close to what this is you have to do a lot of Z80 programming and add hardware.


mostly lack of programming skills... :-[
I agree, but around 1 month ago I fried my only z80 so I must work and learn solely on the NSC800 until the Z80 I ordered from ebay get to saudi...
The remaining of quote to me is saying you are going to do what you have had problems doing in the past and only then if all works out have a working system, did I miss something here?

Just quick look at the schematic I linked to looks like very little change is needed to switch from a Z80 to NSC800. A ALE latch with tri-state output could be all change needed.

When you have a working computer things get easer.

Can I use a PIC16f77 or an ATmaga328P instead of ATmega32a?
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #156 on: June 29, 2017, 11:12:33 pm »
Can I use a PIC16f77 or an ATmaga328P instead of ATmega32a?
The big reason for the ATmega32a is the large number of digital io pins, it is a 40 pin dip.

PIC16f77 would require you to create a program. You would have to translate and adapt to pic.   Think this is a fail.

ATmaga328P This chip would be easer on software side, but you do not have enough digital IO pins. This puts you in to modifying software and adding hardware to work around the lack of digital IO pins. This is harder due to most are used as outputs & inputs.

The nice thing about ATmega32a is that what most of what you have learned with Arduino IDE & ATmaga328P & can be used. 

After you get Arduino boot loader programed into ATmega32a, you might think of this as an Arduino with more digital IO
 
 
 
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 #157 on: June 29, 2017, 11:48:37 pm »
Can I use a PIC16f77 or an ATmaga328P instead of ATmega32a?
The big reason for the ATmega32a is the large number of digital io pins, it is a 40 pin dip.

PIC16f77 would require you to create a program. You would have to translate and adapt to pic.   Think this is a fail.

ATmaga328P This chip would be easer on software side, but you do not have enough digital IO pins. This puts you in to modifying software and adding hardware to work around the lack of digital IO pins. This is harder due to most are used as outputs & inputs.

The nice thing about ATmega32a is that what most of what you have learned with Arduino IDE & ATmaga328P & can be used. 

After you get Arduino boot loader programed into ATmega32a, you might think of this as an Arduino with more digital IO
 
 

I understood ur point...
 

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 #158 on: June 30, 2017, 08:00:20 am »
Quote from: C
PIC16f77 would require you to create a program. You would have to translate and adapt to pic.   Think this is a fail...

The nice thing about ATmega32a is that what most of what you have learned with Arduino IDE & ATmaga328P & can be used.
I see where you are coming from, and I agree that if ali6x944 has to port or modify the code for a different MCU then it will probably be a fail. The only way it is easier than just burning a ROM is if he can follow an existing design exactly.

As for which way to go, it depends on what he wants to get out of the project. If the goal was just to run CP/M then an ATmega32 and SD-Card could be a good choice. However ali6x944 seems to be interested in how his chips work on a more basic level. I don't think we should discourage him from that.

Perhaps I am biased because I learned from the ground up, but I think it is necessary for a true understanding. The problem I have with learning on the Arduino is that it was never intended for that purpose - and it shows. People think that uploading ready-made sketches will turn them into software and hardware engineers, but as soon as they want do to do something different they are lost - because they never learned how it actually works. 

Quote from: ali6x944
the NSC800 has a minimum operating system clock of around 300khz with oscillator frequency of around 600khz, so it is a bit tricky to do the testing that Bruce Abbott have suggest
Sorry, I must have mixed up this discussion with another  that was talking about single-stepping the CPU. In case you did want to do that, here's one way...

Hardware Single Step for the 8085

And another...

AltairPC clone?! runs BASIC

 
The following users thanked this post: ali6x944

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: help! how to make a nsc800 computer?
« Reply #159 on: June 30, 2017, 03:17:23 pm »
No, it's not a clever idea, it might be a "smart idea" but for me the whole-presentation is a stupid idea that can only be motivated by the "cost", which I find it ridiculous since we all trash hundred dollars in electronic-crap (like arduino's shitty clones and those useless toys sold on ebay, including fake-chips sold for less than one USD), so why on the why we should promote the last "four dollars" of garbage from China?
 
The following users thanked this post: ali6x944

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #160 on: June 30, 2017, 03:43:33 pm »
Quote from: C
PIC16f77 would require you to create a program. You would have to translate and adapt to pic.   Think this is a fail...

The nice thing about ATmega32a is that what most of what you have learned with Arduino IDE & ATmaga328P & can be used.
I see where you are coming from, and I agree that if ali6x944 has to port or modify the code for a different MCU then it will probably be a fail. The only way it is easier than just burning a ROM is if he can follow an existing design exactly.

As for which way to go, it depends on what he wants to get out of the project.
I agree with most of what you are saying Bruce, but have these differences.
Burning a ROM is very easy. Was a real big time delay when you had few of the UV erased PROMS. Things got better. As with most things, better becomes easer. The W27C512 EEPROM generation of chips were much better then UV PROMS, but you needed a programmer or fancy program to change what was programmed. The current generation EEPROMs or Flash based ones are very easy, not as easy as writing to static ram but not hard.
This shows that using newer parts can give more capabilities down the road. Think of a ROM based disk drive, would be nice to not have to remove the chips to a programmer to change their contents.
But easy to reprogram ROM does not change the fact that it is only one very small part of a microprocessor system.

Back in the day, if you wanted to make a new microprocessor system, you used a microprocessor development system if you had the money. Even when you had a new working system, a lot of changes were easer and faster to do when you reconnected the development system.

The idea of one microprocessor starting up a second microprocessor existed before 1978.
It is easy to get locked into one basic way that things work when their are other options.
For the Z80, a great system has ram for the first 128 bytes. All the Z80 restart instructions start from here. Just to be clear a restart instruction can be thought of as a one byte call or jump instruction. You also have NMI interrupt and mode IM 1 interrupts starting from this area of memory. Then Power up RESET starts a 0H, and this is where the "You need Rom starting at address OH" comes from.
There are many ways to do things. The TRS80 series computers had Rom at 0H, but included a jump to RAM for all those things that needed ram starting at 0H. It works but is slower and needs programs that work with the change. Some other systems did not go this far and you were stuck with ROM program.
One Z80 system I looked at was simple in that at power up ran NOP instructions until the PC climbed to memory area of ROM. Very simple hardware at a cost of a power up delay of running thousands of NOP Instructions(not really that much time).
So Many ways of getting job done.

So many options so far. But think ahead to a system that banks in more memory. To switch a bank memory you have many problems to work around but a lot to gain if you can switch memory banks.

So if you are ok to this point lets look at simple to start with.
 ali6x944 built a CPU clock circuit based on a 555 timer. Great chip to really study and simple. How useful is it here in long run?
What is gained & lost if you replace the CPU clock circuit with a timer output of an Arduino. To start you lose the pot to set speed, but this can be added back using a ADC. Replaced learning about 555 timer with writing real code that like 555 can be used many places.
Looking ahead, it is not a big step to let the Z80 set the speed of it's clock. Very handy for looking at software and hardware tests. At some point is Z80 program, with one OUT instruction so say "RUN @ ____ Hz"         
Over all this is not as simple, needs Arduino with program and less parts on breadboard. When you add Z80 Speed control, more parts on breadboard. Now the additional parts for this and idea can be used in many places. It's an IO Output latch that is used in a large number of places..

A IO Output latch with LEDs is nice to have for many reasons and could do both.  The nice thing about IO Output latch is can be tested on breadboard, Can be tested connected to Arduino. So when connected ot Z80 will work at any z80 clock speed if connected correctly.  As part of working system not as handy. The first PC's had this. When the PC started it ran some tests and LEDs let you know what worked and where in startup code the processor was at. Even better this could be added or removed from PC with out PC knowing it was there.

 So think of the ATmega32A as a microprocessor development system. Not a great development system, but not bad. If you look at a development system, For most you pull the CPU and plug in development system cable. You might or might not plug in CPU to end of  development system cable.
If you redraw the schematic, You would see this could be done.

 
No, it's not a clever idea, it might be a "smart idea" but for me the whole-presentation is a stupid idea that can only be motivated by the "cost", which I find it ridiculous since we all trash hundred dollars in electronic-crap (like arduino's shitty clones and those useless toys sold on ebay, including fake-chips sold for less than one USD), so why on the why we should promote the last "four dollars" of garbage from China?

Where is China in this?
It is an ATmega32A with a program.
« Last Edit: June 30, 2017, 10:55:29 pm by C »
 
The following users thanked this post: ali6x944

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: help! how to make a nsc800 computer?
« Reply #161 on: June 30, 2017, 05:20:32 pm »
Where is China in this?

The author promotes $4 (four dollars project, which is also in the title) devices bought from China at ridiculous price. It's also written in the BOM.
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #162 on: June 30, 2017, 06:49:19 pm »
Where is China in this?

The author promotes $4 (four dollars project, which is also in the title) devices bought from China at ridiculous price. It's also written in the BOM.


digikey Prices
ATMEGA32A-PU-ND
https://www.digikey.com/product-detail/en/microchip-technology/ATMEGA32A-PU/ATMEGA32A-PU-ND/1914592
1   @ $3.64000

Z80
https://www.digikey.com/products/en/integrated-circuits-ics/embedded-microprocessors/694?k=Z80&k=&pkeyword=Z80&pv1291=833&FV=ffe002b6%2Cffec7cc7%2C7e801b1&mnonly=0&ColumnSort=0&page=1&quantity=0&ptm=0&fid=0&pageSize=500
6Mhz, 8Mhz & 10Mhz $5.36
20Mhz $8.35

Static ram chip
64kx8 static ram. $2.65
128Kx8                  $3.16
512Kx8                 $5.48

74HC00  >$0.50

Min cost Three chip total $11.65 + shipping & Tax
Max cost Three chip total $17.47 + shipping & Tax

Of all that only ATMEGA32A, 74HC00 and a few parts are needed.
All/most are using a USB to serial adapter.
Do need an Arduino or Arduino programmer to get boot on ATMEGA32A first time.

So the basics is that it is too much to pay <$5 for parts that will/could save time getting Z80 running.

Or less than probably $20.00 for a working CP/M system with no china.

The design and software that exists is what makes this good.
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #163 on: July 01, 2017, 06:30:12 am »
Reference to Schematics

Grant's 7-chip Z80 computer
(only 6 chips if using a USB to TTL serial cable)
Schematic
http://searle.hostei.com/grant/z80/Z80SbcSchematic1.2.gif

Used overclocked MC68B50
Downloaded Data sheet from this page
http://www.datasheetspdf.com/datasheet/MC68B50.html

Grant's CP/M on breadboard
Schematic
http://searle.hostei.com/grant/cpm/CPMSchematic1.2.gif

Note that their is a file ROM.HEX that contains Basic & monitor program.
This version uses Z80 SIO not the MC68B50

So both can run Grant's Basic.

Just to be complete
Z80-MBC (Mobile Breadboard Computer)
Schematic
https://cdn.hackaday.io/files/19000812896000/A041116%20schematic.pdf

Here is what is added for storage
https://cdn.hackaday.io/files/19000812896000/A110417.pdf
Two 24LC1025 on this Schematic, Max is 4  Digikey price $3.06
[url]http://ww1.microchip.com/downloads/en/DeviceDoc/21941E.pdf/url]
The storage on this chip(1024kb 128K x 8) is about the same as a 5.25" 40 track SDSS disk
Note: This is not great, some would say bad, too small.   

So would be good to understand the basics.

There are a Huge number of ways to do Hardware & Software.

There are things I don like about all three of above.
 
If I was building one of these it would be a start that I would add to and change,

So ali6x944  some info.
SCN2661BC1N28 EPCI
I think that you will have to get very good a Z80 assembly language to have a chance of getting the SCN2661BC1N28 EPCI working. Must be connected properly and software has to work correctly. Not a good idea to try this with out having feedback from Z80 side. You need working serial port to debug this.

Z80 SIO
  If you want to study and learn about Z80, This is a good part. The Z80 supports vector interrupts. This chip supports using vectors.

MC68B50
  This chip was built to work with the 6800 line of processors, not Z80. If you want to learn about Z80, this is a fail. As noted above, Grant does not use it with his CP/M design.

Both of Grant's designs will fail if you change CPU Clock speed. The serial link will be at wrong baud rate. The fix takes more hardware.

Z80-MBC
  With the way the ATMEGA32A is connected to Z80, Serial link should just work at any CPU Clock speed. This design should let you have an easer time of adding new hardware. New software should also be easer.
  The Fail here is the small size of the CP.M Disks.
You could swap the 24LC1025's chips used while powered down.
You also have option of doing Upload & Download of disk contents to PC.

Here you have easy option of adding two more 24LC1025's. Quick read of datasheet should let you do hardware. Software side would require a proper copy & add changes in Z80 Assembly and code on the ATMEGA32A. Think you need to learn a bit for this.
I would guess you would have an easer time adding more disk drives to a working CP/M system then getting the SCN2661BC1N28 EPCI working.
 
For grant's you need a working eeprom programmer.

For Z80-MBC you need to program the ATMEGA32A the Bootloader one time. This step is the same as you would do with most ATMEGA chips not all ready programed.

You will need to wire up the one you want exactly. With help & questions larger memory should not be a big problem change.

Think of one of these as starting point for working z80 system. As you learn you could make careful changes to learn more or make it better. If it is working and you make a change you know what you did that broke it, and can undo the change.
I am assuming you what to learn both hardware & some software.

I may have missed something, ask questions.




 
The following users thanked this post: ali6x944

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: help! how to make a nsc800 computer?
« Reply #164 on: July 01, 2017, 10:42:54 am »
So the basics is that it is too much to pay <$5 for parts that will/could save time getting Z80 running.

Good attempt of being the last devil's lawyer ever, but you have completely missed the point: we MUST NOT promote people for the purchase of garbage from China as the author insists to do. Chinese cheap parts are usually fakes, which usually causes a lot of problems since the fake-hardware usually doesn't work as expected.

Also, the idea of using AVR8 is smart but not clever (especially in the educational's context) for a simple reason: it's slower than the CPU (especially if programmed with Arduino in mind), which requires people to strictly understand timing between the Z80's bus and AVR8's. Not so simple to understand, especially for beginners.
 

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 #165 on: July 01, 2017, 08:44:43 pm »
Back in the day, if you wanted to make a new microprocessor system, you used a microprocessor development system if you had the money.
I bought my first microprocessor 'development system' (HUG1802, similar to the COSMAC ELF) in 1980. It cost NZ$300 for the kit - a lot of money for a trainee technician whose annual salary was only $3700! I used this to learn about microcontrollers, machine code programming etc. I then made it into a programmer for 2708 EPROMs, and built a computer of my own design using an MC6800 CPU and MC6847 VDG. I developed the circuit and wrote all the code from scratch, using only the datasheets as a guide. IMO there is no better way to truly understand how computer systems work.         

If I had unlimited funds I might have started with a proper computer such as an Apple II or Commodore PET, but would I have learned as much? Probably not. Today, the stuff that most people use to learn on is so complex that they will never fully understand it. And that limits them to just being users of stuff that is designed by the few who do.

Quote
ali6x944 built a CPU clock circuit based on a 555 timer. Great chip to really study and simple. How useful is it here in long run?
What is gained & lost if you replace the CPU clock circuit with a timer output of an Arduino.
Yes the 555 is a great chip - I often use one when I need to quickly whip up a clock source on a breadboard.

What do you gain and lose replacing the 555 with an Arduino? You gain a more stable clock that is programmable. You lose the ability to whip one up from a few parts in your junk box. For the Arduino you need a PC loaded with the Arduino IDE, USB cable etc. If you want to change clock frequency you have to modify the program, compile and download it into the Arduino. So you need a very complex development environment to do what the 555 can do with a few resistors and capacitors.     

In the long run the Arduino would certainly technically be a better choice than a 555, and it can do so much more! But then why muck around with a Z80 at all, when you could just do everything on the Arduino?


Quote from: legacy
the idea of using AVR8 is smart but not clever (especially in the educational's context) for a simple reason: it's slower than the CPU (especially if programmed with Arduino in mind), which requires people to strictly understand timing between the Z80's bus and AVR8's. Not so simple to understand, especially for beginners.
I agree. It could be a good advanced project for someone who already understands the basics.

 
The following users thanked this post: ali6x944

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #166 on: July 02, 2017, 12:40:26 am »
Starting about 74 as tech on anything DC to 1Ghz. Most of computers were 16 bits or more. Some were the micro tube, many small vacuum tubes mounted to board, Some were transistor based. Can not think of a logic type I have not worked on back then. One system used TTL & ECL with pc boards bonded to copper plates. Those first flat packs were fun.
To give you idea of site size, Around that time had a circuit breaker fail, 660V 400A & problems with 100Kw no break power( think UPS with out limit).
First Z80 I helped design and build, the Z80 chip cost $250 at the time.
Did some Nova1200 programming. When I really got in to DEC PDP-11's, RCA let me use their $200,000 PDP-11 development system when not in use.

I bought my first microprocessor 'development system' (HUG1802, similar to the COSMAC ELF) in 1980. It cost NZ$300 for the kit - a lot of money for a trainee technician whose annual salary was only $3700! I used this to learn about microcontrollers, machine code programming etc.

Around that time i worked in research. They had full 1802 development system with dual 8" drives. Know a fab change to 1802 that added protection on pins stopped it working at high temp. Old fab version worked up in 150C+. Not my work thing.
My thing was help in design of 8085, z80 & 68000 systems & programming,
Also High temp testing. Tests where wrong solder was a fail.
I forget what temp we had a 8085 running at.
Had access to  development systems of 8080, 8085 & Z80
About the time the PCxt demo came I had a 68000 on one work desk. At times would load in $5000 of memory to get some compute work done, 
Have had a home computer from about 76. My last Z80 system had 6 disk drives. Biggest Z80 system I worked on had 18 Z80's in box connected to other boxes.
Not much need at home when I could stay late at work an play.
If you need to see a good/not bad Z80 design, you should look a TRS80 model 12. Really shows how to connect many SIO, PIO & DMA together. The whole system becomes an IO processor for the 68000 in the Model 6000.

So Short answer, when not fixing/maintaining something, had time and access to a lot of INFO. Schematics, theory of operation and data sheets.
If it stopped I had to fix it.
Best processor board I helped design was a 68k that could connect to two system buses with local expansion, Many on each bus.   


Quote from: legacy
the idea of using AVR8 is smart but not clever (especially in the educational's context) for a simple reason: it's slower than the CPU (especially if programmed with Arduino in mind), which requires people to strictly understand timing between the Z80's bus and AVR8's. Not so simple to understand, especially for beginners.
I agree. It could be a good advanced project for someone who already understands the basics.
Could be that you are looking at it the wrong way.
Z80 goes full bore until it receives a WAIT Input, Then stops DEAD. You have a static system at this point and all the time in the world unless you have something like dynamic ram in system. So at this point any speed is fast enough. The only critical spot is holding data on bus for a read and then getting off bus before Z80 uses it after read. And even this is just a case of controlling the Z80 Clock.
 
Here it is even easer, You are user not a developer, you are just connect wires and use.
So how hard is the timing to understand as a user. When Z80 Wait goes low you are in a memory or IO cycle. Address is valid, MREQ or IORQ valid. If Write then write data valid. If Read then waiting on read data to be valid. 
So the only critical spot in timing is getting WAIT asserted fast enough.

So what if you have a slow working system to start with.  The only catch here is the quality of software on the ATMEGA. And even here you have examples to follow on how to add.

It may not be what many want as a final system, but fine as long as there is no time critical data to process.
So I see you both backwards in your thinking, It's great for beginners. A lot easer to wire up then any of the examples you might create for a beginner.
With so few wires a lot less problems with a wire error. And if polished software existed, the software could assist in checking the wires.
 
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 #167 on: July 02, 2017, 02:15:30 pm »
Here it is even easer, You are user not a developer, you are just connect wires and use.
That's the issue. Do you want to be a developer, or just an ignorant user?

Quote
So how hard is the timing to understand as a user. When Z80 Wait goes low you are in a memory or IO cycle. Address is valid, MREQ or IORQ valid. If Write then write data valid. If Read then waiting on read data to be valid. 
So the only critical spot in timing is getting WAIT asserted fast enough.
As a user I would hope that understanding the timing is not required - it should just work. But if it doesn't work then I need to figure out how it works so I can debug it. I would rather debug something I designed myself, because then I already know how it is supposed to work.

But how hard can it be? I took a look at the 4 chip Z80 project in your video. 28 files on the Hackaday page, where to start? Schematic, Z80 uBIOS source, Arduino source.  First thing to note is that this is for Z80 only, so a total non-starter for the NSC800.  Circuit looks about as complex as a standard Z80/decoder/ROM/RAM/SIO setup. Arduino source is 2586 lines of code - this may take a while to digest...

I was interested in how the Z80 interacts with the AVR when doing I/O. Turns out it's pretty simple - when the Z80 executes an IN or OUT instruction /IORQ goes low, which sets a F/F that asserts /WAIT. The Z80 will then extend the current bus cycle until /WAIT is released. The AVR is continuously polling the /WAIT line, so it knows an I/O request is in progress. It looks at /RD and /WR to see whether it needs to send or receive data on the Z80 data bus. After reading or writing the bus it has to finish the cycle, but it can't just reset the F/F because the Z80 will start a new cycle in less time than it can get off the bus. So it asserts /BUSRQ to make the Z80 give it control of the bus, waits 2us for the Z80 to finish the current cycle, gets off the bus, resets the F/F to release /WAIT, and finally releases /BUSRQ so the Z80 can take over again.

Getting /WAIT to assert fast enough is taken care of by the F/F, after that the AVR can take its time responding to I/O requests. Using /BUSRQ to avoid critical timing issues at the end of the cycle is quite clever. 
 
 
The following users thanked this post: ali6x944

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #168 on: July 02, 2017, 05:32:25 pm »
Here it is even easer, You are user not a developer, you are just connect wires and use.
That's the issue. Do you want to be a developer, or just an ignorant user?
.
Is it a How you look at Problem again?
When I read that, You are saying you have built all the test equipment that you use! If true then great, but double standards are bad.

So you have a black box, But here you can use it first and open later if you want. 
Like any test equipment you have to connect it properly.
Tho only reason to first open box is if the AVR program is bad. But you now have time to get Z80 working and play with AVR later if you want.

So tricky AVR program gets Z80 running.
Unlike Grant's design, all IO keeps working when you slow the clock. 

There are a lot of what could be called fails here. But you have to keep in mind what you do in other places.  Do you really expect your 10Mhz scope to give you a display of a 500Mhz Scope? 
Does this AVR keep you from changing the Z80 to be better?
The big problem with most starts like this is the down to a cost or build with few chips.
Build Grant's simple 9 chip then break it and hope you get it working again for Grant's CP/m path. That is not good for beginners.
I See Grant's design as "IT Works" or "IT's Broke".
When "IT Works" it really needs more to pay and  learn more hardware.

So Bruce, What would you gain if you were using this to build your Z80?

With your knowledge, I would think that you could make even better for the beginners.   
Look at ali6x944 as a beginner.
Why should a beginner need to buy a eeprom programmer these days. He listed $50 for real & $25 for clone. Yes it nice to have, but these days how often do you have to use it.
Here it could be just connect EEPROM to Z80 and run a Z80 program to program the EEPROM.
Bad Z80 program in EEPROM, run Z80 program again to change. No chip pulls where there could be problems.

Does this keep a beginner from learning or does it make it easer to learn.
Could be better, think that is always the case, but not bad.

I think part of you finding a large number of files (28) is that some are small steps to add to starting point. The bad here is that additions are on AVR side.

Where to start, On hackaday I read
1. Program Atmega32A with Arduino bootloader.
     Same step needed for most Atmega's not proprogrammed.
    The Arduino IDE has a Arduino ISP program, Videos on youtube.
     
2. Use Arduino IDE to program S221116_R110517_Z80.ino

Don's think I need to say more 
 
So Bruce, how much is the cost to you to make this even better for the beginners while helping you make your z80 BETTER?

And
First thing to note is that this is for Z80 only, so a total non-starter for the NSC800. 
True but no eeprom programmer needed so what is saved can buy a Z80
And the NSC800 can be a small step in the future after learning the basics.

Quote
Circuit looks about as complex as a standard Z80/decoder/ROM/RAM/SIO setup.
I would guess most will find it easer to wire. This is very true if you think ahead and put AVR on one bread board and then have jumpers to Z80 chip.
 
The following users thanked this post: ali6x944

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: help! how to make a nsc800 computer?
« Reply #169 on: July 02, 2017, 06:06:30 pm »
Why should a beginner need to buy a eeprom programmer these days. He listed $50 for real & $25 for clone. Yes it nice to have, but these days how often do you have to use it.

Here I paid 60 euro for a second hand UV-eraser, whose lamp was planned to be used for medical purposes (so yes, it's an hack), and 290 euro for a brand-new professional rom-programmer. Of course I got a super discount, DataMan happens to be much more expensive, and 290 euro is a lot of money, but if you attend public rooms or buildings where gambling games are played., well ... it happens that slot-machines still use UV-prom, so it was a good idea as working-student and it helped to pay my university taxes, and even nine years later since then my prom-programmer is still useful since it also supports serial flash chips.

It's also fine if I want to reprogram the SPI-flash chip I have on my TL703 router, aiming for porting XINU to a smaller platform than the one was officially supported: a big blue router with long antennas on the top, definitively too big, as the TL703 looks as big as a pack of ten cigarette  :o :o :o
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #170 on: July 02, 2017, 06:26:33 pm »
Why should a beginner need to buy a eeprom programmer these days. He listed $50 for real & $25 for clone. Yes it nice to have, but these days how often do you have to use it.

Here I paid 60 euro for a second hand UV-eraser, whose lamp was planned to be used for medical purposes (so yes, it's an hack), and 290 euro for a brand-new professional rom-programmer. Of course I got a super discount, DataMan happens to be much more expensive, and 290 euro is a lot of money, but if you attend public rooms or buildings where gambling games are played., well ... it happens that slot-machines still use UV-prom, so it was a good idea as working-student and it helped to pay my university taxes, and even nine years later since then my prom-programmer is still useful since it also supports serial flash chips.

So you have a need and have found more uses for it.
That does not mean everyone has a need for one.
It also does not mean you have to create a project so that you have to have a programmer when there are other choices. 

AND the big thing, Why force a beginner just starting out to have to buy a programmer when you know there are other choices?
And in the future when there may be a need, the one the beginner bought will not do the job. 

You complain about China junk. Yet forget that a one time use use of a programmer could be called JUNK. You had a job/work that paid for it, a beginner may not.
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: help! how to make a nsc800 computer?
« Reply #171 on: July 02, 2017, 07:32:48 pm »
It also does not mean you have to create a project so that you have to have a programmer when there are other choices. 

Here you are going a bit ridiculous: man, if you want to deal with old technology, you have to deal with old technology, otherwise get a modern AVR8 chip, load arduino on it, and be happy.

why force a beginner just starting out to have to buy a programmer when you know there are other choices?

I am not forcing no-one to do anything, and speaking about old-technology MPU, there are a lot of other choices, e.g. HC11 doesn't requires a prom programmer since the chip comes with a serial bootstrap mode which can be used to program external NV-RAM. You might use a simple HC11 board to program a NVRAM (static ram with a battery) to be used on Z80.

You complain about China junk. Yet forget that a one time use use of a programmer could be called JUNK. You had a job/work that paid for it, a beginner may not.

This makes no sense.
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #172 on: July 02, 2017, 08:37:32 pm »
It also does not mean you have to create a project so that you have to have a programmer when there are other choices. 

Here you are going a bit ridiculous: man, if you want to deal with old technology, you have to deal with old technology, otherwise get a modern AVR8 chip, load arduino on it, and be happy.
I would say it's you that is being a ridiculous: man.
If you do not like the Z80 that is fine.

why force a beginner just starting out to have to buy a programmer when you know there are other choices?

I am not forcing no-one to do anything, and speaking about old-technology MPU, there are a lot of other choices, e.g. HC11 doesn't requires a prom programmer since the chip comes with a serial bootstrap mode which can be used to program external NV-RAM. You might use a simple HC11 board to program a NVRAM (static ram with a battery) to be used on Z80.
And here we have an Atmega32A

That  ali6x944  already has the hardware needed and only needs to wire and load a program on existing arduino.

Some of my old technology, an 8085 was programming EEPROMS back in 1980's and this is even easer with todays chips.
 
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: help! how to make a nsc800 computer?
« Reply #173 on: July 02, 2017, 09:04:00 pm »
I would say it's you that is being a ridiculous: man.
If you do not like the Z80 that is fine.

I wonder ... who has ever said I don't like Z80? I am not interested but it is and was not the point.  Don't be (more) ridiculous.
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #174 on: July 02, 2017, 10:58:50 pm »
Atmega32A as virtual IO for Z80.
I had a thought that some reading about using an Atmega32A with a Z80 like being talked about here might not get the big picture.

In the past you might have had a TRS80 (a Z80) computer for example. Today you can find some programs that will run the old TRS80 programs on a PC. The PC program creates a virtual TRS80 in the process.
Here instead of creating the whole computer, you have a Z80 CPU & RAM in hardware. If you have this, then do not need a virtual Z80 chip or RAM chip.
The remaining part of computer is then the IO.
For a Z80 to use IO, it needs a program to interface with the hardware and the hardware.
Some IO devices need some simple software to function. For other IO devices the software can get very complicated.
The AVR is creating virtual hardware for the Z80 to use.
The AVR can even run a part of the software needed for a device to function, making the Z80 side software very easy.
The Result is a working system with the Z80 side of device software easer to understand.
You have a system that can run software with some hardware supplied by AVR.
In the future,
You have a choice of adding more IO hardware to the AVR side or the Z80 side.
When adding you can do small steps and test that each step works as you planned.

Some might like to use BASIC on the Z80 to do some tests on new hardware. You can do that here. The AVR controls the Z80 Clock of the system, so you should be able to do everything at a slow Z80 Clock and still get the help provided by the AVR & PC.

Some here may not think it, but being able to run CP/M is a big deal. This can give you access to later Microsoft basic and other basics. You can use and learn PASCAL via Borland's TurboPascal.
Then there are the ASSEMBLERS, that run on Z80. If you find old Z80 code this can make it a lot easer as you do not have to translate source for the differences an assembler might require. 

You could load Z80pack on your PC if you wanted to, Creates a Virtual Z80 CP/M system. You could then run CP/M programs on your PC. If you are writing software that works with hardware, You would need to move code to real Z80 to test with needed hardware.
 
 AS this is ali6x944  thread
The AVR will not help getting your NSC800 running with out changing things. I would list this as a fail at this time.

There are things you can do while waiting for your Z80 to arrive.
There are somethings you can do while waiting for Atmega32A to arrive if you do not have one.

The first step with the Atmega32A is programming it the first time. This step is the same as you would do with other AVR chips. You could use what you learn here for other projects that use an AVR.
If you have other AVR chips you could do this step with other AVR Chips. In this case you are programming Arduino bootloader so you can use the Arduino IDE to create programs. This same step lets you program an AVR with programs that do not use the Arduino IDE.

From what I know, I think using the Atmega32A with Z80, you will have a smaller chance at a fail. At the same time, little prevents you from learning/building a fantastic Z80 in small steps.

With a fail you can learn something at times. But failing just to be failing is no fun. It is often the very simple thing that can cause a fail also.

Just so you know how bad a fail can be. I failed a test in the 1970's. The test was on a system that was housed in 12  6' tall racks. I should have found the problem in less than 10 minutes.  I found the switch set in wrong position after 30 minutes. That switch should never be changed, was not easy to changed. Until that time had the fastest time to complete each test in the class. I learned first check the simple stuff.

So the big thing is pick a path an stick with it.
Break a big project down in to small simple steps that you can test. After a time you have that big project.
Here one step is Wiring, it has to be perfect You do not need a scope to check that the wiring is perfect.
You may need a scope after you know that the wiring is perfect.

So pick a path and stick to it.
If you are waiting on parts, there are many things that you can learn while waiting that will help in the future. All you have to do is ask.
 
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 #175 on: July 03, 2017, 01:40:39 am »
When I read that, You are saying you have built all the test equipment that you use! If true then great, but double standards are bad.
The very first piece of test equipment I had was a multimeter made from a 500uA movement and a bunch of resistors.  In 1978 I built a multi-function meter with DC Volts, kHz, milliseconds, nF and uF ranges (shown below) all to my own design. This meter is still in use today. I also built 3 oscilloscopes from scratch (the first one used a 1 inch radar tube and fitted into a briefcase along with the meter and other tools).  No double standards here!

The advantage of designing and building your own tools is that you know exactly how they work and what their limitations are. This knowledge also helps when using commercial equipment.
 
Quote
True but no eeprom programmer needed so what is saved can buy a Z80
And the NSC800 can be a small step in the future after learning the basics.
This thread is about building an NSC800 computer. ali6x944 could just make an exact duplicate of the Hackaday Z80/ATmega32 project instead, but what would be the fun in that?

Quote
Break a big project down in to small simple steps that you can test. After a time you have that big project.
I agree. That is why I recommended getting an EEPROM programmer. He already has the NSC800 working, next step is to replace the nop generator with a ROM. Then he can burn simple programs into the ROM and verify its operation, add a RAM chip, then an SIO chip - gradually building up a complete computer.

The programmer may also be useful for other projects. The Minipro also does GALs (16V8, 22V10) which are a good introduction to programmable logic.
   
Quote
Here one step is Wiring, it has to be perfect
Agreed. My first step in building a design is to print out the schematic. After doing the wiring I then buzz it out with the continuity tester, marking each connection on the schematic until they are all verified. I also power the board up before installing the chips and check that all the voltages are correct. Saves much heartache!

 
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 #176 on: July 04, 2017, 05:32:11 pm »
hi again,
sorry for not replying for a while now, I was improving the NSC800 testing circuit and I added the following:
1x 74LS374 for de-multiplexing the lower 8-bits of the address bus
 and the clock stop circuit from page 15 of the NSC800 datasheet with a 4MHz crystal
the following image is for these signals:
CLOCK (in yellow)
ALE (in cyan/light blue)
/RFSH (in purple)
/RD (in blue/dark blue)
https://drive.google.com/file/d/0B5vW-k7HbsL4TmFwbXFYZkpGUjg/view?usp=sharing
https://drive.google.com/file/d/0B5vW-k7HbsL4Rkd3NWE3dVBHcnM/view?usp=sharing
note: see page 9,15,16,17,18 and 19 of the NSC800 for reference:
https://drive.google.com/file/d/0B5vW-k7HbsL4S2ZmQTVzaTNXTjA/view?usp=sharing
 


Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #178 on: July 04, 2017, 06:08:30 pm »
hi again,
sorry for not replying for a while now, I was improving the NSC800 testing circuit and I added the following:
1x 74LS374 for de-multiplexing the lower 8-bits of the address bus


74LS374
The eight flip-flops of the DM54/74LS374 are edge-triggered
D-type flip flops. On the positive transition of the clock, the Q
outputs will be set to the logic states that were set up at the
D inputs.

74LS373
The eight latches of the DM54/74LS373 are transparent
D-type latches meaning that while the enable (G) is high the
Q outputs will follow the data (D) inputs. When the enable is
taken low the output will be latched at the level of the data
that was set up.

NSC800 page 8
ALE
Address Latch Enable (ALE): Active high. ALE is active
only during the T1 state of any M cycle and also T3 state of
the M1 cycle. The high to low transition of ALE indicates
that a valid memory, I/O or refresh address is available on
the AD(0 –7) lines.

NSC800 Page 70
shows it

What is wrong here with the 74LS374

Datasheet
http://ecee.colorado.edu/~mcclurel/dm74ls373.pdf
 
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 #179 on: July 04, 2017, 06:20:06 pm »
I'm having a couple of problems regarding the clock circuit and the AD0-AD7.
the output at A0-A7 is horribly distorted, I don't know what is the cause and will try my best to to figure what on earth is happening!?
and thanks for all replies   ;) :-+
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #180 on: July 04, 2017, 06:22:10 pm »
I think I have another one on me, I will replace the chip just give me a couple of minutes...
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #181 on: July 04, 2017, 06:25:17 pm »
This is just about ALE, and on paper 

ALE
For now do not worry about the scope

Just read my post and think logically.
When you know what this change of chips does then you might think of what problems it could create.
 
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 #182 on: July 04, 2017, 06:26:30 pm »
unfortunately, I don't have 74LS373...
but I have ONLY 74LS273  and 74LS374....
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #183 on: July 04, 2017, 06:31:23 pm »

Not trying to be mean.
For now it does not matter if you have a 7474LS373 or not

What does a change of a logic chip from 74LS373 to 74LS374 do?

What changes would this make to the NSC800

It is a THINK problem.
 
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 #184 on: July 04, 2017, 06:36:28 pm »
ohh! I got ur point!!
the 74LS374 is edge triggered clock while what I really needed was state triggering clock of the 74LS373...
so even the 74ls273 would not work... :(
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #185 on: July 04, 2017, 06:40:47 pm »

BINGO

Now go a step forward what happens with lower address bus with the two different chips?
 
The following users thanked this post: ali6x944

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #186 on: July 04, 2017, 06:47:50 pm »
ohh! I got ur point!!
the 74LS374 is edge triggered clock while what I really needed was state triggering clock of the 74LS373...
so even the 74ls273 would not work... :(

Not quite correct here.
You could have a chip that triggered on a falling clock trigger.
What would be the difference between a falling clock trigger and theLS373?

The problem
1. You have a positive edge triggered chip ( 74LS374 )
2. You have a transparent latch with data latched on negative edge(74LS373).
3. You have a  negative edge triggered chip like 74LS374 but negative edge in place of positive edge.

All will effect what is on A0-A7, What are the changes to A0-A7 using the three different chips?

ohh! I got ur point!!
the 74LS374 is edge triggered clock while what I really needed was state triggering clock of the 74LS373...
so even the 74ls273 would not work... :(

Not quite correct here.
You could have a chip that triggered on a falling clock trigger.
What would be the difference between a falling clock trigger and the 74LS373?

that A0-A7 is load on the edge of the ALE signal in 74LS374.
conversely the A0-A7 it is loaded when the ALE signal goes high meaning not on the transition in 74LS374.


Close
What happens for #2 if the input is changing?
« Last Edit: July 04, 2017, 07:02:13 pm by C »
 
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 #187 on: July 04, 2017, 06:59:03 pm »
ohh! I got ur point!!
the 74LS374 is edge triggered clock while what I really needed was state triggering clock of the 74LS373...
so even the 74ls273 would not work... :(

Not quite correct here.
You could have a chip that triggered on a falling clock trigger.
What would be the difference between a falling clock trigger and the 74LS373?

that A0-A7 is load on the edge of the ALE signal in 74LS374.
conversely the A0-A7 it is loaded when the ALE signal goes high meaning not on the transition in 74LS374.
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #188 on: July 04, 2017, 07:16:50 pm »

If you use a 74LS374
  Input is captured on positive edge, output sees no more changes. If input is still changeing then output is wrong.

If you use a 74LS373
  Input starts showing on output when level is high and follows all changes to input.  Changes stop  when low.

The #3
  You do not see input on output until you have the negative edge.

At high speed with NSC800 a 74LS374 can give an invalid A0-A7 address.
The 74LS373 will pass the changing address to down stream devices giving a little more time to these devices if address is stable. Change stops on ALE going low which is when NSC800 says A0-A7 should be stable.

The #3 would work fine also, but you would not have the extra time that A0-A7 might be stable for down stream devices.

Now think how a simple change like a 74LS373 being replaced by a 74LS374 messes with you.
Could be a very hard to find problem. Might not happen but once in a 1000 address requests.


 
 
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 #189 on: July 04, 2017, 08:17:38 pm »

If you use a 74LS374
  Input is captured on positive edge, output sees no more changes. If input is still changeing then output is wrong.

If you use a 74LS373
  Input starts showing on output when level is high and follows all changes to input.  Changes stop  when low.

The #3
  You do not see input on output until you have the negative edge.

At high speed with NSC800 a 74LS374 can give an invalid A0-A7 address.
The 74LS373 will pass the changing address to down stream devices giving a little more time to these devices if address is stable. Change stops on ALE going low which is when NSC800 says A0-A7 should be stable.

The #3 would work fine also, but you would not have the extra time that A0-A7 might be stable for down stream devices.

Now think how a simple change like a 74LS373 being replaced by a 74LS374 messes with you.
Could be a very hard to find problem. Might not happen but once in a 1000 address requests.


 
mmmmm.....
so to fix the problem that the 74LS374 makes, I need to somehow shift the trigger from rising edge to a falling edge...
by using 74ls04 inverting the ALE. :-//
I was also thinking of connecting the 74ls374 clock to the clock of the NSC800 and the output enable to the ALE to because the OE is not edge triggared...
« Last Edit: July 04, 2017, 08:20:00 pm by ali6x944 »
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #190 on: July 04, 2017, 09:31:57 pm »

First, When you look at the NCS800 and it's timing diagrams, the ALE signal timming is built for some chip like 74ls373. Any change needs to look at all the details.
The ALE signal is also a time reference for other signals.

Looks like you are starting to think.
An inverter connected to clock input 74ls374 does change the edge.
You have a slow #3


What else happens when you do just this much?
Everything takes time. The inverter delays the change 74ls374 clock signal.
You are now capturing A0-A7 at a later time. Is A0-A7 still valid at this time?
You have also reduced the time A0-A7 is valid down stream from 74ls374.

At some point as clock speed increases the extra delay breaks the logic. If this happens at a higher clock then can be used then it could be ok.
It is ALL ABOUT TIME.
In some places while the logic of a 74ls374 is correct you might need to use something faster to get the TIME to work.

Do not see cpu clock doing you any good. To match up with other systems, the ALE latch is a problem
For something looking for Z80 type then OE needs to set output to tri-state during DMA and RESET. Z80 DMA needs all 16 address lines.
For something looking for 8085 then it might be only RESET.

The NSC800 is a mess.
Z80 machine code should work but this is not a guarantee as code has to work with hardware at some point.
While the interface of this chip looks like an 8085, it might not be due to a timing change or signal difference. 8085 chips might work, might not do to logic & timing changes.
Z80 chips like SIO will not work to full function. And only testing each chip will give a guess if remaining parts of chip will function.
Being able to run Z80 code does not mean that a Z80 SIO will function. You should be able to already see that some parts of SIO will not work. The SIO can read the instructions the Z80 is reading due to M1, Z80 has a return from interrupt instruction.
Interrupt ack is also created inside SIO which is used to define when to put an interrupt vector on bus.
There is a reason that  ZILOG introduced new versions SIO when introducing faster Z80 CPU's.
later in Z80's life time a whole new chip replaced the SIO.


 
 
The following users thanked this post: ali6x944

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #191 on: July 04, 2017, 09:52:31 pm »

For slow speed the 74ls374 with inverter should work.
Replace with a 74ls373 as soon as you can get one.

There are other logic families that you could use in place of LS

You said you have a 74ls273
You could replace grant's logic on his CP/M version that insures that ROM is in memory on cold boot with this chip.
The extra 7 could be used in the future change memory map or other functions.
 
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 #192 on: July 05, 2017, 03:38:42 am »
An inverter connected to clock input 74ls374 does change the edge.
You have a slow #3


What else happens when you do just this much?
Everything takes time. The inverter delays the change 74ls374 clock signal.
You are now capturing A0-A7 at a later time. Is A0-A7 still valid at this time?
You have also reduced the time A0-A7 is valid down stream from 74ls374.

At some point as clock speed increases the extra delay breaks the logic.
At 4MHz the minimum hold time from ALE low to AD7-0 tristate is 30ns. The 74LS04 adds 15ns delay maximum (typically 10ns), so it should be OK even at maximum CPU clock speed.
 
Obviously a 373 would be better, but it's not essential.

Quote
For something looking for Z80 type then OE needs to set output to tri-state during DMA and RESET. Z80 DMA needs all 16 address lines. Z80 chips like SIO will not work to full function.
Some Z80 based computers had even more restrictions. For example the Mattel Aquarius (which I am currently working with) does not allow interrupts! And yet its 'Quick Disk' drive used a Z80 SIO.
 
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 #193 on: July 05, 2017, 09:32:27 am »
An inverter connected to clock input 74ls374 does change the edge.
You have a slow #3


What else happens when you do just this much?
Everything takes time. The inverter delays the change 74ls374 clock signal.
You are now capturing A0-A7 at a later time. Is A0-A7 still valid at this time?
You have also reduced the time A0-A7 is valid down stream from 74ls374.

At some point as clock speed increases the extra delay breaks the logic.
At 4MHz the minimum hold time from ALE low to AD7-0 tristate is 30ns. The 74LS04 adds 15ns delay maximum (typically 10ns), so it should be OK even at maximum CPU clock speed.
 
Obviously a 373 would be better, but it's not essential.

Quote
For something looking for Z80 type then OE needs to set output to tri-state during DMA and RESET. Z80 DMA needs all 16 address lines. Z80 chips like SIO will not work to full function.
Some Z80 based computers had even more restrictions. For example the Mattel Aquarius (which I am currently working with) does not allow interrupts! And yet its 'Quick Disk' drive used a Z80 SIO.


For slow speed the 74ls374 with inverter should work.
Replace with a 74ls373 as soon as you can get one.

There are other logic families that you could use in place of LS

You said you have a 74ls273
You could replace grant's logic on his CP/M version that insures that ROM is in memory on cold boot with this chip.
The extra 7 could be used in the future change memory map or other functions.
but wait! this means that I can run this chip if the CPU's clock out/system clock is 4MHz...
system clock in my test setup is 2MHz,  so if I use 74ls04 it will definitely work :-+
 

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 #194 on: July 05, 2017, 05:08:47 pm »
in my test setup is 2MHz,  so if I use 74ls04 it will definitely work :-+
I don't think the clock frquency makes any difference, but the CPU's rated speed does (4MHz CPU has shorter hold time than 1MHz CPU). In practice bus capacitance will hold the data for a while in tri-state anyway (longer if all chips on the bus are CMOS/NMOS rather than bipolar TTL).   

BTW your NSC800 looks pristine. Where did you get it from?
 
The following users thanked this post: ali6x944

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #195 on: July 05, 2017, 06:18:51 pm »
but wait! this means that I can run this chip if the CPU's clock out/system clock is 4MHz...
system clock in my test setup is 2MHz,  so if I use 74ls04 it will definitely work :-+
Yes it should work.
Being new you need to look at big picture.

Just because you got one small part to work that does not mean to total system will work!
All timing  must be in bounds for NSC800 to function properly.

This is not a change that could be made to an existing system and be expected to work. It could work fine or it could mess up the timing and make it fail or intermittent.

An existing system could use ALE as a signal that states ADDRESS Valid & Stable. This is no longer true when 74ls374 is used as A0-A7 is not stable or valid.

ALE is an important signal when you read data sheet.
In the data sheet A0-A15 is valid and has been on the bus for a time before ALE. The timing of other signals is based on ALE

Need to remember that the 74ls373 is a follow input then hold the input.

The 74ls374 is put input on output some time after clock edge with a delay from clock edge while changing.

So with the 74ls374, you have high address (a8-A15) address data valid & stable before ALE and low address(A0-A7) becomes valid some time after ALE and down stream circuits must handle this change properly.

All parts that use the separate A0-A7 have less time.

If you look a little closer at how long AD0-AD7 is valid after ALE
th(ADL) is 30ns for 4mhz part, 35ns for 3.5mhz part, 60ns for 3mhz part.
This suggests that internal time delays in the NSC800 logic creates these signals.

Look at and OPCODE read cycle or Memory read using 4mhz part.
Low address is valid at TS(AD) {40ns} before ALE
RD gos low tDAR {160ns} after ALE

So for the 74ls373 low address is stable 200ns before - the time it takes for input to output delay of 74ls373(36-38ns) before RD low.
With 74ls374 and inverter you have 160ns - 10-15 ns for inverter - input to output delay of 74ls374 (32-38ns) before RD low
So low address stable time is now 50-60ns less.

I went in to detail here while this little change is fresh in your mind.
What looks ok in a small part of circuit,  could easily break the system.

The point I am trying to make here is that one small change can have a huge effect on the remaining parts of the system.
You have to get the logic correct.
You also have to get all the time delays accounted for.
Need to keep this in mind when working with logic.



 




 
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 #196 on: July 12, 2017, 06:15:54 pm »
current update on the project:

also the parts I ordered from Ebay didn't reach Saudi yet, this includes the Z80 and the Eprom programmer....
I also bought some 74HC595, I will use those in the eprom programmer I'm currently working on.
sorry C I was not able to run arduino bootloader on atmega32a, but I will try my best to get it up and running. :-+
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: help! how to make a nsc800 computer?
« Reply #197 on: July 13, 2017, 12:45:23 pm »
yup. Excellent! Sooner or later I will design a GB cart with EagleCAD, allowing people to have an alternative to the hack I presented here. Your EPROM programmer is excellent for this job too since it can program FLASH as well as NVRAM and UV-PROM :D

For UV-PROM, I got a marvelous UV-tube from recycling equipment from an hospital's division. It was used to make a surgical knife  free from bacteria and/or other living microorganisms, but it's enough OK to be uses as UV-PROM eraser, it just takes more times, something like 25 minutes of exposition instead of 10, but it didn't costed an eye of my head. I just had to build a metal box to put the UV-tube inside  :D
 
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 #198 on: July 13, 2017, 03:08:28 pm »
yup. Excellent! Sooner or later I will design a GB cart with EagleCAD, allowing people to have an alternative to the hack I presented here. Your EPROM programmer is excellent for this job too since it can program FLASH as well as NVRAM and UV-PROM :D

For UV-PROM, I got a marvelous UV-tube from recycling equipment from an hospital's division. It was used to make a surgical knife  free from bacteria and/or other living microorganisms, but it's enough OK to be uses as UV-PROM eraser, it just takes more times, something like 25 minutes of exposition instead of 10, but it didn't costed an eye of my head. I just had to build a metal box to put the UV-tube inside  :D
Mm.... Interesting...
My younger brother and I are big fans of Nintendo games, he asked me a while ago to modify his GB advanced SP cartridges to be programmable , I saw the cartridge mode u did and I was impressed, I'm really excited to see more...
Good job m8! :-+
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #199 on: July 13, 2017, 04:36:13 pm »

In some of your videos you use a pointer that conducts electricity, Not a great idea!

In your NSC800 video
  You talk about many chips replacing one  373.

Most times it is a bad idea to replace the simple with more complex.

So compare the two, Your many chips vs 373.

With the 373, you have a changing of outputs when ALE goes high. ALE going low holds the now un-changing outputs while letting inputs change with no effect.

How many times does your version upset this smooth change of signals?
Does it have times when output goes unknown?
Does it have glitches in the output?
If you are using CPU clock in the circuit, how does a CPU clock frequency change effect the circuit?
Does it _____

Really break down your design and look at the results of your circuit, Really understand it.
Like using an inverter with 374 most have side effects. Some are not so good, some are bad and it is possible that some are great. With out understanding the circuit, you don't know.

By break it down, you are looking at the logic and the time it takes the chips to operate.

Note that the graphs in the datasheet could give you the wrong idea of actual times evolved. Good idea to actually look at the detail in datasheet.

Quote
sorry C I was not able to run arduino bootloader on atmega32a, but I will try my best to get it up and running.

1. Program your current arduino board with ISP program.
2. Connect your  arduino board to atmega32a pins needed to program atmega32a chip.
3. Use link to atmega32a arduino bootloader program for the data to be programmed in to the atmega32a.
4. Now you can use arduino ide to program the atmega32a via the serial port just like your current  arduino board .

Think you know all this, but now you have some numbers to use to get help with problem step.




 
 
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 #200 on: July 15, 2017, 07:21:22 am »
this is the current design before modification:
https://drive.google.com/file/d/0B5vW-k7HbsL4OXg5QnBfeU5lX2s/view?usp=sharing

this is the design after modification:
https://drive.google.com/file/d/0B5vW-k7HbsL4d2ZNazluaVlQb1U/view?usp=sharing

this the design using 74ls541:
https://drive.google.com/file/d/0B5vW-k7HbsL4Ukd1QW4xaWxjb2s/view?usp=sharing



In some of your videos you use a pointer that conducts electricity, Not a great idea!

true, I will change it in the future...
In your NSC800 video
  You talk about many chips replacing one  373.

Most times it is a bad idea to replace the simple with more complex.

So compare the two, Your many chips vs 373.

With the 373, you have a changing of outputs when ALE goes high. ALE going low holds the now un-changing outputs while letting inputs change with no effect.

How many times does your version upset this smooth change of signals?
Does it have times when output goes unknown?
Does it have glitches in the output?
If you are using CPU clock in the circuit, how does a CPU clock frequency change effect the circuit?
Does it _____

I think it will be fine at steady state, but I have my concerns on the transitions, I'm still not sure yet...
at steady state, the circuit will behave as expected and will not create unknown states.
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #201 on: July 15, 2017, 06:29:16 pm »
this is the current design before modification:
https://drive.google.com/file/d/0B5vW-k7HbsL4OXg5QnBfeU5lX2s/view?usp=sharing

this is the design after modification:
https://drive.google.com/file/d/0B5vW-k7HbsL4d2ZNazluaVlQb1U/view?usp=sharing

Both have errors
From what I see in these two circuits, I would think you do not understand how the 374 works.

Re-read the datasheet of the LS374
Then look at NSC800 datasheet
Figures 9a,9b,10a,10b

What is on the 374 outputs? Is it always the low address?
 

One problem has a simple fix in this simple circuit. Connect  LS374 pin 1 to logic low.
This leaves one more problem in above.

this the design using 74ls541:
https://drive.google.com/file/d/0B5vW-k7HbsL4Ukd1QW4xaWxjb2s/view?usp=sharing


I think it will be fine at steady state, but I have my concerns on the transitions, I'm still not sure yet...
at steady state, the circuit will behave as expected and will not create unknown states.

What is the input to output time of the 74LS04?
What is the time  from pin 1 of the 74LS374 to output on?
What is the time  from pin 1 of the 74LS374 to output off?
What is the time  from pin 1 and pin 19 of the 74LS541 to output on?
What is the time  from pin 1 and pin 19 of the 74LS541 to output off?

Now that you have time data, what happens when ALE changes?

Note:  Output off is the High Z state of the output.
          Output on is all output states not High Z

 
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 #202 on: July 15, 2017, 08:22:08 pm »
I think it will be fine at steady state,
I don't think it will be fine because the maximum allowable clock out period is 6.7us. You can't stop the clock, it has to keep going to preserve the CPU state.

The EN pin on a 374 does not control the clock, it enables the outputs. When EN is high the outputs are turned off and all your LEDs will go dark, but the registers inside the 374 will still be clocked. In the first 2 circuits you should connect the inverted ALE signal to CLK, and EN to ground.  The last circuit with the 541 is good, but probably isn't necessary.
 
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 #203 on: July 19, 2017, 07:44:11 pm »
this is the current design before modification:
https://drive.google.com/file/d/0B5vW-k7HbsL4OXg5QnBfeU5lX2s/view?usp=sharing

this is the design after modification:
https://drive.google.com/file/d/0B5vW-k7HbsL4d2ZNazluaVlQb1U/view?usp=sharing

Both have errors
From what I see in these two circuits, I would think you do not understand how the 374 works.

Re-read the datasheet of the LS374
Then look at NSC800 datasheet
Figures 9a,9b,10a,10b

What is on the 374 outputs? Is it always the low address?
 

One problem has a simple fix in this simple circuit. Connect  LS374 pin 1 to logic low.
This leaves one more problem in above.

those are the schematics I tried after the original schematic that used inverted ALE to LS374'S CLK or just ALE to LS374's CLK , with both setups /OE to ground.
they don't work properly as u said previously...

the third schematic is the solution to replace the LS373 and it works in 4 steps :
1)when the ALE is Low:
the /OE of the LS374 is low so the output displays whatever is in the register, while G1-G2 of LS541 are high turning the buffers tri-state.

2) when the ALE transitions from low to high:
the /OE of the LS374 is not effected by transitions but by state; as it gets high there will be a Output Disable time of 25ns*, the CLK of is only effected by positive edges,so whatever is in the register isn't changed, while G1-G2 of LS541 are going low after 15ns* of the transition of the ALE due to the propagation delay of the inverter, the LS541 is going to display the outputs after 38ns* of  G1-G2 of LS541 are going low due to output enable time, and it will take 18ns* for the data in A0-A7 to propagate through the gate.


3)when the ALE is High:
the /OE of the LS374 is high turning the register outputs tri-state, while G1-G2 of LS541 are low showing whatever is happening on the A0-A7.

4) when the ALE transitions from high to low:
the /OE of the LS374 is not effected by transitions but by state; as it gets low there will be a Output Disable time of 25ns*, the CLK of is only effected by positive edges,so whatever is in the register changed to what is in the A0-A7, while G1-G2 of LS541 are going high after 15ns* of the transition of the ALE due to the propagation delay of the inverter, the LS541 is going to display the outputs after 38ns* of  G1-G2 of LS541 are going high due to output disable time.
 
*: note that all times are maximum values from the datasheet from tpHL or tpLH, or tpHZ,tpLZ,tpZH,tpZL propagation delays
I have a poor understanding of these timing diagrams, so I really don't know how do they behave so I assume the timing events are sequential.
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #204 on: July 20, 2017, 12:01:58 am »
Using this
https://drive.google.com/file/d/0B5vW-k7HbsL4Ukd1QW4xaWxjb2s/view

Quote
1)when the ALE is Low:
the /OE of the LS374 is low so the output displays whatever is in the register, while G1-G2 of LS541 are high turning the buffers tri-state.
OK
Quote
2) when the ALE transitions from low to high:
+25ns LS374 off
+53ns LS541 on (15ns + 38ns)
You have a high Z time of 28ns between the two chips.
This is OK
Quote
3)when the ALE is High:
OK
Quote
4) when the ALE transitions from high to low:
+15ns LS374 captures current low address
+25ns LS374 ON 
+43ns LS374 Output changes  (15ns+28ns)
+53ns LS541 OFF (15ns + 38ns)
You have both outputs on for 28ns between the two chips
In addition to this you have old low address changing to current address at 43ns.
You will have one or more bits of low address with different levels.
You are guaranteed a logic level fight for 18ns

A second way to look at this is, when ALE falls you have had a valid low address, but then goes unknown for a time and then back valid while chips die or have a shortened lifetime. 

I would list this circuit as a fail.

With just a LS374 with ALE inverted to LS374's clock. you have a valid low address apx 43ns after ALE, Also important fact is that last valid low address is on low address bus before this time.
The LS374 costs 83ns of valid low address time.
With low address valid 43ns after ALE, this also has to be worked around everything that uses low address.
While the LS374 works you have on going problems with everything that needs low address.
A memory chip that latches it's address on CS will need a delayed CS of ALE low + >43ns

Your circuit above does try to correct these problems, but fails with two outputs enabled at same time glitch after ALE low.

Keep in mind that the logic timing of the Z80 & NSC800 both try to keep need for additional logic to a MIN while using common parts of their time like memory chips.

The timing must work for both the NSC800 and what is connected to the NSC800. For a memory chip to function properly the NSC800 timing must be ok for what the memory chip needs or you have to add extra logic.
 
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 #205 on: July 20, 2017, 03:31:12 am »
+15ns LS374 captures current low address
+25ns LS374 ON 
+43ns LS374 Output changes  (15ns+28ns)
+53ns LS541 OFF (15ns + 38ns)
You have both outputs on for 28ns between the two chips
In addition to this you have old low address changing to current address at 43ns.
You will have one or more bits of low address with different levels.
You are guaranteed a logic level fight for 18ns
There is an easy fix for this possible bus conflict. Just insert two LS04's in series between CLK and OE, which will delay OE by ~18-20ns relative to CLK. With this modification the 374 registers should already be loaded with the correct data by the time OE activates, so both 374 and 541 outputs should be the same. However there might still still be a short-term conflict when ALE goes high.

To eliminate bus 'fighting' you can add add resistors (eg. 1k) in series with the 541 outputs, which will limit current draw if the 541 and 374 outputs are momentarily different. The Mattel Aquarius uses this technique to read character and color data from two different RAM chips at the same time. The resistors effectively split the bus in two during the video display phase, while still allowing data to flow freely to/from either RAM chip during the CPU phase.
 
Quote
The timing must work for both the NSC800 and what is connected to the NSC800. For a memory chip to function properly the NSC800 timing must be ok for what the memory chip needs
This is not a problem if you use fast enough memory. 'Modern' memory chips are much faster than what was available back when the NSC800 was introduced, eg. 70ns vs 250ns.

Older peripheral chips may be a problem, but ali6x944 can cross that bridge when (if) he comes to it. By that time he may been able to source some 373's, but in the mean time why put him off? I say first just try the 374 alone (without the 541) and see what happens!

ali6x944: if you are serious about doing this then you should look at getting an oscilloscope or logic analyzer. It's the only way to see what is actual happening in your circuits. A lowly 5MHz dual trace analog scope should be sufficient.
« Last Edit: July 20, 2017, 03:32:49 am by Bruce Abbott »
 
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 #206 on: July 20, 2017, 06:37:48 am »
Quote
ali6x944: if you are serious about doing this then you should look at getting an oscilloscope or logic analyzer. It's the only way to see what is actual happening in your circuits. A lowly 5MHz dual trace analog scope should be sufficient.
I do have a rigol DS1000Z series scope, but I have big problems with it lately with the second channel vertical ranges, I contacted rigol tech support but no proper reply adressing the issue since I first contacted them in July 5,2017... :-BROKE
 

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 #207 on: July 20, 2017, 08:06:49 am »
I do have a rigol DS1000Z series scope, but I have big problems with it lately with the second channel vertical ranges, I contacted rigol tech support but no proper reply adressing the issue since I first contacted them in July 5,2017... :-BROKE
You can get by with 1 channel, but 2 channels are better for doing comparative timing measurements. What exactly is wrong with the second channel?
 
The following users thanked this post: ali6x944

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #208 on: July 20, 2017, 11:11:12 am »
SN74LS04
[url]http://www.ti.com/lit/ds/symlink/sn54ls04-sp.pdf]http://www.ti.com/lit/ds/symlink/sn54ls04-sp.pdf] [url]http://www.ti.com/lit/ds/symlink/sn54ls04-sp.pdf[/url]
SN74LS374
http://www.ti.com/lit/ds/symlink/sn54ls373.pdf
SN74LS541
http://www.ti.com/lit/ds/symlink/sn74ls541.pdf

As I have stated many times for low address latch,
#1 74ls373 is best choice
#2 74ls374 with inverted clock will work with some costs down stream on low address. The costs here are less valid low address time & loss of when low address is valid. Adding parts it is possible to create a new low address valid, but you might not need to based on what is connected.

#3 The circuit with 74LS374 & 74LS541
 state 2 The high Z time must be >0
State 4 is a mess
More chips might cure problem, but then you have poor design and more chips.
Here you are trying to switch outputs with zero time delay & with out putting old low address on bus again.
The best you could get is the two active outputs with same logic level.
A high Z state time could work but is not a good design.

Think about Bruce's two inverter fix.
From 74LS04 data sheet
max delay is 15ns so two inverters in series is 30ns
But typical is 9ns high & 10ns low for a total of 19ns
This is at load listed in data sheet. Less load could be faster.
Which time also effects the time I listed in last post.
So using typical timing changes times in my list, some places it gets better while others gets worse.
As stated above, the best outcome is still a bad design. 
The resistors on 541 output is also a hack that can cause problems.
Best choice is to call this a bad design and pick #1 or #2 from above

For Good design you need to know when things are valid & not valid..
For a Z80, MREQ tells you two things, It's a memory access and supplies a time reference to when address became valid.
For NSC800 a lot of timing is based on fall of ALE. Time Reference to when address became valid is one of these.

So to stop messing around you need to know what chips you are going to try to use, what memory chips, what IO.
Then you need to look at the timing these chips need to function.

For a memory or IO read with the AD0-AD7 bus  you have the NSC800 driving lines then the memory or IO driving and back to NSC800 driving. You need a high Z time between each change of drive.
For a memory chip this is OE.
For CPU this is normally RD.
Check the timing from the two data sheets.
Here the two High Z times must be >0ns
Note that there is a difference if the memory read is an OP code read or Data read.
You could have four High Z times.

Each timing requirement must be valid.
The RD signal, more times need to be verified.
You now have one pin done on memory chip, repeat for all pins.

Doing this detail work is much quicker then trying to find poor design problems with test equipment.
« Last Edit: July 20, 2017, 03:15:15 pm by C »
 
The following users thanked this post: ali6x944

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #209 on: July 20, 2017, 03:15:53 pm »
ali6x944,
Look at your copy of the NSC800 data sheet.

Page 1
  you should see
"Low-Power CMOS Microprocessor"

You need to look at page 3 to see what this means
VIH   Logical 1 Input Voltage  min 0.8 VCC
VIL   Logical 0 Input Voltage   max 0.2 VCC


When you compute this max 0.2 VCC= 1V and 0.8 VCC= 4V with VCC = 5V
This is CMOS input logic levels.

Lower you see
VOH1 Logical 1 Output Voltage IOUT = -1.0 mA           2.4 V
VOH2 Logical 1 Output Voltage IOUT = -10 uA             VCC -0.5 V
VOL1 Logical 0 Output Voltage IOUT =   2 mA              0.4 V
VOL2 Logical 0 Output Voltage IOUT = 10 uA               0.1 V


You have standard output TTL logic levels for xxx1
and CMOS output for low current pin loads xxx2.

If you look at the SN74HC04
http://www.ti.com/lit/ds/symlink/sn74hc04.pdf
You see that the outputs of the SN74HC04 can meet the required input levels of NSC800

If you look at the SN74LS04
http://www.ti.com/lit/ds/symlink/sn54ls04-sp.pdf
You see that the outputs of the SN74LS04 WILL NOT meet the required input levels of NSC800

An LS or TTL logic output  can not be an input to NSC800

An NSC800 output can be an input to LS or TTL logic.
For HC Logic, There is a problem with NSC800 Logical 1 Output Voltage,
IOUT needs to be some value <-1.0 ma to be > HC High-level input voltage

There is a third logic family HCT which is TTL input levels & CMOS Output levels.

One memory chip I see in your list is MB8464A
This is a TTL input & Output level memory chip.
Read data (ttl level output) from this chip will not meet NSC800 input levels.
The fix is to put a 74HCT245 between the NSC800 & MB8464A and logic to control 74HCT245.


Note the NSC800 output currents above are very low.
Driving LED's directly with NSC800 can be a fail.
best to use an inverter or buffer to drive LED's

Details like this from data sheets in this post need to be correct to have working system.


 
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 #210 on: July 20, 2017, 10:25:17 pm »
Good point on the CMOS input levels. The vast majority of CMOS CPUs are TTL compatible, but the NSC800 is not. It always pays to read the datasheet carefully. For example the Z80 is TTL on all inputs except the clock, which is 0.45V low and Vcc -0.6V high.

74LS04 high output is ~4.25V unloaded, but above 3.5V the low to high transition will be slow due to the low source current. This can be fixed by adding a pullup resistor. However it would be better to use CMOS logic. I threw away most of my LS TTL chips many years ago, and now only use HCT logic (or HC if TTL compatibility is not required). 

The MB8464A shouldn't be a problem. Though the specs say 2.4V minimum, the data outputs are actually CMOS. I tested an MB8464A with 1k pull downs on the data lines and the high level was 4.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 #211 on: July 24, 2017, 10:58:53 am »
Quote
The vast majority of CMOS CPUs are TTL compatible, but the NSC800 is not...
well, that bad I guess.... and its pretty weird...
see I got the NSC800 from an old board, I didn't remember it containing any CMOS compatible or CMOS chips, the fact is all were LS TTL with two or so LM339 comp-op amps and real time clock chip.
its a long time since I saw it so I might be wrong....
https://drive.google.com/file/d/0B5vW-k7HbsL4OXJ0TmpmeFMzT1U/view?usp=sharing
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #212 on: July 24, 2017, 01:15:08 pm »

It's just a detail that has to be correct.

Z80 Clock needs large voltage swings and has lower current drives on output.

A Micro processor tries to make things easy and use less logic on a board.
But in doing so you have to verify that timing works and all logic levels are met.

You should trust the data sheet until you can prove it wrong.
For example, MB8464A data sheet says TTL logic levels, Bruce says "It's OK SEE CMOS level " but that does not mean your MB8464A is CMOS logic, need to test yours if you want to use as CMOS Levels..

 
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 #213 on: July 24, 2017, 01:54:47 pm »
I got the NSC800 from an old board, I didn't remember it containing any CMOS compatible or CMOS chips, the fact is all were LS TTL
TTL compatibility was achieved by using pull-up resistors.   

Quote from: C
Bruce says "It's OK SEE CMOS level " but that does not mean your MB8464A is CMOS logic, need to test yours if you want to use as CMOS Levels..
Never hurts to test. However the vast majority of CMOS memory chips do output full 0-5V logic levels, even if the datasheets don't admit it.
 
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 #214 on: July 26, 2017, 06:23:58 am »
Quote
TTL compatibility was achieved by using pull-up resistors
That's great, but how dose pull-ups effect the VIL and VIH of the processor?
Also I will try to get 74LS373 in the near future...
Thanks a lot for the help m8s :-+
 

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 #215 on: July 26, 2017, 08:48:02 am »
I suggest you try to get 74HC or 74HCT parts. The advantage of HCT is that it is compatible with both CMOS and TTL logic levels. CMOS parts also have lower power consumption, which may become important when you add more ICs.
 
The following users thanked this post: ali6x944

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: help! how to make a nsc800 computer?
« Reply #216 on: July 26, 2017, 02:03:38 pm »

To get high speed out of first Z80's even resistors were not good enought for Clock input. The 74HC or 74HCT parts made it easy to drive Z80 clock input.
Need to remember that old circuits were built with parts on hand or could be purchased at that time. All parts have gotten better over time. First ram chip was 1k bytes and used a lot of power. A 2k byte replaced it in some places. If you design using old parts you will probably see higher costs , more chips and less function.

A 373 does not cost much, but you could save time and money with an order of more parts.

Would suggest you try to draw up what you want connected to the NSC800. Check out as much as you can like logic levels and timing. Then let some of us here look at design, Could save you a lot of time.

Keep in mind that I think getting a Z80 running will be faster, and with this step complete the NSC800 could be easer.

 
 
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 #217 on: July 27, 2017, 02:22:46 pm »
I received the TL866CS programmer this morning, I tested it and it was working nicely :-+
I started to read the roms and saw a couple of interesting things...
the NSC800N I have probably came from some automotive engine tester, I presume from the roms...
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #218 on: July 27, 2017, 02:25:12 pm »
I tested many others and they contain code I guess... ???
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #219 on: July 30, 2017, 05:44:37 am »
The question repeats its self, how dose the pull-ups effect the VIH and VIL of the nsc800n?
Also I got an LS373 finally and I guess we can move on finally to the computer memory since I have the Minipro programmer up and running...
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16276
  • Country: za
Re: help! how to make a nsc800 computer?
« Reply #220 on: July 30, 2017, 06:54:20 am »
Z80 is only really able to drive 2 LSTTL inputs on the output lines, so a buffer is mandatory on all output lines to get reliable operation at high speeds. If you run without buffers the output is not going to always be able to discharge the line capacitance fast enough going from 1 to 0, so the data latched ( always latched at the clock transition, though the time before is required for non clocked logic to ripple through to the correct state) will eventually be wrong. Buffers must be driven from a fast buffer, driven by the Z80 to select direction for the data bus.

This is because the Z80 was originally made in Nmos and this has TTL compatability, but it is not as high current capable as a bipolar TTL device, and thus the on state resistance of the switches in the IC will be less able to discharge or charge the capacitance of longer data buses. At least the Z80 clock is able to be driven from TTL levels, the original 8080 required a much stricter clock drive, with much steeper edges and much higher currents into the clock, and often had the clock running off a 12V rail and diode clamps to provide the fast edges and high level voltage.
 
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 #221 on: July 30, 2017, 03:31:26 pm »
Z80 is only really able to drive 2 LSTTL inputs on the output lines, so a buffer is mandatory on all output lines to get reliable operation at high speeds...

This is because the Z80 was originally made in Nmos and this has TTL compatability, but it is not as high current capable as a bipolar TTL device, and thus the on state resistance of the switches in the IC will be less able to discharge or charge the capacitance of longer data buses.
True, but this may not apply to a small system which doesn't operate at 'high' speeds or have 'longer' buses.

One famous example - the Sinclair ZX81- had a Z80 clocked at 3.25MHz driving two 1K RAM chips, ROM, keyboard matrix (!), and bipolar ULA (uncommitted logic array) without any bus buffers. I built a backplane for it which had 4 slots for extra RAM and I/O devices - no buffers! And it all worked perfectly.


 
The following users thanked this post: ali6x944

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16276
  • Country: za
Re: help! how to make a nsc800 computer?
« Reply #222 on: July 30, 2017, 03:47:52 pm »
Zilog only guaranteed that it would drive 2 LSTTL loads, but a typical chip would drive more at room temperature. Problems arose with long bus lines, extremes of clock speed and running near the extremes of supply voltage range and temperature. Run at 4V5 and at 0C and most would work, but a few would give occasional glitches. Zilog wanted it to work from -55C to 125C and from 4V5 to 5V5 with absolutely no glitches at all.
 
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 #223 on: July 30, 2017, 04:08:43 pm »
so would I need buffers between the LS373 and NSC800?
and the question repeats its self, how dose the pull-ups effect the VIH and VIL of the nsc800n?
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16276
  • Country: za
Re: help! how to make a nsc800 computer?
« Reply #224 on: July 30, 2017, 04:47:51 pm »
LS373 and the LS240 are the bus buffers, used to buffer the most common data, address and control buses out of the chip so they can drive much higher loads. Direction on the bus buffer has to be connected to enable the right flow of data, and as you likely will have some slight probability of bus contention there normally is a series resistor of 33R in each of the 8 data bus pins that serves both as current limiting and damping. Generally works without them, but a lot of designs do use them.
 
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 #225 on: July 30, 2017, 09:31:56 pm »
Zilog only guaranteed that it would drive 2 LSTTL loads,
Z80 VOL <=0.4V @ 1.8mA, VOH >= 2.4V @ 250uA. LSTTL unit load is 400uA low and 20uA high, so it should be able to drive at least 4 LSTTL loads.

The NSC800 is rated for <=0.4V at 2mA and >=2.4V at 1mA, so it should be able to drive at least  5 LSTTL loads.

However I would avoid LSTTL if possible, for versatility and to save power. A 74LS373 alone draws 30-40mA.  My entire SBC with CMOS Z80, ROM, RAM and SIO draws less than 20mA. This might not seem like a big deal, but the more TTL (and NMOS) you use the higher the current draw. HCT logic gives you CMOS and TTL compatibility with low power consumption, and is more readily available.

Quote from: ali6x944
and the question repeats its self, how dose the pull-ups effect the VIH and VIL of the nsc800n?
Pullups don't affect input thresholds. However they do raise VOL on outputs, increase power supply current, and of course make the build more complex. Use them when necessary, avoid them if you can.
 
 
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 #226 on: August 08, 2017, 06:54:19 am »
Zilog only guaranteed that it would drive 2 LSTTL loads,
Z80 VOL <=0.4V @ 1.8mA, VOH >= 2.4V @ 250uA. LSTTL unit load is 400uA low and 20uA high, so it should be able to drive at least 4 LSTTL loads.

The NSC800 is rated for <=0.4V at 2mA and >=2.4V at 1mA, so it should be able to drive at least  5 LSTTL loads.

However I would avoid LSTTL if possible, for versatility and to save power. A 74LS373 alone draws 30-40mA.  My entire SBC with CMOS Z80, ROM, RAM and SIO draws less than 20mA. This might not seem like a big deal, but the more TTL (and NMOS) you use the higher the current draw. HCT logic gives you CMOS and TTL compatibility with low power consumption, and is more readily available.

Quote from: ali6x944
and the question repeats its self, how dose the pull-ups effect the VIH and VIL of the nsc800n?
Pullups don't affect input thresholds. However they do raise VOL on outputs, increase power supply current, and of course make the build more complex. Use them when necessary, avoid them if you can.
 
thanks m8 :-+
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #227 on: August 08, 2017, 08:19:52 am »
Finally I got the Z80 and the MC68B50P from ebay...
I will test them and inform u ASAP. :-+
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #228 on: August 08, 2017, 12:30:06 pm »
also I have managed to upload the arduino bootloader in the ATMEGA32A but I'm having problems with S221116_R110517_Z80.ino its not uploading...
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #229 on: August 08, 2017, 03:34:56 pm »
For the Z80s all 3 I bought from ebay doesn't work  |O
this is the seller beware:
http://www.ebay.com/usr/adeleparts2010?_trksid=p2057872.m2749.l2754
now I'm trying to figure out a way to test the MC68B50P, If any one knows post please :-+
 

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 #230 on: August 08, 2017, 07:37:26 pm »
For the Z80s all 3 I bought from ebay doesn't work  |O
this is the seller beware:
http://www.ebay.com/usr/adeleparts2010?_trksid=p2057872.m2749.l2754
I have bought a few parts from this vendor and they were all good. Vintage chips are usually 'pulls' from old equipment, which have been cleaned up and relabeled. Sometimes an 'equivalent' part number is used, either to fake a higher spec chip or because they couldn't be bothered changing the label template. 

Your Z80's might be 'fake', however there is a chance you just didn't test them properly. Can you show us photos of the chips and your test circuit?

Quote
now I'm trying to figure out a way to test the MC68B50P, If any one knows post please :-+
To check that a chip is not a 'fake', I start by measuring between pins with a multimeter on 'diode test'. NC (no connect) pins should be open circuit. I/O pins usually have ESD protection diodes that conduct when GND (Vss) is positive and the I/O pin is negative. Between Vss and Vcc you should see a lower diode voltage due to the larger parasitic substrate diode.

On the 6850 Vss is pin 1 and Vcc is pin 12.  A 'fake' chip is more likely to have Vss on pin 12 and Vcc on pin 24. So start by doing a Diode Test on pin 1 (+) to pin 12 (-) and on pin 12 (+) to 24 (-). If 1-12 has a lower diode voltage than 12-24 then the power pins are probably correct. Now put the chip in a breadboard and apply power through a current-limited supply. Compare current draw to the specifications. The 6850 datasheet doesn't specify current draw directly, but power dissipation is stated to be 300mW typical 525W max, which corresponds to 60-105mA at 5V.
 
Assuming it draws close to the expected current you can then put signals on input pins and see what happens. Use pull up and pull down resistors to deselect the chip (ie. CS0/1 low, CS2 high). The data bus and other inputs should then be high impedance, while output pins will be stuck high or low. I test pin status by touching the pin with my finger (to inject AC mains noise) while monitoring the voltage with a scope probe. High impedance input pins will rectify the AC waveform as it goes below ground, while output pins will stay high or low.

If all the pin states seem to match the datasheet then you probably have a genuine chip (though it might be a different variant, eg. 6850 vs 68B50). As a further check you can enable the chip for reading (CS0/1 high, /CS2 low, /WR high, toggle E low->high) and see if anything appears on D0-D7.
 
To fully test it you would need to need to set up internal registers and send/receive characters. This could be done with an Arduino.

 
 
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 #231 on: August 08, 2017, 08:01:00 pm »
I searched for 'Z80' on that vendor's site and only found 'Z84C0020' (20MHz CMOS Z80 CPU). Real 20MHz Z80's are quite rare, so these are probably relabeled NMOS Z80's, which are slower and have a static current draw of ~150mA. I got a few of these 'fakes' off eBay a few years ago. In disgust I couldn't be bothered properly testing them until last week. They actually work fine at 8MHz, though I suspect they are really 4MHz parts (measured clock to address delay was ~35ns, about the same as a genuine 4MHz CMOS Z80).   

If you want a CMOS Z80 then look for 8MHz or 10MHz parts, which are more likely to be correctly labeled.
 
 
The following users thanked this post: ali6x944

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 #233 on: August 09, 2017, 05:35:46 am »
Quote
On the 6850 Vss is pin 1 and Vcc is pin 12.  A 'fake' chip is more likely to have Vss on pin 12 and Vcc on pin 24. So start by doing a Diode Test on pin 1 (+) to pin 12 (-) and on pin 12 (+) to 24 (-). If 1-12 has a lower diode voltage than 12-24 then the power pins are probably correct. Now put the chip in a breadboard and apply power through a current-limited supply. Compare current draw to the specifications. The 6850 datasheet doesn't specify current draw directly, but power dissipation is stated to be 300mW typical 525W max, which corresponds to 60-105mA at 5V.
for the Z80s the seller gave me a refund so that is good...
I tested both 6850 for the supply configuration and it was correct, the current draw however is not promising...
I will finish testing and inform you with the results ASAP. :-+
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #234 on: August 11, 2017, 12:45:24 am »
Both chips I tested gave me a current draw of 48.5-50mA,
I think this is a step in the right direction...
Quote
Assuming it draws close to the expected current you can then put signals on input pins and see what happens. Use pull up and pull down resistors to deselect the chip (ie. CS0/1 low, CS2 high). The data bus and other inputs should then be high impedance, while output pins will be stuck high or low. I test pin status by touching the pin with my finger (to inject AC mains noise) while monitoring the voltage with a scope probe. High impedance input pins will rectify the AC waveform as it goes below ground, while output pins will stay high or low.
The first chip I tested did the things you described, the second chip how ever is playing on me, the RX data is high and the data bus is high, TX and RX CLK is high,and a couple more weird things, but it dose rectify the AC noise.
 

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 #235 on: August 11, 2017, 05:18:44 am »
the second chip how ever is playing on me, the RX data is high and the data bus is high, TX and RX CLK is high,and a couple more weird things
That doesn't sound good, but don't throw it away yet. The other chip is probably OK, so use it first and when you get it going you can try this one in the same circuit.

I bought a re-marked  AY-3-8910 which had about 150uA pullup current on all the data lines and a peculiar signal coming out of the 'test' pin. I thought it was either faulty or fake, but then I bought a bunch more genuine chips which did the same thing. Turns out that early AY-3-8910's have pullups on the data bus, but the later 'A' version doesn't. This change appears to be undocumented (I cannot find any reference to it in the datasheets).

The attached photo shows my current stash of  AY-3-8910's bought from various eBay sellers. You can clearly see differences between those that have been re-marked and the 'genuine' chips which still have their original markings. The originals have dull markings, clear injection marks, and some scuffing and scratches. The two re-marked chips have suspiciously bright markings, and the injection marks are almost invisible because the surface has been sanded down and 'blacktopped'. Also notice that the two 'new' chips have the General Instrument logo, but visibly older chips have the Microchip Logo - which is not possible unless the 'new' chips have been re-marked because GI spun off their IC production to Microchip in 1987.   

However despite their dodgy history all these chips work perfectly (as do the 6 others that are in use) which proves that they are actually genuine! The latest batch I purchased all had original markings. This suggests that at least some suppliers may be rethinking their strategy. A beat-up old chip might not look so nice, but inspires more confidence than one which has had the original markings filed off.

Many of these old chips are now 'vintage' and so may be worth more if they still have the original markings. Note the RAD38910 at the bottom right of the photo. This was the Radofin 'in-house' version that was used in the Mattel Aquarius. Apart from the label it's actually identical to a normal AY-3-8910.
 
« Last Edit: August 11, 2017, 05:24:08 am by Bruce Abbott »
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #236 on: August 12, 2017, 07:42:38 am »
 The markings on mine are rather dull too, which is promising  but I can not read the date code on it quite well...
Question: when was the MC68B50 discontinued? This will give a good indication for us to determine if its fake or not :-+
 

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 #237 on: August 12, 2017, 09:22:51 am »
They appear to be 'blacktopped' (ie. painted matt black, including over the injections marks) which indicates that they are re-marked - though not necessarily fake. Compare to the attached photo of two original Motorola chips in my collection.

The only way to really be sure if it's a fake or not is try it in a circuit. If it works as expected then it is at least a variant of the MC6850. 
 
BTW by comparing package shapes I figured out that my '20MHz' Z80's are actually Sharp LH0080, a popular 2nd source for the 4MHz NMOS Z80.
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #238 on: August 12, 2017, 03:07:01 pm »
Well, I think that we are going in the right direction :-+
But remember the 74LS373, I tested it with my TL866CS and it was bricked...
I will however buy a new chip today, hopefully... :scared:
















 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #239 on: August 13, 2017, 06:03:47 pm »
I got it now,  no worries :-+
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #240 on: August 14, 2017, 04:03:04 pm »
I got myself 4 74HC373 and 1 Z80 CPU for reference...
all good now, sadly enough the local waves store does not have a UART chip like MC68B50 or the Z80 SIO....
but its ok :-+
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #241 on: August 17, 2017, 08:26:52 am »
I'm trying to make the clock stop circuit work, but with no luck...
Also I have cleaned up the wiring  and used 74LS04 inverter to replace the shorted input NAND gates.
https://drive.google.com/file/d/0B5vW-k7HbsL4azBDVW5DWGJoeHc/view?usp=drivesdk
Note that because I couldn't make the clock stop circuit -in the right-  work, I have just contacted Xin And Xout to a 4MHz crystal and its supporting circuitry.
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #242 on: August 17, 2017, 10:59:21 am »
Note that active high signals like S0 and S1 light up when they are active while active low signals like /WR and /RD and IO//M light up when its low.
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #243 on: August 22, 2017, 09:16:20 am »
It kind of works now after I changed the transistor, it stops the cpu's operation and still keeps the address and data bus unchanged even if the cpu is resetted
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #244 on: August 22, 2017, 05:32:49 pm »
I think we are done with CPU control circuitry,  the CPU clock stop circuit is working and the reset is working... :-+
now I have done some work regarding the memory map of the CPU, and I really want to implement somethings like Basic,   so I need some advice...

so far I know that the NSC800 can address 64K bytes of memory, regardless of the type, so what I understand is that I have a 64k byte margin to fit the ROM and RAM stuff in...right? :-//

so I have been thinking of using the first 16K bytes for ROM both for the BASIC and the OS ROM images which I can easily fit in a 39SF010A, it will start from address 0x00 to 0x1F400.
while the rest 48K be RAM, starting from 0x1F401 to 0x5DBFF. NOTE that the ram is made with 3 chips, 2 8K and 1 32k RAMs or with 2 32K byte RAMs with one of them with addresses A14-A12 Pulled low.
alternatively I thought of using only 32K ; because it would make it easier to make.

 
 

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 #245 on: August 23, 2017, 07:45:35 am »
so far I know that the NSC800 can address 64K bytes of memory, regardless of the type, so what I understand is that I have a 64k byte margin to fit the ROM and RAM stuff in...right? :-//
Yes.

Quote
alternatively I thought of using only 32K ; because it would make it easier to make.
32K should be plenty, unless you are running CP/M in which case you need RAM at 0x0000-7FFF. So put your 32K RAM at 0x8000-FFFF, then you only need to decode A15 (low = ROM, high = RAM). If later you decide to run CP/M you can add another 32K RAM, switched in over the ROM to give a total of 64K.
 
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 #246 on: August 23, 2017, 04:00:18 pm »
Quote
Quote
alternatively I thought of using only 32K ; because it would make it easier to make.
32K should be plenty, unless you are running CP/M in which case you need RAM at 0x0000-7FFF. So put your 32K RAM at 0x8000-FFFF, then you only need to decode A15 (low = ROM, high = RAM). If later you decide to run CP/M you can add another 32K RAM, switched in over the ROM to give a total of 64K.
How can I have 64K of RAM and have ROM? Or how can I switch from RAM to ROM if the max address is the same? Also is microsoft BASIC an OS or a system language?
And I want to add on the memory map another consideration, I'll use a GDC which is the uPD7220, do I make it share  RAM with the CPU or have its own separate RAM?
 

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 #247 on: August 23, 2017, 05:39:12 pm »
How can I have 64K of RAM and have ROM? Or how can I switch from RAM to ROM if the max address is the same?
You can have ROM and RAM at the same address if only one of them has its outputs enabled at a time. To switch between them you can have a latch (accessed at an I/O location) which steers decoded /RD to either ROM /OE or RAM /OE. RAM /CE can be activated for both reading and writing, so writing to 'ROM' causes data to be stored in RAM even when the ROM is selected for reading.

On power up the latch is reset, so the CPU gets valid instructions and vectors from ROM. You can then copy code from ROM to RAM, switch to RAM and continue processing with all RAM. This is practically required for CP/M because 'transient' programs are loaded from disk starting at location 0x0100. It also makes user RST vectors more efficient because you can modify them directly, rather than having fixed vectors in ROM which jump into RAM at a higher address.
         
Quote
Also is microsoft BASIC an OS or a system language?
It can be both. The versions designed for ROM based computers have the OS built in. Since BASIC is interpreted it can also act as a user interface, with 'direct' commands that are typed in by the user. The original IBM PC had BASIC in ROM. If you didn't have a boot disk (or a disk drive, which was optional!) it would boot into BASIC.   

Quote
I'll use a GDC which is the uPD7220, do I make it share  RAM with the CPU or have its own separate RAM?
The uPD7220 has its own separate RAM. The host CPU interface has only 2 memory locations, which are usually mapped into I/O space. It can also access the host memory via DMA, but this is also memory <-> I/O.
 
 
« Last Edit: August 23, 2017, 05:40:58 pm by Bruce Abbott »
 
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 #248 on: August 24, 2017, 04:52:23 pm »
thanks m8 :-+
and for the full 64K RAM-ROM switching I was thinking of using the control and status outputs in the NCS800; so depending on the Machine cycle the following happens:
A) in Opcode Fetch: S0 & S1 & /M & /WR are active, so the ROM is selected, and read from.
B) in Memory Read: S1 & /M & /WR are active, so the RAM is selected, and read from.
C) in Memory Write: S0 & /M & /RD are active, so the RAM is selected, and written to.
in a similar way, we could do the I/O's and peripherals... I guess  :-\
but I'm not sure how to create the logic for the switching and what are the downsides to the full 64K RAM-ROM switching method...
 
 

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 #249 on: August 24, 2017, 09:12:11 pm »
A) in Opcode Fetch: S0 & S1 & /M & /WR are active, so the ROM is selected, and read from.
B) in Memory Read: S1 & /M & /WR /RD are active, so the RAM is selected, and read from.
Unfortunately that won't work because many instructions have immediate data after the opcode, which would be read from the wrong memory.

Quote
C) in Memory Write: S0 & /M & /RD /WR are active, so the RAM is selected, and written to.
This will work. You are effectively writing 'under' the ROM into RAM. The ROM could even still be selected, but won't interfere because it only responds to reads (S0 & /M & /RD -> /OE). 

Quote
I'm not sure how to create the logic for the switching
You just need 1 bit of output at some I/O location, going to a MUX that steers /OE to ROM or RAM. This could be done with eg. a D F/F and and a few NAND gates. The output bit must be reset on power up (and perhaps hardware reset) to ensure that the machine starts with the system ROM active, so use a F/F with reset input or an I/O chip which sets its outputs to known states on power up.

This is commonly called 'bank switching' or 'sideways RAM/ROM' and was done in many vintage home computers such the Amstrad CPC, Commodore 64 and BBC micro.

Quote
and what are the downsides to the full 64K RAM-ROM switching method...
Switching between ROM and RAM can be tricky because you can't switch the ROM out while you are in it unless the underlying RAM has valid instructions. One way to deal with this is to simply copy the code from ROM to RAM before switching. Another way is to put a small routine in 'common' ROM or RAM which has the switching code in it. With this method you can have an almost unlimited number of ROMs or RAM banks in the same space. 

For example The Amstrad CPC6128 has 128k of RAM plus lower and upper 16k ROMs. The memory is divided into 4 banks which can be mapped to various combinations of ROM and RAM. When ROM is enabled at 0x0000-3FFF or 0xC000-7FFF the 'underlying' RAM can still be written to. Bank switching is controlled by an output port made from a PAL which has been programmed with a useful selection of mappings. This enables the machine to run CP/M with almost 64k of TPA (Transient Program Area) plus 16k of screen RAM and another 48k of RAM which can be used as a RAM disk or for storing data. It also allows games to use the full 128k and still access the system and disk ROMs if needed. Up to 252 ROMs can be added as well as another 4MB of RAM.

Another downside is that RAM can be corrupted by errant writes, whereas ROM is immune. This shouldn't happen unless you have a hardware fault or buggy software, but reduces reliability in harsh environments (RAM can be corrupted by power glitches or brownouts).

The memory expansion I developed for the Mattel Aquarius has 32k RAM, 16k of which can be mapped into game cartridge ROM space (creating a 'soft' ROM cartridge). In this mode the RAM is enabled for reading only (no writes) because several games are known to 'randomly' write to the ROM while running (I don't know whether this is due to bugs or by design). I use a latch that is set via an I/O port but only reset on power up. This prevents the 'soft' ROM from switching itself out once it has been activated.   
 
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 #250 on: August 27, 2017, 04:56:24 am »
I saw these in the web yesterday, the 8085 is incredibly similar to the NSC800 form an interfacing prospective, I think they could be adapted to the NSC800...
https://drive.google.com/file/d/0B5vW-k7HbsL4dE9kdkFEM1VNR2c/view?usp=drivesdk
https://drive.google.com/file/d/0B5vW-k7HbsL4NzB2Tjh2Uk1kc0k/view?usp=drivesdk
 

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 #251 on: August 27, 2017, 07:38:07 am »
The NSC800 was designed to replicate the bus interface of the 8085, but with Z80 registers and instruction set. It also has the Z80's DRAM refresh and interrupt modes.

Provided you are not using dynamic RAM or peripherals that use Interrupt Mode 2, the 8085 should be BUS compatible. Only problem is the pinouts are completely different, so it won't be a 'drop in' replacement.   
 
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 #252 on: August 27, 2017, 02:00:04 pm »
This is great news :-+
But what is interrupt mode 2? Is there way to fix the problem?
Also don't worry about the cpu's RAM its all SRAM.
 

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 #253 on: August 27, 2017, 05:45:19 pm »
But what is interrupt mode 2? Is there way to fix the problem?
Either don't use peripherals that need IM2, or stick with the NSC800.

Quote
Also don't worry about the cpu's RAM its all SRAM.
This is not so much of a problem now as it was when the NSC800 was developed. Back then static RAM was very expensive. I was paying $24 each for HM6116's, which would be over $300 for 32k. Still, even at that price it was worth it for the simpler circuit and battery backup capability.

The advances in memory density are staggering. In the early '80s I scavenged a 64k RAM expansion from an 8 bit IBM mainframe. It used 2102 1kx1 static RAMs and was the size of a small suitcase. Many desktop computers used 2116 16kx1 DRAMs, which needed +12V and -5V (and tended to blow up if the power was sequenced wrong). Then some Japanese companies developed a 64kx1 +5V only DRAM, and everyone went mad. Over 64 thousand transistors in a single chip!
       
 
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 #254 on: August 28, 2017, 04:07:59 am »
It is really interesting to know about the development of RAMs over the years but why did the older cpus like the intel 8080 and older ram used so many supply voltages?
Also I am currently checking the wiring of the first schematic  , I have wired both the AS6C62256 32k SRAM and the SST39SF010 1M-bit flash eeprom...
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #255 on: August 28, 2017, 09:53:57 am »
I finished testing, and the result is weird...
the S0 and S1,/RD,/WR,/M indicator LEDs were all active which means its in Acknowledge of Interrupt state, note that its not a power-up quirk and I have checked all interrupt pins and they were pulled high as should be , also when I click on reset button the /RD and /WR are disabled which indicate that it is working...
I will try to use the working channels on my scope to test if  its really working in Acknowledge of Interrupt state because its really hard to tell if the LEDs are flashing :-+
note that the eeprom is new thus all positions are 0xFF in the eeprom and suspect this is the responsible...
 

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 #256 on: August 28, 2017, 07:04:23 pm »
Quote from: ali6x944
why did the older cpus like the intel 8080 and older ram used so many supply voltages?
The higher voltage was needed to power the transistors used in them. Some very early digital chips used depletion mode PMOSFETs that ran on 12~17V (eg. National Semiconductor's SC/MP).  Early dynamic RAMs also needed a negative bias voltage. Later DRAMs generated the negative bias voltage internally.

The Intel 8080 and Texas Instruments TMS9900 (used in the Ti99/4A) are probably the only popular CPUs that needed multiple power supplies. Other lines such as the 2650, Z80, 6800 and 6500 were always +5V only. The RCA CDP1802 could take up to 10V, but was normally run on 5V.

Quote
note that the eeprom is new thus all positions are 0xFF in the eeprom and suspect this is the responsible...
0xFF is RST 38, the external interrupt vector. With the ROM filled with this value it will continuously jump to 0x0038 while (attempting to) push the PC onto the stack.

BTW I just received these from eBay seller hifi-szjxic. Genuine original 'unretouched' and well used ICs! (described honestly as such in their listings). I am now designing a PCB for the NSC800.
 
 
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 #257 on: August 29, 2017, 05:11:04 am »
Cool :-+
Now both of us will have the same reference point, but what will you use your NSC800 for?
I suspect some graphics related application, from the RGB to NTSC/PAL Encoder... :)
I hope you best of luck in your project :-+
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #258 on: August 29, 2017, 09:28:32 am »
I have flashed the ROM to all 0x00 but the LEDs are still on...
 

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 #259 on: August 29, 2017, 07:40:09 pm »
I have flashed the ROM to all 0x00 but the LEDs are still on...
Can you upload a photo of your current setup? A schematic too if you can draw one.

For single-stepping the CPU you may able to use the /PS pin. Here's what the datasheet says about it:-

Quote
9.4 POWER-SAVE FEATURE
The NSC800 provides a unique power-save mode by the
means of the PS pin. PS input is sampled at the last t state
of the last M cycle of an instruction. After recognizing an
active (low) level on PS, The NSC800 stops its internal
clocks
, thereby reducing its power dissipation to one half of
operating power, yet maintaining all register values and in-
ternal control status.
The NSC800 keeps its oscillator run-
ning, and makes the CLK signal available to the system.
When in power-save the ALE strobe will be stopped high
and the address lines [AD(0–7), A(8–15)] will indicate the
next machine address
. When PS returns high, the opcode
fetch (or M1 cycle) of the CPU begins in a normal manner.
 
 
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 #260 on: August 30, 2017, 04:19:49 pm »
https://drive.google.com/file/d/0B5vW-k7HbsL4YlNjZ3F1aEJtdXM/view?usp=drivesdk
This is the setup, and for the schematic I used the first configuration, the one without the mux.
I must say it is a pretty smart trick, but using the /ps control at 4MHz clock is pretty difficult in the sense that how can I step single instructions if some has different numbers t states and M cycles ?
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12851
Re: help! how to make a nsc800 computer?
« Reply #261 on: August 30, 2017, 05:22:11 pm »
I must say it is a pretty smart trick, but using the /ps control at 4MHz clock is pretty difficult in the sense that how can I step single instructions if some has different numbers t states and M cycles ?
That would be fairly simple - like two 74xx series chips and two switches.  First you need to decode the Opcode Fetch state. See the first row of the table on page 9 of the datasheet.  A 74xx138 3 to 8 line decoder could do the job, generating a low going /M1 pulse during Opcode Fetch.  Connect that /M1 pulse to the /CLR pin of 1/2 74xx74 dual D type flipflop, with its Q output connected to NCS800 PS pin.  Connect a Step/Run switch and a pullup to the flipflop's /PRE input to force Q high for Run mode. Use the other half of the flipflop as a debouncer - pullups and a SPDT pushbutton grounding /PRE when pressed and /CLR when released, unused inputs tied low - output from Q to CLK of first half to clock in a '1' from the first half  D pin which needs to be tied high. 

Result:  It runs with the toggle switch at Run, and single steps on a button push when its at Step.   You could also hook up the output of a 555 timer to effectively press the step button (use the Discharge pin and wire it to /PRE) to apply a slowish variable auto-step pulse to let you 'slow run' it.

It does however have a flaw - Z80 instructions that take a prefix (i.e. the modifiers to operate on IX and IY  rather than HL) and bit instructions etc. have two M1 cycles, so you have to press the button an extra time for every prefix.  Decoding the prefixes to detect multi-M1 instructions is more trouble than its worth without a GAL or FPGA.

You've got plenty of space on your breadboards and should be able to hook it up in half an hour or so.
« Last Edit: August 30, 2017, 05:25:22 pm by Ian.M »
 
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 #262 on: September 02, 2017, 09:01:27 am »
I must say it is a pretty smart trick, but using the /ps control at 4MHz clock is pretty difficult in the sense that how can I step single instructions if some has different numbers t states and M cycles ?
That would be fairly simple - like two 74xx series chips and two switches.  First you need to decode the Opcode Fetch state. See the first row of the table on page 9 of the datasheet.  A 74xx138 3 to 8 line decoder could do the job, generating a low going /M1 pulse during Opcode Fetch.  Connect that /M1 pulse to the /CLR pin of 1/2 74xx74 dual D type flipflop, with its Q output connected to NCS800 PS pin.  Connect a Step/Run switch and a pullup to the flipflop's /PRE input to force Q high for Run mode. Use the other half of the flipflop as a debouncer - pullups and a SPDT pushbutton grounding /PRE when pressed and /CLR when released, unused inputs tied low - output from Q to CLK of first half to clock in a '1' from the first half  D pin which needs to be tied high. 

Result:  It runs with the toggle switch at Run, and single steps on a button push when its at Step.   You could also hook up the output of a 555 timer to effectively press the step button (use the Discharge pin and wire it to /PRE) to apply a slowish variable auto-step pulse to let you 'slow run' it.

It does however have a flaw - Z80 instructions that take a prefix (i.e. the modifiers to operate on IX and IY  rather than HL) and bit instructions etc. have two M1 cycles, so you have to press the button an extra time for every prefix.  Decoding the prefixes to detect multi-M1 instructions is more trouble than its worth without a GAL or FPGA.

You've got plenty of space on your breadboards and should be able to hook it up in half an hour or so.
Sorry , but I didn't understand your circuit layout and theory of operation... :-[
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12851
Re: help! how to make a nsc800 computer?
« Reply #263 on: September 02, 2017, 10:38:28 am »
I've drawn it out from the above description.

  • When SW1 is closed, it forces U2B:Q and /PS high allowing the NSC800 to run normally.
    .
  • When SW1 is open, /M1 from the state decoder clears U2B, taking /PS low during instruction fetch and stopping the NSC800 at the end of the instruction cycle.  Pressing SW2 clocks a single '1' into U2B, releasing /PS till the next M1 cycle.  U2A is wired as a SR flipflop and debounces SW2.
    .
  • The optional 555 circuit is a simple slow squarewave oscillator, with a switched potentiometer so it can be turned off.  When on, it is equivalent to repeatedly pressing the step button.  Holding down the step button would pause the autostep feature.

H.T.H.
« Last Edit: September 02, 2017, 01:14:34 pm by Ian.M »
 
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 #264 on: September 02, 2017, 01:10:17 pm »
Thanks a lot Ian :-+
I will build it now and inform you with the result. :-+
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #265 on: November 18, 2017, 05:32:52 pm »
Hi everybody,
it has been a while now, sorry for the late reply...
I was having problems with my scope as you know and I needed to send it to China.
It is fixed now, and again sorry for the late reply.
the circuit is not working properly the /PS line does not change at all, no matter what I do the /PS line stays at 5v...
I checked the connections and they seem alright, the 555 timer oscillates as expected, everything seems ok... :-//
quick question thou, is Y7/6/5/4/2/1/0 connected to anything?
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12851
Re: help! how to make a nsc800 computer?
« Reply #266 on: November 18, 2017, 06:13:03 pm »
No, the other /Yn pins aren't connected to anything - you might need them later for peripheral interfacing.

Are you getting low going /M1 pulses for each instruction?   
Is U2A debouncing the stepPB button and producing a clean high going output on  its Q pin, and are you seeing a repeating high going pulse at its Q pin when the 555 is enabled?
 
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 #267 on: December 14, 2017, 08:25:20 pm »
 It is working now :-+
It was the bloody NE555 when I replaced it with the cmos TLC555CP it worked nicely :-+
Thanks a lot Ian  :-+
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #268 on: December 19, 2017, 07:13:50 am »
I will use the following addressing technique:
https://drive.google.com/file/d/0B5vW-k7HbsL4dE9kdkFEM1VNR2c/view?usp=drivesdk
Again I have reflashed the rom to 0x00 but I will not connect the ram just yet to see if it will work or not...
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #269 on: January 03, 2018, 04:53:54 pm »
https://drive.google.com/file/d/1xskY6pgiYRTDF3C9KDveT1otbeTKdtm-/view?usp=drivesdk
Here it is, the circuit seems to work ....
Y0 on the memory decoding 74ls138 is switching that's good...
But the data bus displays a binary 00111000, which seems to be a conditional jump to program location with respect to program counter and the displacement d, based on limited testable flag status. Most specifically opcode 38 or "JR C,d2"
I guess.
 

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 #270 on: January 03, 2018, 06:16:32 pm »
Which output of the LS138 is active? What is the memory address, and what data were you expecting?
 
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 #271 on: January 04, 2018, 02:30:58 am »
Only Y0 and Y1 are going low and high forming some sort of switching action...
I have flashed the rom to 0x00 so I would be expecting nops.
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #272 on: January 04, 2018, 02:54:01 am »
To be more exact, the address bus should be incrementing  while the data bus should show nops.
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: help! how to make a nsc800 computer?
« Reply #273 on: January 06, 2018, 02:55:29 pm »
but the address bus only increments if the clock the 4 MHz clock is not interrupted by the /PS line going low...
basically when SW1 is pushed the circuit seems to run correctly...
but what I don't understand is why the data bus doesn't show nops?    :-//
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf