help! how to make a nsc800 computer? - Page 1
Forum section: electronics / general

author: ali6x944
author_rank: Frequent Contributor
timestamp: January 31, 2016, 05:18:02 pm
content: help! how to make a nsc800 computer?and how to upload a simple sketch on it?please help!datasheet:

author: miguelvp
author_rank: Super Contributor
timestamp: January 31, 2016, 05:40:21 pm
content: 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: January 31, 2016, 06:01:22 pm
content: thanks man really appreciated

author: ali6x944
author_rank: Frequent Contributor
timestamp: January 31, 2016, 06:05:18 pm
content: oh does it work with RAM or OTPROM instead of ROM ?

author: miguelvp
author_rank: Super Contributor
timestamp: January 31, 2016, 06:54:23 pm
content: 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.

author: miguelvp
author_rank: Super Contributor
timestamp: January 31, 2016, 07:06:04 pm
content: 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-videodocBut I haven't look at them.

author: miguelvp
author_rank: Super Contributor
timestamp: January 31, 2016, 07:12:36 pm
content: 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.

author: C
author_rank: Super Contributor
timestamp: January 31, 2016, 10:03:12 pm
content: ali6x944You 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/OThink 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.

author: legacy
author_rank: Super Contributor
timestamp: February 01, 2016, 01:03:02 am
content: is the nsc800 chip still in production ?

author: miguelvp
author_rank: Super Contributor
timestamp: February 01, 2016, 01:20:09 am
content: Quote from: legacy on February 01, 2016, 01:03:02 amProbably not, but there is a little stock left:http://www.findchips.com/search/nsc800Actually more than a little:https://octopart.com/search?q=nsc800A lot of home security systems used z80 based boards, maybe that's enough to keep on making them?

author: ali6x944
author_rank: Frequent Contributor
timestamp: February 01, 2016, 03:30:23 pm
content: 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

author: Moondeck
author_rank: Regular Contributor
timestamp: February 01, 2016, 03:36:21 pm
content: Do you have any experience with this stuff at all? Microcontrollers? Microprocessors?

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: February 01, 2016, 05:26:54 pm
content: Quote from: ali6x944 on February 01, 2016, 03:30:23 pmBut youdohave the NSC800 CPU itself, right?QuoteJust so you know, youmighthave to buy some other things to get your NSC800 working.QuoteRS-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 cheapUSB-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 anEPROM programmer. If this is too expensive then you couldbuild you own EEPROM programmerusing 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 tokeep the data alivewhen it is not powered.

author: ali6x944
author_rank: Frequent Contributor
timestamp: February 02, 2016, 05:30:39 am
content: U know this the first time i do something heavy digital...So exuse me if i have sounded like an absolute foolGreat detailed explanation will be appreciated

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: February 02, 2016, 04:38:14 pm
content: Quote from: ali6x944 on February 02, 2016, 05:30:39 amWhat exactly do you want an explanation of?

author: ali6x944
author_rank: Frequent Contributor
timestamp: February 02, 2016, 04:54:42 pm
content: technical terms and how it works...and schematics if u don't mind...thanks a lot anyway guys, thanks for the help

author: Moondeck
author_rank: Regular Contributor
timestamp: February 02, 2016, 05:01:15 pm
content: Quote from: ali6x944 on February 02, 2016, 05:30:39 amHeavy digital? What did you do before?Quoteno problem m8QuoteRTFM

author: ali6x944
author_rank: Frequent Contributor
timestamp: February 02, 2016, 06:03:54 pm
content: 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...

author: Moondeck
author_rank: Regular Contributor
timestamp: February 02, 2016, 07:00:20 pm
content: Quote from: ali6x944 on February 02, 2016, 06:03:54 pmOk, 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: February 02, 2016, 07:08:15 pm
content: am struggling to understand what is an address lines, buses, data transfer protocols, and the software things ...i just stare at the screen sayingseriously man i know nothing! simply nothing

author: Kilrah
author_rank: Unknown
timestamp: February 02, 2016, 08:00:47 pm
content: Quote from: ali6x944 on February 02, 2016, 07:08:15 pmWell 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...

author: Moondeck
author_rank: Regular Contributor
timestamp: February 02, 2016, 08:16:56 pm
content: Quote from: ali6x944 on February 02, 2016, 07:08:15 pmDude do some basics, real basics, learn, read and then come back to it.

author: Kilrah
author_rank: Unknown
timestamp: February 02, 2016, 08:43:23 pm
content: 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.pdfftp://ftp.whtech.com/club100/doc/m102TechReference.pdfIf 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: February 03, 2016, 07:17:38 am
content: I did search, i have theas books :TTL cookbook, teach your self electrecity and electronicsAnd a few more...

author: Moondeck
author_rank: Regular Contributor
timestamp: February 03, 2016, 07:30:28 am
content: 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: February 03, 2016, 10:35:53 am
content: what is defrance between registers and shift registers?

author: Moondeck
author_rank: Regular Contributor
timestamp: February 03, 2016, 10:57:02 am
content: 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

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: February 03, 2016, 06:19:53 pm
content: http://www.circuitstoday.com/logic-gateshttp://users.ece.utexas.edu/~valvano/Volume1/E-Book/C4_DigitalLogic.htmhttp://www.zeepedia.com/read.php?shift_registers_serial_in/shift_leftright/serial_out_operation_digital_logic_design&b=9&c=34http://www.electronics-tutorials.ws/sequential/seq_5.htmlhttp://8085microprocessor4u.blogspot.com/

author: ali6x944
author_rank: Frequent Contributor
timestamp: February 23, 2016, 07:11:27 pm
content: 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.htmthen 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 ...

author: ali6x944
author_rank: Frequent Contributor
timestamp: February 23, 2016, 07:13:33 pm
content: all the resistor values were 1k ohm.

author: obiwanjacobi
author_rank: Super Contributor
timestamp: February 24, 2016, 09:21:23 am
content: Step by step (old)http://retro.hansotten.nl/uploads/z80/BuildYourOwnZ80.pdf

author: Ian.M
author_rank: Super Contributor
timestamp: February 24, 2016, 10:17:55 am
content: 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: February 24, 2016, 01:05:45 pm
content: Will i currently have these chips:1x NSC800N6xAM27464xTMS4416-15NL3x 8464A-10L1xSCN2661BC1N281xP8279-51xD7220AD5x 74ls273N4x sn74ls374nNand,nor,or,and,xor,inverters, tristate buffers is what i have.

author: legacy
author_rank: Super Contributor
timestamp: February 24, 2016, 06:05:35 pm
content: @ali6x944I have a 68000 board for sale, I also have an 8051 board for salethey both come with schematic and chips in DIP packagewhy don't you buy a card like those, in order to make you started ?

author: Ian.M
author_rank: Super Contributor
timestamp: February 24, 2016, 06:45:20 pm
content: 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.

author: legacy
author_rank: Super Contributor
timestamp: February 24, 2016, 08:50:14 pm
content: Quote from: Ian.M on February 24, 2016, 06:45:20 pmnever 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 knownI 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".

author: ali6x944
author_rank: Frequent Contributor
timestamp: March 26, 2016, 10:07:46 am
content: 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 contentsof PC, I and R registers, disables interrupts, and activatesreset out""Restart Interrupts, A, B, C (RSTA, RSTB, RSTC): Activelow level sensitive. The CPU recognizes restarts generatedby the peripherals at the end of the current instruction, iftheir respective interrupt enable and master enable bits areset. Execution is identical to NMI except the interrupts vectorto the following restart addresses:NameRestartAddress (X')NMI 0066RSTA 003CRSTB 0034RSTC 002CINTR (Mode 1) 0038The order of priority is fixed. The list above starts with thehighest priority."

author: obiwanjacobi
author_rank: Super Contributor
timestamp: March 27, 2016, 06:20:46 am
content: 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)...?

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: March 27, 2016, 10:34:05 pm
content: Quote from: ali6x944 on March 26, 2016, 10:07:46 amYou 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: March 28, 2016, 02:55:05 pm
content: 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 completlyQuote from: Bruce Abbott on March 27, 2016, 10:34:05 pm

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: March 28, 2016, 11:18:27 pm
content: Quote from: ali6x944 on March 28, 2016, 02:55:05 pmA8,9,10 put out the program counter address during instruction read, and the I register during refresh. On power up the I register has arandomvalue, 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 afixed(random) pattern.

author: obiwanjacobi
author_rank: Super Contributor
timestamp: March 29, 2016, 05:36:05 am
content: Quote from: Bruce Abbott on March 28, 2016, 11:18:27 pmBut on reset it is zeroed out...

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: March 29, 2016, 08:21:41 pm
content: Quote from: obiwanjacobi on March 29, 2016, 05:36:05 amYou 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.

author: obiwanjacobi
author_rank: Super Contributor
timestamp: March 30, 2016, 07:30:50 am
content: 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: March 30, 2016, 01:38:00 pm
content: see results:

author: ali6x944
author_rank: Frequent Contributor
timestamp: March 30, 2016, 01:40:00 pm
content: .

author: ali6x944
author_rank: Frequent Contributor
timestamp: March 30, 2016, 01:42:25 pm
content: .

author: ali6x944
author_rank: Frequent Contributor
timestamp: March 30, 2016, 02:12:27 pm
content: 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...

author: obiwanjacobi
author_rank: Super Contributor
timestamp: March 30, 2016, 05:08:30 pm
content: 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...?

author: ali6x944
author_rank: Frequent Contributor
timestamp: March 30, 2016, 07:10:24 pm
content: 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:

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: March 30, 2016, 11:18:12 pm
content: Quote from: ali6x944 on March 30, 2016, 07:10:24 pmIf 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 doanything. 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).

author: ali6x944
author_rank: Frequent Contributor
timestamp: March 31, 2016, 02:46:00 pm
content: here it is:

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: March 31, 2016, 09:50:29 pm
content: 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 arenotNOPs.Take some more captures, this time with channels 2-4 on address/data lines 0-2, 3-5 and 5-7 (withallchannels 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: April 02, 2016, 04:58:25 am
content: 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.

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: April 02, 2016, 07:19:16 am
content: Quote from: ali6x944 on April 02, 2016, 04:58:25 amNo, 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?

author: ali6x944
author_rank: Frequent Contributor
timestamp: April 02, 2016, 08:54:26 am
content: 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 againand about the wiring and the chip see this:https://drive.google.com/folderview?id=0B5vW-k7HbsL4c09XNjBIbDc4Zmc&usp=sharingand i didn't use discrete resistors for pulling it up, i use a resistor array.

author: ali6x944
author_rank: Frequent Contributor
timestamp: April 02, 2016, 09:03:26 am
content: and for the clock, I'm using a 555 timer, for R1 and R2= 1k and for C=2.2uf

author: Ian.M
author_rank: Super Contributor
timestamp: April 02, 2016, 10:52:01 am
content: 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!

author: ali6x944
author_rank: Frequent Contributor
timestamp: April 02, 2016, 01:39:56 pm
content: 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: April 02, 2016, 01:46:30 pm
content: i think i will not use the crystal, maybe will use external clock, saw this in the data sheet:"FIGURE 7. Use Of CrystalThe CPU has a minimum clock frequency input (@ XIN) of300 kHz, which results in 150 kHz system clock speed. Allregisters internal to the chip are static, however there isdynamic logic which limits the minimum clock speed. Theinput clock can be stopped without fear of losing any data ordamaging the part. You stop it in the phase of the clock thathas XIN low and CLK OUT high. When restarting the CPU,precautions must be taken so that the input clock meetsthese minimum specification. Once started, the CPU willcontinue operation from the same location at which it wasstopped. During DC operation of the CPU, typical currentdrain will be 2 mA. This current drain can be reduced byplacing the CPU in a wait state during an opcode fetch cyclethen stopping the clock. For clock stop circuit, see Figure 8 ."do i have to increase the frequency?

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: April 02, 2016, 06:38:13 pm
content: Quote from: ali6x944 on April 02, 2016, 01:46:30 pmInteresting! 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...

author: ali6x944
author_rank: Frequent Contributor
timestamp: April 03, 2016, 01:10:13 pm
content: so that is what we were doing wrong i will fix it now...thax

author: ali6x944
author_rank: Frequent Contributor
timestamp: April 03, 2016, 03:59:35 pm
content: but did the measurements i took still apply?

author: Ian.M
author_rank: Super Contributor
timestamp: April 03, 2016, 08:53:27 pm
content: 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.

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: April 03, 2016, 10:27:52 pm
content: Quote from: ali6x944 on April 03, 2016, 03:59:35 pmNo. 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 thecorrectfrequency. If possible, trigger the scope on /RESET rising edge, then you can see what happens on startup.

author: ali6x944
author_rank: Frequent Contributor
timestamp: April 05, 2016, 08:00:23 pm
content: 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:

author: ali6x944
author_rank: Frequent Contributor
timestamp: April 05, 2016, 08:05:46 pm
content: i apologize if the captures weren't clear, i will post more soon...

author: ali6x944
author_rank: Frequent Contributor
timestamp: April 05, 2016, 08:22:52 pm
content: but for now i will use SRAM and DRAM to store memory...

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: April 06, 2016, 07:00:47 pm
content: Quote from: ali6x944 on April 05, 2016, 08:00:23 pmTo 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 EraserHowever anEEPROM 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 fromAutoelectric.

author: ali6x944
author_rank: Frequent Contributor
timestamp: April 07, 2016, 04:11:59 pm
content: SEE CAPTURES

author: ali6x944
author_rank: Frequent Contributor
timestamp: April 21, 2016, 08:14:55 am
content: Do anybody know how to use the two line output control in a M2764A UV EPROM ?

author: grumpydoc
author_rank: Super Contributor
timestamp: April 21, 2016, 08:29:33 am
content: Quote from: ali6x944 on April 21, 2016, 08:14:55 amThat just refers to the fact that it has a Chip Enable input as well as an Output Enable input

author: obiwanjacobi
author_rank: Super Contributor
timestamp: April 21, 2016, 09:13:28 am
content: 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)

author: ali6x944
author_rank: Frequent Contributor
timestamp: April 21, 2016, 04:18:41 pm
content: thanx for clearing that outi 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); //CLOCKpinMode(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 seconddigitalWrite(13, LOW); // turn the LED off by making the voltage LOWdelay(100); // wait for a secondint val =digitalRead(12); // read the input pinSerial.print(val,OCT); // print the input pin}

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: April 21, 2016, 05:45:46 pm
content: Quote from: ali6x944 on April 21, 2016, 04:18:41 pmWith 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: April 22, 2016, 04:50:24 am
content: Quote from: Bruce Abbott on April 21, 2016, 05:45:46 pmwill i did that.Quote from: Bruce Abbott on April 21, 2016, 05:45:46 pmsorry but i didn't quit get it, should i connect the clock pin to shift/load pin?

author: ali6x944
author_rank: Frequent Contributor
timestamp: April 22, 2016, 01:22:49 pm
content: Or shall I feed it the inverse of the clock?

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: April 22, 2016, 06:52:30 pm
content: You need to control Shift/Load and Clock individually with different pins.

author: ali6x944
author_rank: Frequent Contributor
timestamp: April 23, 2016, 05:25:51 am
content: oh... ok

author: ali6x944
author_rank: Frequent Contributor
timestamp: May 03, 2016, 06:26:17 pm
content: 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

author: ali6x944
author_rank: Frequent Contributor
timestamp: May 03, 2016, 06:41:26 pm
content: 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

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: May 03, 2016, 07:38:40 pm
content: This appears to be anS-100CPU 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.

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: May 03, 2016, 08:06:44 pm
content: Quote from: ali6x944 on May 03, 2016, 06:41:26 pmYou still only have two lines connected from the Arduino to the 74LS166. You need3lines - CLOCK (pin 7), QH (pin 13), and SHIFT/LOAD (pin 15). To load the 8 parallel bits from the EPROM you must set SHIFT/LOADlowand then pulse CLOCK (high/low). This will transfer parallel input H to QH. To read the other bits out serially you must set SHIFT/LOADhighand pulse CLOCK.

author: ali6x944
author_rank: Frequent Contributor
timestamp: May 04, 2016, 03:01:22 am
content: Do I need to configure any of the adress pins?

author: ali6x944
author_rank: Frequent Contributor
timestamp: May 04, 2016, 03:21:09 am
content: Like to get an output...

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: May 04, 2016, 09:06:52 am
content: Quote from: ali6x944 on May 04, 2016, 03:01:22 amTo get output from the EPROM you must pull CE (chip enable) and OE (output enable) low.Somethingwill then be output no matter how the address pins are 'configured', but obviouslywhatis output will depend on what data is stored in the ROM at that address.

author: ali6x944
author_rank: Frequent Contributor
timestamp: May 04, 2016, 01:18:30 pm
content: Will I think I did it correctly this time...Se pics:https://drive.google.com/folderview?id=0B5vW-k7HbsL4c09XNjBIbDc4Zmc

author: ali6x944
author_rank: Frequent Contributor
timestamp: May 04, 2016, 01:26:29 pm
content: Binary Code01110111As Decimal: 119As Binary: 01110111As Hexadecimal: 77Bits: 8The wierd thing is that I got only zero's after that byte...Did I do something wrong ?

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: May 05, 2016, 11:33:01 pm
content: Quote from: ali6x944 on May 04, 2016, 01:26:29 pmPost your code so that I can check it...

author: ali6x944
author_rank: Frequent Contributor
timestamp: May 06, 2016, 04:42:10 am
content: Here it is:https://drive.google.com/folderview?id=0B5vW-k7HbsL4c09XNjBIbDc4Zmc

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: May 06, 2016, 10:05:15 am
content: 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: May 26, 2016, 08:06:01 pm
content: Quote from: Bruce Abbott on May 06, 2016, 10:05:15 amsorry 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); //CLOCKpinMode(12,OUTPUT); //SHIFT-LOADpinMode(11,INPUT); //QH OUT}void loop() {// put your main code here, to run repeatedly:digitalWrite(12,HIGH); //SHIFT-LOAD HIGHdelay(10);digitalWrite(13,HIGH); //CLOCK HIGHdelay(10);digitalWrite(13,LOW); //CLOCK LOWint val =digitalRead(11); // read the input pinSerial.print(val,OCT); // print the input pin}--------------------------------------------------------------

author: ali6x944
author_rank: Frequent Contributor
timestamp: May 26, 2016, 08:19:48 pm
content: And I fixed all conections and wired pins A8-A12 to a pull up resistor network and that to a dip switch arrayhttps://drive.google.com/file/d/0B5vW-k7HbsL4aXRXTjdjdG15YXM/view?usp=drivesdk

author: ali6x944
author_rank: Frequent Contributor
timestamp: May 27, 2016, 03:51:24 am
content: The white and orang wires are /oe and /ce

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: May 27, 2016, 11:53:23 pm
content: Quote from: ali6x944 on May 26, 2016, 08:06:01 pmTo 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 QH7 timesto get the next 7 bits. Something like this:-Code:#define CLOCK 13 // 74LS166 CLOCK#define SHFTLD 12 // SHIFT/LOAD#define DATIN 11 // QHvoid loop() {int i;digitalWrite(SHFTLD,LOW); // 'parallel load' modedelay(10);digitalWrite(CLOCK,HIGH);delay(10);digitalWrite(CLOCK,LOW); // clock the parallel inputs into the shift registerdelay(10);int val =digitalRead(DATIN); // read the 1st bit at QHSerial.print(val,OCT); // print the 1st bitdigitalWrite(SHFTLD,HIGH); // 'shift' modedelay(10);for (i=1; i<=7; i++){ // another 7 bits to readdigitalWrite(CLOCK,HIGH);delay(10);digitalWrite(CLOCK,LOW); // shift the next bit to QHdelay(10);int val =digitalRead(DATIN); // read the next bitSerial.print(val,OCT); // print the next bit}Serial.println();}BTW, you shouldn't use raw numbers in your code unless that isallthey 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: May 29, 2016, 06:43:05 am
content: it works! thanx mani got these results:A12-8 LOW:it was random some time going in sequence and some times out ex.:01111111011111101111111111101111111111110111111011111111011111110111111001111110111011111110111101111110111011111110111111101111111111111110111111111111111111111111111111101111111111110111111001111110111111111111111101111110011111100111111011101111011111100111111001111110111111111111111101111110---------------------------------------------------A12 hi, all low:the same story as with the one before it.ex.:010010110100111011011111110111110101001001010010010110110100100001010111110111110101001010001111110111111000111111011111010100100101001011011111010100101101111110001111010101100101001010001111110111110101011010001111110111111101111111011111110111110101001001010010110111111101111101010010100011111000111111011111010100100101001011011111100011111101111111011111110111110101001001010010010100100101011011011111010100101101111101010010010101100101001001010111100011110101001011011111010101101101111111011111010101101000111111011111110111110101001011011111100011111000111111011111110111111101111111011111100011111101111111011111110111111101111111001111110111111100111111011111010100101000111111011111100011110101111101010010010101101101111111011111110111111000111110001111110111110101001001010010010101100101001011011111010100101101111111011111010100101101111110001111100011111101111111011111100011110101001011011111110111110101001011011111110111111101111111011111100011110101011010001111010100101000111111011111110111110101001001011111010100101000111111011111110111110101001011011111----------------------------------------------------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:11010100111111011101010011111101110101001101010011010100111111011101010011111101110111011111110111111101110101001111110111010100111111011111110111111101110101001101010011010100001011011111110100101101001011011111110111110101111111011111110111111101001011010010110111111101111111011101010011010100------------------------------------------------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.

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: May 29, 2016, 07:29:45 pm
content: You need to put logic levels onallthe 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: June 02, 2016, 09:22:18 am
content: 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 toAdress 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-k7HbsL4c09XNjBIbDc4ZmcI will plot data in an excel sheet...

author: ebclr
author_rank: Super Contributor
timestamp: June 02, 2016, 12:49:03 pm
content: This simulator can be a useful tool fro your taskhttp://www.natmac.net/zim/

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: June 02, 2016, 10:13:15 pm
content: Quote from: ali6x944 on June 02, 2016, 09:22:18 amThe order that the address bits are connected to the row and column decoders inside the chip is not important. Whatisimportant 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: June 06, 2016, 03:36:39 pm
content: 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 guyscode:void setup() {// put your setup code here, to run once:Serial.begin(9600); // open the serial port at 9600 bps:pinMode(13,OUTPUT); //CLOCKpinMode(12,OUTPUT); //SHIFT-LOADpinMode(11,INPUT); //QH OUTpinMode(10,OUTPUT); //QH OUT}#define CLOCK 13 // 74LS166 CLOCK#define SHFTLD 12 // SHIFT/LOAD#define DATIN 11 // QH#define CCLK 10 // COUNTER CLOCKvoid loop(){digitalWrite(CCLK,HIGH); // COUNTER CLOCK needs a rising edge to countdelay(10);digitalWrite(CCLK,LOW); // COUNTER CLOCK lowdelay(10);int i;digitalWrite(SHFTLD,LOW); // 'parallel load' modedelay(10);digitalWrite(CLOCK,HIGH);delay(10);digitalWrite(CLOCK,LOW); // clock the parallel inputs into the shift registerdelay(10);int val =digitalRead(DATIN); // read the 1st bit at QHSerial.print(val,OCT); // print the 1st bitdigitalWrite(SHFTLD,HIGH); // 'shift' modedelay(10);for (i=1; i<=7; i++){ // another 7 bits to readdigitalWrite(CLOCK,HIGH);delay(10);digitalWrite(CLOCK,LOW); // shift the next bit to QHdelay(10);int val =digitalRead(DATIN); // read the next bitSerial.print(val,OCT); // print the next bit}Serial.println();}

author: ali6x944
author_rank: Frequent Contributor
timestamp: June 07, 2016, 01:17:27 am
content: Photos:https://drive.google.com/folderview?id=0B5vW-k7HbsL4c09XNjBIbDc4Zmc

author: ali6x944
author_rank: Frequent Contributor
timestamp: June 07, 2016, 12:53:09 pm
content: Any ideas to make the output in the serial monitor easier to record?

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: June 07, 2016, 09:18:13 pm
content: Quote from: ali6x944 on June 07, 2016, 12:53:09 pmMaintain 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: June 11, 2016, 05:40:56 pm
content: Quote from: Bruce Abbott on June 07, 2016, 09:18:13 pmso 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 | ASCIIor something like this ?Quote from: Bruce Abbott on June 07, 2016, 09:18:13 pmnot quit sure how should i do it am quit confusedI'm a newbie at programingso please excuse me...

author: ali6x944
author_rank: Frequent Contributor
timestamp: June 11, 2016, 05:45:18 pm
content: 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 CLOCKpinMode(12,OUTPUT); //SHIFT-LOADpinMode(11,INPUT); //QH OUTpinMode(10,OUTPUT); //74LS161 CLOCKpinMode(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 CLOCKvoid loop(){digitalWrite(CCLK,HIGH);delay(10);digitalWrite(CCLK,LOW);int i;digitalWrite(SHFTLD,LOW); // 'parallel load' modedelay(10);digitalWrite(CLOCK,HIGH);delay(10);digitalWrite(CLOCK,LOW); // clock the parallel inputs into the shift registerdelay(10);int val =digitalRead(DATIN); // read the 1st bit at QHSerial.print(val,OCT);// print the 1st bitdigitalWrite(SHFTLD,HIGH); // 'shift' modedelay(10);for (i=1; i<=7; i++){ // another 7 bits to readdigitalWrite(CLOCK,HIGH);delay(10);digitalWrite(CLOCK,LOW); // shift the next bit to QHdelay(10);int val =digitalRead(DATIN); // read the next bitSerial.print(val,OCT); // print the next bit}Serial.println();}

author: ali6x944
author_rank: Frequent Contributor
timestamp: June 12, 2016, 12:10:54 pm
content: 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 CLOCKpinMode(12,OUTPUT); //SHIFT-LOADpinMode(11,INPUT); //QH OUTpinMode(10,OUTPUT); //74LS161 CLOCKpinMode(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 CLOCKvoid loop(){digitalWrite(CCLK,HIGH);delay(10);digitalWrite(CCLK,LOW);int x;int i;int ByteArray;digitalWrite(SHFTLD,LOW); // 'parallel load' modedelay(10);digitalWrite(CLOCK,HIGH);delay(10);digitalWrite(CLOCK,LOW); // clock the parallel inputs into the shift registerdelay(10);int val =digitalRead(DATIN); // read the 1st bit at QHByteArray= val;//assign a value to ByteArraySerial.print(val,OCT);// print the 1st bitdigitalWrite(SHFTLD,HIGH); // 'shift' modedelay(10);for (i=1; i<=7; i++){ // another 7 bits to readdigitalWrite(CLOCK,HIGH);delay(10);digitalWrite(CLOCK,LOW); // shift the next bit to QHdelay(10);int val =digitalRead(DATIN); // read the next bitfor(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();}

author: ali6x944
author_rank: Frequent Contributor
timestamp: June 13, 2016, 10:55:29 pm
content: 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 CLOCKpinMode(12,OUTPUT); //SHIFT-LOADpinMode(11,INPUT); //QH OUTpinMode(10,OUTPUT); //74LS161 CLOCKpinMode(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 CLOCKvoid loop(){digitalWrite(CCLK,HIGH);delay(10);digitalWrite(CCLK,LOW);int x;int i;int ByteArray;digitalWrite(SHFTLD,LOW); // 'parallel load' modedelay(10);digitalWrite(CLOCK,HIGH);delay(10);digitalWrite(CLOCK,LOW); // clock the parallel inputs into the shift registerdelay(10);int val =digitalRead(DATIN); // read the 1st bit at QHByteArray= val;//assign a value to ByteArraySerial.print(val,OCT);// print the 1st bitdigitalWrite(SHFTLD,HIGH); // 'shift' modedelay(10);for (i=1; i<=7; i++){ // another 7 bits to readdigitalWrite(CLOCK,HIGH);delay(10);digitalWrite(CLOCK,LOW); // shift the next bit to QHdelay(10);int val =digitalRead(DATIN); // read the next bitfor(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();}

author: ali6x944
author_rank: Frequent Contributor
timestamp: June 14, 2016, 11:22:10 am
content: see this:

author: C
author_rank: Super Contributor
timestamp: June 16, 2016, 02:17:56 am
content: I would suggest that you read what is on this link and what this page links to.https://www.arduino.cc/en/Reference/HomePageSuch 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 FUNCTIONSWhen you get this matching what Bruce said5 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: June 22, 2016, 01:27:35 pm
content: 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: June 22, 2016, 01:31:59 pm
content: See the pcb:https://drive.google.com/folderview?id=0B5vW-k7HbsL4c09XNjBIbDc4Zmc

author: ali6x944
author_rank: Frequent Contributor
timestamp: June 22, 2016, 09:08:27 pm
content: Also it would mean a one chip solution to this coding madness

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: June 23, 2016, 12:00:26 am
content: Quote from: ali6x944 on June 22, 2016, 01:27:35 pmEngineering, Procurement, Construction, and Installation?Enhanced Proliferation Control Initiative?Electronic Payment Certification Institute?Export Promotion Center of Iran (est. 1965)?

author: ali6x944
author_rank: Frequent Contributor
timestamp: June 23, 2016, 10:14:36 am
content: Quote from: Bruce Abbott on June 23, 2016, 12:00:26 amIt is Enhanced Programmable Communications InterfaceThe chip is SCN2661BC1N28.See datasheet:https://drive.google.com/folderview?id=0B5vW-k7HbsL4c09XNjBIbDc4Zmc

author: ali6x944
author_rank: Frequent Contributor
timestamp: June 23, 2016, 03:21:01 pm
content: after all, i think it will work better than shift registers and counters

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: June 23, 2016, 08:24:43 pm
content: Quote from: ali6x944 on June 23, 2016, 03:21:01 pmA UART chip? Somehow I don't think it will work any better.Perhaps this will help:-How to read old EPROMs with the Arduino

author: ali6x944
author_rank: Frequent Contributor
timestamp: June 23, 2016, 11:38:08 pm
content: U are right , I will duplicate the circuit...Thanx m8

author: ebclr
author_rank: Super Contributor
timestamp: June 24, 2016, 11:08:45 am
content: This board will help you on do all those crazy interfaces on same placehttps://world.taobao.com/item/41676376586.htm?spm=a312a.7700714.0.0.zp9EnP#detailPs you will need to learn VHL

author: ali6x944
author_rank: Frequent Contributor
timestamp: July 19, 2016, 07:47:27 am
content: Could it work with 74ls273 instead of the 573 he used in his circuit??

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: July 19, 2016, 09:21:05 pm
content: Quote from: ali6x944 on July 19, 2016, 07:47:27 amYes. 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!

author: ali6x944
author_rank: Frequent Contributor
timestamp: July 20, 2016, 07:46:32 am
content: It didn't give any output I don't quite get what's going on?See circuit:https://drive.google.com/folderview?id=0B5vW-k7HbsL4c09XNjBIbDc4Zmcgreen wire is Address bus and vccred wire data busblue wire is ground

author: ali6x944
author_rank: Frequent Contributor
timestamp: July 20, 2016, 08:12:32 am
content: i also tried it with 74LS374 and it didn't work

author: ali6x944
author_rank: Frequent Contributor
timestamp: July 22, 2016, 04:50:04 am
content: I searched in YouTube and I saw this:https://youtu.be/L1ypfbmYczAAnd 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?

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: July 22, 2016, 06:00:23 am
content: Quote from: ali6x944 on July 22, 2016, 04:50:04 am"Fail, fail often - and boy have I been failing hard!".QuoteIt's a very simple circuit and not much can go wrong -ifit's hooked up correctly. Check your wiring.QuoteI 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?

author: ali6x944
author_rank: Frequent Contributor
timestamp: July 22, 2016, 09:11:32 am
content: Sorry I will post it soon....

author: ali6x944
author_rank: Frequent Contributor
timestamp: June 25, 2017, 02:50:58 pm
content: Latest improvements:https://youtu.be/vTl3MrPyTHMI 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=drivesdkI 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 controlsTo 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: June 25, 2017, 03:00:44 pm
content: 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...

author: danadak
author_rank: Super Contributor
timestamp: June 25, 2017, 09:20:40 pm
content: Some ref material -http://www.cryptomuseum.com/spy/fs5000/files/NSC800.pdfhttps://archive.org/details/bitsavers_nationaldacroprocessorFamilyHandbook_8034824http://www.hparchive.com/Journals/HPJ-1985-07.pdfThere is a cookbook, NSC800 Microprocessor Cookbook, cannot seem to find a free download link anywhere.Regards, Dana.

author: ali6x944
author_rank: Frequent Contributor
timestamp: June 26, 2017, 03:10:36 am
content: Thanks dana for the great reference material

author: ali6x944
author_rank: Frequent Contributor
timestamp: June 26, 2017, 10:54:46 pm
content: this is the diagram:https://drive.google.com/open?id=0B5vW-k7HbsL4MEdfRG1fWWlBSDgsorry 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...

author: ali6x944
author_rank: Frequent Contributor
timestamp: June 27, 2017, 05:47:28 pm
content: code in the pic so far:config.hCode:#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 numberchar OUTPUT_ARRAY; //Stores the byte OUTPUT OF THE SHIFT_REGISTERfor(int i=0; i<=8;i++){PORTBbits.RB0=1; //Set the SHIFT/LOAD of 74ls166 to shift _highchar Qh=PORTBbits.RB3; // Set char Qh to the value of RB3OUTPUT_ARRAY=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.cCode:#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=0while(1){PORTBbits.RB6=1; //Set the tri-state Buffer of 74ls541 to _tri-statePORTBbits.RB1=0; //Set the CLEAR of 74ls166 to _low__delay_us(100);PORTBbits.RB1=1; //Set the CLEAR of 74ls166 to _highPORTBbits.RB5=1; //Set the Reset to _high__delay_us(100);PORTBbits.RB5=0; //Set the Reset to _lowint Clock; //clock count of MC14040for(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 _lowPORTBbits.RB6=0; //Set the tri-state buffer stage 74ls541 to _enablePORTBbits.RB0=0; //Set the SHIFT/LOAD of 74ls166 to load _lowOUTPUT_SHIFT_REGISTER();}else{PORTBbits.RB4=1; //Set the CLOCK of MC14040 _high__delay_us(100);PORTBbits.RB4=0; //Set the CLOCK of MC14040 _lowPORTBbits.RB6=0; //Set the tri-state buffer stage 74ls541 to _enablePORTBbits.RB0=0; //Set the SHIFT/LOAD of 74ls166 to load _lowPORTDbits.RD7=1; //Set A12 of tri-state buffer stage 74ls541 _highOUTPUT_SHIFT_REGISTER();}}}return;}I'm using a pic16f77 with XC8 compiler.

author: ali6x944
author_rank: Frequent Contributor
timestamp: June 27, 2017, 06:00:53 pm
content: 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

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: June 27, 2017, 06:59:13 pm
content: Quote from: ali6x944 on June 27, 2017, 06:00:53 pmUSB 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: June 27, 2017, 08:20:46 pm
content: Quote from: Bruce Abbott on June 27, 2017, 06:59:13 pmmmmm....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...

author: ali6x944
author_rank: Frequent Contributor
timestamp: June 27, 2017, 08:52:33 pm
content: if u know cheaper more reliable programmers or erasers post them please... ur post will help me alot

author: C
author_rank: Super Contributor
timestamp: June 28, 2017, 02:24:57 am
content: 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 digikey64kx8 static ram. $2.65128Kx8 $3.16512Kx8 $5.48ROM like512kx8 flash based $1.7064kx8 EEPROM $3.12So 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?

author: ali6x944
author_rank: Frequent Contributor
timestamp: June 28, 2017, 04:19:02 am
content: Quote from: C on June 28, 2017, 02:24:57 amI 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@5vthe 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?

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: June 28, 2017, 06:15:08 am
content: Quote from: ali6x944 on June 27, 2017, 08:52:33 pmThe 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.QuoteYes 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.QuoteIn 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!).QuoteShort 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.

author: C
author_rank: Super Contributor
timestamp: June 28, 2017, 07:48:43 am
content: One big difference between theW27C512 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 atHere 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: June 28, 2017, 09:19:54 am
content: Interesting....I have never thought of using a micro as a ram program loader...It's certainly a cool trick to use

author: C
author_rank: Super Contributor
timestamp: June 28, 2017, 04:42:59 pm
content: 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: June 28, 2017, 08:57:17 pm
content: 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....

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: June 28, 2017, 08:58:15 pm
content: Quote from: C on June 28, 2017, 07:48:43 amTrue, 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.QuoteBut 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.QuoteIt'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. Sinceali6x944struggled just to read an EPROM with an MCU, I suggest going with the simplest solution - at least to start with.

author: ali6x944
author_rank: Frequent Contributor
timestamp: June 28, 2017, 09:05:30 pm
content: Quote from: Bruce Abbott on June 28, 2017, 08:58:15 pmI agree, maybe in the future I can do this but for now I should stick to the basics as Bruce Abbott said.

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: June 28, 2017, 09:10:00 pm
content: Quote from: ali6x944 on June 28, 2017, 08:57:17 pmYes, 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: June 28, 2017, 09:13:14 pm
content: Quote from: Bruce Abbott on June 28, 2017, 06:15:08 amcan u give me the seller name of TL866, I don't really trust the current one I have:http://www.ebay.com/itm/191796916274

author: C
author_rank: Super Contributor
timestamp: June 28, 2017, 11:45:51 pm
content: 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: June 29, 2017, 12:35:13 am
content: Quote from: C on June 28, 2017, 11:45:51 pmNo, 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...

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: June 29, 2017, 04:22:46 am
content: Quote from: ali6x944 on June 28, 2017, 09:13:14 pmThe official eBay store listed onAutoelectric's dealer page isElectronic DIY.TL866CS with 4 adapters is US$47.

author: C
author_rank: Super Contributor
timestamp: June 29, 2017, 05:47:33 pm
content: 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 useArduino IDE to program an existing program to ATMEGA32AAt 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 ISP2. Wirehttps://cdn.hackaday.io/files/19000812896000/A041116%20schematic.pdf3. RunRETROCOMPUTING FOR $4 WITH A Z80https://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.

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: June 29, 2017, 07:49:42 pm
content: Quote from: C on June 29, 2017, 05:47:33 pmAgreed. 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: June 29, 2017, 08:31:04 pm
content: Quote from: C on June 29, 2017, 05:47:33 pmmostly lack of programming skills...Quote from: C on June 29, 2017, 05:47:33 pmI 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 employthanks for the great advice m8also 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

author: ali6x944
author_rank: Frequent Contributor
timestamp: June 29, 2017, 08:40:51 pm
content: Quote from: Bruce Abbott on June 29, 2017, 07:49:42 pm

author: C
author_rank: Super Contributor
timestamp: June 29, 2017, 09:08:37 pm
content: Quote from: Bruce Abbott on June 29, 2017, 07:49:42 pmFor 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.pdfSo 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.Quote from: Bruce Abbott on June 29, 2017, 07:49:42 pmAs 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.Quote from: Bruce Abbott on June 29, 2017, 07:49:42 pmSo 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.Quote from: ali6x944 on June 29, 2017, 08:31:04 pmThe 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: June 29, 2017, 10:49:16 pm
content: Quote from: C on June 29, 2017, 09:08:37 pmCan I use a PIC16f77 or an ATmaga328P instead of ATmega32a?

author: C
author_rank: Super Contributor
timestamp: June 29, 2017, 11:12:33 pm
content: Quote from: ali6x944 on June 29, 2017, 10:49:16 pmThe 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

author: ali6x944
author_rank: Frequent Contributor
timestamp: June 29, 2017, 11:48:37 pm
content: Quote from: C on June 29, 2017, 11:12:33 pmI understood ur point...

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: June 30, 2017, 08:00:20 am
content: Quote from: CI see where you are coming from, and I agree that ifali6x944has 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. Howeverali6x944seems 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 becauseIlearned 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: ali6x944Sorry, 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 8085And another...AltairPC clone?! runs BASIC

author: legacy
author_rank: Super Contributor
timestamp: June 30, 2017, 03:17:23 pm
content: 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?

author: C
author_rank: Super Contributor
timestamp: June 30, 2017, 03:43:33 pm
content: Quote from: Bruce Abbott on June 30, 2017, 08:00:20 amI 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.ali6x944built 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.Quote from: legacy on June 30, 2017, 03:17:23 pmWhere is China in this?It is an ATmega32A with a program.

author: legacy
author_rank: Super Contributor
timestamp: June 30, 2017, 05:20:32 pm
content: Quote from: C on June 30, 2017, 03:43:33 pmThe 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.

author: C
author_rank: Super Contributor
timestamp: June 30, 2017, 06:49:19 pm
content: Quote from: legacy on June 30, 2017, 05:20:32 pmdigikey PricesATMEGA32A-PU-NDhttps://www.digikey.com/product-detail/en/microchip-technology/ATMEGA32A-PU/ATMEGA32A-PU-ND/19145921 @ $3.64000Z80https://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=5006Mhz, 8Mhz & 10Mhz $5.3620Mhz $8.35Static ram chip64kx8 static ram. $2.65128Kx8 $3.16512Kx8 $5.4874HC00 >$0.50Min cost Three chip total $11.65 + shipping & TaxMax cost Three chip total $17.47 + shipping & TaxOf 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.

author: C
author_rank: Super Contributor
timestamp: July 01, 2017, 06:30:12 am
content: Reference to SchematicsGrant's 7-chip Z80 computer(only 6 chips if using a USB to TTL serial cable)Schematichttp://searle.hostei.com/grant/z80/Z80SbcSchematic1.2.gifUsed overclocked MC68B50Downloaded Data sheet from this pagehttp://www.datasheetspdf.com/datasheet/MC68B50.htmlGrant's CP/M on breadboardSchematichttp://searle.hostei.com/grant/cpm/CPMSchematic1.2.gifNote that their is a file ROM.HEX that contains Basic & monitor program.This version uses Z80 SIO not the MC68B50So both can run Grant's Basic.Just to be completeZ80-MBC (Mobile Breadboard Computer)Schematichttps://cdn.hackaday.io/files/19000812896000/A041116%20schematic.pdfHere is what is added for storagehttps://cdn.hackaday.io/files/19000812896000/A110417.pdfTwo 24LC1025 on this Schematic, Max is 4 Digikey price $3.06http://ww1.microchip.com/downloads/en/DeviceDoc/21941E.pdf/url]The storage on this chip(1024kb 128K xis about the same as a 5.25" 40 track SDSS diskNote: 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,Soali6x944some info.SCN2661BC1N28 EPCII 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 SIOIf you want to study and learn about Z80, This is a good part. The Z80 supports vector interrupts. This chip supports using vectors.MC68B50This 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-MBCWith 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.

author: legacy
author_rank: Super Contributor
timestamp: July 01, 2017, 10:42:54 am
content: Quote from: C on June 30, 2017, 06:49:19 pmGood attempt of being the last devil's lawyer ever, but you have completely missed the point: weMUST NOT promotepeople 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.

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: July 01, 2017, 08:44:43 pm
content: Quote from: C on June 30, 2017, 03:43:33 pmI 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 totrulyunderstand 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.QuoteYes 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 certainlytechnicallybe 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: legacyI agree. Itcouldbe a good advanced project for someone who already understands the basics.

author: C
author_rank: Super Contributor
timestamp: July 02, 2017, 12:40:26 am
content: 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.Quote from: Bruce Abbott on July 01, 2017, 08:44:43 pmAround 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 & Z80About 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: Bruce Abbott on July 01, 2017, 08:44:43 pmCould 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.

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: July 02, 2017, 02:15:30 pm
content: Quote from: C on July 02, 2017, 12:40:26 amThat's the issue. Do you want to be a developer, or just an ignorant user?QuoteAs a user I would hope that understanding the timing is not required - it should just work. But if itdoesn'twork 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 theHackadaypage, 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.

author: C
author_rank: Super Contributor
timestamp: July 02, 2017, 05:32:25 pm
content: Quote from: Bruce Abbott on July 02, 2017, 02:15:30 pm.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 atali6x944as 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 read1. 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.inoDon's think I need to say moreSo Bruce, how much is the cost to you to make this even better for the beginners while helping you make your z80 BETTER?AndQuote from: Bruce Abbott on July 02, 2017, 02:15:30 pmTrue but no eeprom programmer needed so what is saved can buy a Z80And the NSC800 can be a small step in the future after learning the basics.QuoteI 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.

author: legacy
author_rank: Super Contributor
timestamp: July 02, 2017, 06:06:30 pm
content: Quote from: C on July 02, 2017, 05:32:25 pmHere 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

author: C
author_rank: Super Contributor
timestamp: July 02, 2017, 06:26:33 pm
content: Quote from: legacy on July 02, 2017, 06:06:30 pmSo 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.

author: legacy
author_rank: Super Contributor
timestamp: July 02, 2017, 07:32:48 pm
content: Quote from: C on July 02, 2017, 06:26:33 pmHere 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.Quote from: C on July 02, 2017, 06:26:33 pmI 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.Quote from: C on July 02, 2017, 06:26:33 pmThis makes no sense.

author: C
author_rank: Super Contributor
timestamp: July 02, 2017, 08:37:32 pm
content: Quote from: legacy on July 02, 2017, 07:32:48 pmI would say it's you that is being a ridiculous: man.If you do not like the Z80 that is fine.Quote from: legacy on July 02, 2017, 07:32:48 pmAnd here we have an Atmega32AThatali6x944already 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.

author: legacy
author_rank: Super Contributor
timestamp: July 02, 2017, 09:04:00 pm
content: Quote from: C on July 02, 2017, 08:37:32 pmI 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.

author: C
author_rank: Super Contributor
timestamp: July 02, 2017, 10:58:50 pm
content: 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 isali6x944threadThe 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.

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: July 03, 2017, 01:40:39 am
content: Quote from: C on July 02, 2017, 05:32:25 pmThe 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.QuoteThis thread is about building an NSC800 computer.ali6x944could just make an exact duplicate of the Hackaday Z80/ATmega32 project instead, but what would be the fun in that?QuoteI 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.QuoteAgreed. 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!

author: ali6x944
author_rank: Frequent Contributor
timestamp: July 04, 2017, 05:32:11 pm
content: 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 busand the clock stop circuit from page 15 of the NSC800 datasheet with a 4MHz crystalthe 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=sharinghttps://drive.google.com/file/d/0B5vW-k7HbsL4Rkd3NWE3dVBHcnM/view?usp=sharingnote: 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

author: ali6x944
author_rank: Frequent Contributor
timestamp: July 04, 2017, 05:58:40 pm
content: photos of the circuit on the breadboard:https://drive.google.com/file/d/0B5vW-k7HbsL4b2RvX3NuanJaVjA/view?usp=sharinghttps://drive.google.com/file/d/0B5vW-k7HbsL4LTNObktlckhPd1U/view?usp=sharinghttps://drive.google.com/file/d/0B5vW-k7HbsL4UTZ1cWh4cHR4UjQ/view?usp=sharinghttps://drive.google.com/file/d/0B5vW-k7HbsL4ZG9TTlN3UmN4Tk0/view?usp=sharing

author: C
author_rank: Super Contributor
timestamp: July 04, 2017, 06:08:30 pm
content: Quote from: ali6x944 on July 04, 2017, 05:32:11 pm74LS374The eight flip-flops of the DM54/74LS374 are edge-triggeredD-type flip flops. On the positive transition of the clock, the Qoutputs will be set to the logic states that were set up at theD inputs.74LS373The eight latches of the DM54/74LS373 are transparentD-type latches meaning that while the enable (G) is high theQ outputs will follow the data (D) inputs. When the enable istaken low the output will be latched at the level of the datathat was set up.NSC800 page 8ALEAddress Latch Enable (ALE): Active high. ALE is activeonly during the T1 state of any M cycle and also T3 state ofthe M1 cycle. The high to low transition of ALE indicatesthat a valid memory, I/O or refresh address is available onthe AD(0 –7) lines.NSC800 Page 70shows itWhat is wrong here with the 74LS374Datasheethttp://ecee.colorado.edu/~mcclurel/dm74ls373.pdf

author: ali6x944
author_rank: Frequent Contributor
timestamp: July 04, 2017, 06:20:06 pm
content: 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

author: ali6x944
author_rank: Frequent Contributor
timestamp: July 04, 2017, 06:22:10 pm
content: I think I have another one on me, I will replace the chip just give me a couple of minutes...

author: C
author_rank: Super Contributor
timestamp: July 04, 2017, 06:25:17 pm
content: This is just about ALE, and on paperALEFor now do not worry about the scopeJust 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: July 04, 2017, 06:26:30 pm
content: unfortunately, I don't have 74LS373...but I have ONLY 74LS273 and 74LS374....

author: C
author_rank: Super Contributor
timestamp: July 04, 2017, 06:31:23 pm
content: Not trying to be mean.For now it does not matter if you have a 7474LS373 or notWhat does a change of a logic chip from 74LS373 to 74LS374 do?What changes would this make to the NSC800It is a THINK problem.

author: ali6x944
author_rank: Frequent Contributor
timestamp: July 04, 2017, 06:36:28 pm
content: 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...

author: C
author_rank: Super Contributor
timestamp: July 04, 2017, 06:40:47 pm
content: BINGONow go a step forward what happens with lower address bus with the two different chips?

author: C
author_rank: Super Contributor
timestamp: July 04, 2017, 06:47:50 pm
content: Quote from: ali6x944 on July 04, 2017, 06:36:28 pmNot 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 problem1. 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?Quote from: ali6x944 on July 04, 2017, 06:59:03 pmCloseWhat happens for #2 if the input is changing?

author: ali6x944
author_rank: Frequent Contributor
timestamp: July 04, 2017, 06:59:03 pm
content: Quote from: C on July 04, 2017, 06:47:50 pmthat 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.

author: C
author_rank: Super Contributor
timestamp: July 04, 2017, 07:16:50 pm
content: If you use a 74LS374Input is captured on positive edge, output sees no more changes. If input is still changeing then output is wrong.If you use a 74LS373Input starts showing on output when level is high and follows all changes to input. Changes stop when low.The #3You 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: July 04, 2017, 08:17:38 pm
content: Quote from: C on July 04, 2017, 07:16:50 pmmmmmm.....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...

author: C
author_rank: Super Contributor
timestamp: July 04, 2017, 09:31:57 pm
content: 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 #3What 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 problemFor 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.

author: C
author_rank: Super Contributor
timestamp: July 04, 2017, 09:52:31 pm
content: 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 LSYou said you have a 74ls273You 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.

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: July 05, 2017, 03:38:42 am
content: Quote from: C on July 04, 2017, 09:31:57 pmAt 4MHz theminimumhold time from ALE low to AD7-0 tristate is 30ns. The 74LS04 adds 15ns delaymaximum(typically 10ns), so it should be OK even at maximum CPU clock speed.Obviously a 373 would be better, but it's not essential.QuoteSome 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: July 05, 2017, 09:32:27 am
content: Quote from: Bruce Abbott on July 05, 2017, 03:38:42 amQuote from: C on July 04, 2017, 09:52:31 pmbut wait! this means that I can run this chip if theCPU's clock out/system clockis 4MHz...system clockin my test setup is 2MHz, so if I use 74ls04 it will definitely work

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: July 05, 2017, 05:08:47 pm
content: Quote from: ali6x944 on July 05, 2017, 09:32:27 amI don't think the clock frquency makes any difference, but the CPU'sratedspeed 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?

author: C
author_rank: Super Contributor
timestamp: July 05, 2017, 06:18:51 pm
content: Quote from: ali6x944 on July 05, 2017, 09:32:27 amYes 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 ALENeed 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 ALEth(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 ALERD gos low tDAR {160ns} after ALESo 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 lowSo 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: July 12, 2017, 06:15:54 pm
content: 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.sorryCI was not able to run arduino bootloader on atmega32a, but I will try my best to get it up and running.

author: legacy
author_rank: Super Contributor
timestamp: July 13, 2017, 12:45:23 pm
content: yup. Excellent! Sooner or later I will design a GB cart with EagleCAD, allowing people to have an alternative to the hack I presentedhere. Your EPROM programmer is excellent for this job too since it can program FLASH as well as NVRAM and UV-PROMFor 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

author: ali6x944
author_rank: Frequent Contributor
timestamp: July 13, 2017, 03:08:28 pm
content: Quote from: legacy on July 13, 2017, 12:45:23 pmMm.... 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!

author: C
author_rank: Super Contributor
timestamp: July 13, 2017, 04:36:13 pm
content: In some of your videos you use a pointer that conducts electricity, Not a great idea!In your NSC800 videoYou 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.Quote1. 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: July 15, 2017, 07:21:22 am
content: this is the current design before modification:https://drive.google.com/file/d/0B5vW-k7HbsL4OXg5QnBfeU5lX2s/view?usp=sharingthis is the design after modification:https://drive.google.com/file/d/0B5vW-k7HbsL4d2ZNazluaVlQb1U/view?usp=sharingthis the design using 74ls541:https://drive.google.com/file/d/0B5vW-k7HbsL4Ukd1QW4xaWxjb2s/view?usp=sharingQuote from: C on July 13, 2017, 04:36:13 pmtrue, I will change it in the future...Quote from: C on July 13, 2017, 04:36:13 pmI 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.

author: C
author_rank: Super Contributor
timestamp: July 15, 2017, 06:29:16 pm
content: Quote from: ali6x944 on July 15, 2017, 07:21:22 amBoth have errorsFrom what I see in these two circuits, I would think you do not understand how the 374 works.Re-read the datasheet of the LS374Then look at NSC800 datasheetFigures 9a,9b,10a,10bWhat 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.Quote from: ali6x944 on July 15, 2017, 07:21:22 amWhat 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

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: July 15, 2017, 08:22:08 pm
content: Quote from: ali6x944 on July 15, 2017, 07:21:22 amI 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: July 19, 2017, 07:44:11 pm
content: Quote from: C on July 15, 2017, 06:29:16 pmthose 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 delaysI 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.

author: C
author_rank: Super Contributor
timestamp: July 20, 2017, 12:01:58 am
content: Using thishttps://drive.google.com/file/d/0B5vW-k7HbsL4Ukd1QW4xaWxjb2s/viewQuoteOKQuote+25ns LS374 off+53ns LS541 on (15ns + 38ns)You have a high Z time of 28ns between the two chips.This is OKQuoteOKQuote+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 chipsIn 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 18nsA 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 + >43nsYour 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.

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: July 20, 2017, 03:31:12 am
content: Quote from: C on July 20, 2017, 12:01:58 amThere 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.QuoteThis 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 timewhy 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 isactualhappening in your circuits. A lowly 5MHz dual trace analog scope should be sufficient.

author: ali6x944
author_rank: Frequent Contributor
timestamp: July 20, 2017, 06:37:48 am
content: QuoteI 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...

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: July 20, 2017, 08:06:49 am
content: Quote from: ali6x944 on July 20, 2017, 06:37:48 amYou can get by with 1 channel, but 2 channels are better for doing comparative timing measurements. What exactly is wrong with the second channel?

author: C
author_rank: Super Contributor
timestamp: July 20, 2017, 11:11:12 am
content: SN74LS04http://www.ti.com/lit/ds/symlink/sn54ls04-sp.pdf]http://www.ti.com/lit/ds/symlink/sn54ls04-sp.pdf] http://www.ti.com/lit/ds/symlink/sn54ls04-sp.pdfSN74LS374http://www.ti.com/lit/ds/symlink/sn54ls373.pdfSN74LS541http://www.ti.com/lit/ds/symlink/sn74ls541.pdfAs 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 & 74LS541state 2 The high Z time must be >0State 4 is a messMore 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 sheetmax delay is 15ns so two inverters in series is 30nsBut typical is 9ns high & 10ns low for a total of 19nsThis 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 aboveFor 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 >0nsNote 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.

author: C
author_rank: Super Contributor
timestamp: July 20, 2017, 03:15:53 pm
content: ali6x944,Look at your copy of the NSC800 data sheet.Page 1you should see"Low-Power CMOS Microprocessor"You need to look at page 3 to see what this meansVIH Logical 1 Input Voltage min 0.8 VCCVIL Logical 0 Input Voltage max 0.2 VCCWhen you compute this max 0.2 VCC= 1V and 0.8 VCC= 4V with VCC = 5VThis is CMOS input logic levels.Lower you seeVOH1 Logical 1 Output Voltage IOUT = -1.0 mA 2.4 VVOH2 Logical 1 Output Voltage IOUT = -10 uA VCC -0.5 VVOL1 Logical 0 Output Voltage IOUT = 2 mA 0.4 VVOL2 Logical 0 Output Voltage IOUT = 10 uA 0.1 VYou have standard output TTL logic levels for xxx1and CMOS output for low current pin loads xxx2.If you look at the SN74HC04http://www.ti.com/lit/ds/symlink/sn74hc04.pdfYou see that the outputs of the SN74HC04 can meet the required input levels of NSC800If you look at the SN74LS04http://www.ti.com/lit/ds/symlink/sn54ls04-sp.pdfYou see that the outputs of the SN74LS04 WILL NOT meet the required input levels of NSC800An LS or TTL logic output can not be an input to NSC800An 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 voltageThere is a third logic family HCT which is TTL input levels & CMOS Output levels.One memory chip I see in your list is MB8464AThis 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'sDetails like this from data sheets in this post need to be correct to have working system.

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: July 20, 2017, 10:25:17 pm
content: Good point on the CMOS input levels. The vast majority of CMOS CPUs are TTL compatible, but the NSC800 isnot. It always pays to read the datasheet carefully. For example the Z80 is TTL on all inputsexceptthe 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: July 24, 2017, 10:58:53 am
content: Quotewell, 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

author: C
author_rank: Super Contributor
timestamp: July 24, 2017, 01:15:08 pm
content: 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..

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: July 24, 2017, 01:54:47 pm
content: Quote from: ali6x944 on July 24, 2017, 10:58:53 amTTL compatibility was achieved by using pull-up resistors.Quote from: CNever 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: July 26, 2017, 06:23:58 am
content: QuoteThat'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

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: July 26, 2017, 08:48:02 am
content: 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.

author: C
author_rank: Super Contributor
timestamp: July 26, 2017, 02:03:38 pm
content: 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: July 27, 2017, 02:22:46 pm
content: I received the TL866CS programmer this morning, I tested it and it was working nicelyI 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...

author: ali6x944
author_rank: Frequent Contributor
timestamp: July 27, 2017, 02:25:12 pm
content: I tested many others and they contain code I guess...

author: ali6x944
author_rank: Frequent Contributor
timestamp: July 30, 2017, 05:44:37 am
content: 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...

author: SeanB
author_rank: Super Contributor
timestamp: July 30, 2017, 06:54:20 am
content: 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.

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: July 30, 2017, 03:31:26 pm
content: Quote from: SeanB on July 30, 2017, 06:54:20 amTrue, but this may not apply to a small system whichdoesn'toperate 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.

author: SeanB
author_rank: Super Contributor
timestamp: July 30, 2017, 03:47:52 pm
content: 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: July 30, 2017, 04:08:43 pm
content: 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?

author: SeanB
author_rank: Super Contributor
timestamp: July 30, 2017, 04:47:51 pm
content: 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.

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: July 30, 2017, 09:31:56 pm
content: Quote from: SeanB on July 30, 2017, 03:47:52 pmZ80 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 CMOSandTTL compatibility with low power consumption, and is more readily available.Quote from: ali6x944Pullups don't affect input thresholds. However they do raise VOLon outputs, increase power supply current, and of course make the build more complex. Use them when necessary, avoid them if you can.

author: ali6x944
author_rank: Frequent Contributor
timestamp: August 08, 2017, 06:54:19 am
content: Quote from: Bruce Abbott on July 30, 2017, 09:31:56 pmthanks m8

author: ali6x944
author_rank: Frequent Contributor
timestamp: August 08, 2017, 08:19:52 am
content: Finally I got the Z80 and the MC68B50P from ebay...I will test them and inform u ASAP.

author: ali6x944
author_rank: Frequent Contributor
timestamp: August 08, 2017, 12:30:06 pm
content: 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...

author: ali6x944
author_rank: Frequent Contributor
timestamp: August 08, 2017, 03:34:56 pm
content: For the Z80s all 3 I bought from ebay doesn't workthis is the seller beware:http://www.ebay.com/usr/adeleparts2010?_trksid=p2057872.m2749.l2754now I'm trying to figure out a way to test the MC68B50P, If any one knows post please

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: August 08, 2017, 07:37:26 pm
content: Quote from: ali6x944 on August 08, 2017, 03:34:56 pmI 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?QuoteTo 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.

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: August 08, 2017, 08:01:00 pm
content: 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: August 09, 2017, 04:29:01 am
content: The Z80s and MC68B50 came in a static disipative tube, these are the chips:https://drive.google.com/file/d/0B5vW-k7HbsL4eFBDZUFldXpqa1E/view?usp=drivesdkhttps://drive.google.com/file/d/0B5vW-k7HbsL4R3BmY3kzRndDWHM/view?usp=drivesdk

author: ali6x944
author_rank: Frequent Contributor
timestamp: August 09, 2017, 05:35:46 am
content: Quotefor 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: August 11, 2017, 12:45:24 am
content: Both chips I tested gave me a current draw of 48.5-50mA,I think this is a step in the right direction...QuoteThe 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.

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: August 11, 2017, 05:18:44 am
content: Quote from: ali6x944 on August 11, 2017, 12:45:24 amThat 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-markedAY-3-8910which 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 moregenuinechips 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 visiblyolderchips 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 theyareactually 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 theMattel Aquarius. Apart from the label it's actually identical to a normal AY-3-8910.

author: ali6x944
author_rank: Frequent Contributor
timestamp: August 12, 2017, 07:42:38 am
content: 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

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: August 12, 2017, 09:22:51 am
content: 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 avariantof the MC6850.BTW by comparing package shapes I figured out that my '20MHz' Z80's are actuallySharp LH0080, a popular 2nd source for the 4MHz NMOS Z80.

author: ali6x944
author_rank: Frequent Contributor
timestamp: August 12, 2017, 03:07:01 pm
content: Well, I think that we are going in the right directionBut remember the 74LS373, I tested it with my TL866CS and it was bricked...I will however buy a new chip today, hopefully...

author: ali6x944
author_rank: Frequent Contributor
timestamp: August 13, 2017, 06:03:47 pm
content: I got it now, no worries

author: ali6x944
author_rank: Frequent Contributor
timestamp: August 14, 2017, 04:03:04 pm
content: 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

author: ali6x944
author_rank: Frequent Contributor
timestamp: August 17, 2017, 08:26:52 am
content: 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=drivesdkNote 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: August 17, 2017, 10:59:21 am
content: 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: August 22, 2017, 09:16:20 am
content: 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

author: ali6x944
author_rank: Frequent Contributor
timestamp: August 22, 2017, 05:32:49 pm
content: 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.

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: August 23, 2017, 07:45:35 am
content: Quote from: ali6x944 on August 22, 2017, 05:32:49 pmYes.Quote32K 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: August 23, 2017, 04:00:18 pm
content: QuoteHow 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?

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: August 23, 2017, 05:39:12 pm
content: Quote from: ali6x944 on August 23, 2017, 04:00:18 pmYou 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.QuoteIt 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.QuoteThe 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: August 24, 2017, 04:52:23 pm
content: thanks m8and 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 guessbut 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...

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: August 24, 2017, 09:12:11 pm
content: Quote from: ali6x944 on August 24, 2017, 04:52:23 pmUnfortunately that won't work because many instructions have immediate data after the opcode, which would be read from the wrong memory.QuoteThis 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).QuoteYou 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.QuoteSwitching 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 TheAmstrad CPC6128has 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 another4MBof 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: August 27, 2017, 04:56:24 am
content: 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=drivesdkhttps://drive.google.com/file/d/0B5vW-k7HbsL4NzB2Tjh2Uk1kc0k/view?usp=drivesdk

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: August 27, 2017, 07:38:07 am
content: 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: August 27, 2017, 02:00:04 pm
content: This is great newsBut what is interrupt mode 2? Is there way to fix the problem?Also don't worry about the cpu's RAM its all SRAM.

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: August 27, 2017, 05:45:19 pm
content: Quote from: ali6x944 on August 27, 2017, 02:00:04 pmEither don't use peripherals that need IM2, or stick with the NSC800.QuoteThis 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 64thousandtransistors in a single chip!

author: ali6x944
author_rank: Frequent Contributor
timestamp: August 28, 2017, 04:07:59 am
content: 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...

author: ali6x944
author_rank: Frequent Contributor
timestamp: August 28, 2017, 09:53:57 am
content: 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 flashingnote that the eeprom is new thus all positions are 0xFF in the eeprom and suspect this is the responsible...

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: August 28, 2017, 07:04:23 pm
content: Quote from: ali6x944The 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'sSC/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.Quote0xFF 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 sellerhifi-szjxic. Genuine original 'unretouched' andwell usedICs! (described honestly as such in their listings). I am now designing a PCB for the NSC800.

author: ali6x944
author_rank: Frequent Contributor
timestamp: August 29, 2017, 05:11:04 am
content: CoolNow 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

author: ali6x944
author_rank: Frequent Contributor
timestamp: August 29, 2017, 09:28:32 am
content: I have flashed the ROM to all 0x00 but the LEDs are still on...

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: August 29, 2017, 07:40:09 pm
content: Quote from: ali6x944 on August 29, 2017, 09:28:32 amCan 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

author: ali6x944
author_rank: Frequent Contributor
timestamp: August 30, 2017, 04:19:49 pm
content: https://drive.google.com/file/d/0B5vW-k7HbsL4YlNjZ3F1aEJtdXM/view?usp=drivesdkThis 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 ?

author: Ian.M
author_rank: Super Contributor
timestamp: August 30, 2017, 05:22:11 pm
content: Quote from: ali6x944 on August 30, 2017, 04:19:49 pmThat 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: September 02, 2017, 09:01:27 am
content: Quote from: Ian.M on August 30, 2017, 05:22:11 pmSorry , but I didn't understand your circuit layout and theory of operation...

author: Ian.M
author_rank: Super Contributor
timestamp: September 02, 2017, 10:38:28 am
content: 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: September 02, 2017, 01:10:17 pm
content: Thanks a lot IanI will build it now and inform you with the result.

author: ali6x944
author_rank: Frequent Contributor
timestamp: November 18, 2017, 05:32:52 pm
content: 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?

author: Ian.M
author_rank: Super Contributor
timestamp: November 18, 2017, 06:13:03 pm
content: 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?

author: ali6x944
author_rank: Frequent Contributor
timestamp: December 14, 2017, 08:25:20 pm
content: It is working nowIt was the bloody NE555 when I replaced it with the cmos TLC555CP it worked nicelyThanks a lot Ian

author: ali6x944
author_rank: Frequent Contributor
timestamp: December 19, 2017, 07:13:50 am
content: I will use the following addressing technique:https://drive.google.com/file/d/0B5vW-k7HbsL4dE9kdkFEM1VNR2c/view?usp=drivesdkAgain I have reflashed the rom to 0x00 but I will not connect the ram just yet to see if it will work or not...

author: ali6x944
author_rank: Frequent Contributor
timestamp: January 03, 2018, 04:53:54 pm
content: https://drive.google.com/file/d/1xskY6pgiYRTDF3C9KDveT1otbeTKdtm-/view?usp=drivesdkHere 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.

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: January 03, 2018, 06:16:32 pm
content: Which output of the LS138 is active? What is the memory address, and what data were you expecting?

author: ali6x944
author_rank: Frequent Contributor
timestamp: January 04, 2018, 02:30:58 am
content: 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.

author: ali6x944
author_rank: Frequent Contributor
timestamp: January 04, 2018, 02:54:01 am
content: To be more exact, the address bus should be incrementing while the data bus should show nops.

author: ali6x944
author_rank: Frequent Contributor
timestamp: January 06, 2018, 02:55:29 pm
content: 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?