is the nsc800 chip still in production ?
just so u know i don't have any micro controller or usb to ttl converter of any kindBut you do have the NSC800 CPU itself, right?
just so u know i don't have any micro controller or usb to ttl converter of any kindJust so you know, you might have to buy some other things to get your NSC800 working. ;)
USB -of course- ,RS-232 from a d-sub connector, and LAN.RS-232 can be converted into TTL with a simple level shifter circuit using a MAX232 or a couple of transistors and resistors. Or you could use your USB port with a cheap USB-TTL converter (http://www.icstation.com/cp2102-module-serial-converter-p-2329.html).
is their is a method i could use to transfer data using those things listed above?
Great detailed explanation will be appreciatedWhat exactly do you want an explanation of?
U know this the first time i do something heavy digital...Heavy digital? What did you do before?
So exuse me if i have sounded like an absolute foolno problem m8
Great detailed explanation will be appreciatedRTFM
nothing difficult...Ok, how much do you actually understand? Because if you wanna build a computer from scratch, you need to understand some things. There are no tutorials on this stuff.
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...
am struggling to understand what is an address lines, buses, data transfer protocols, and the software things ...
am struggling to understand what is an address lines, buses, data transfer protocols, and the software things ...Dude do some basics, real basics, learn, read and then come back to it.
i just stare at the screen saying :wtf:
seriously man i know nothing! simply nothing :-//
If either of the boards has logic in a PAL chip
in the NSC800 datasheet there is multiple reest pins and i'm confuse which one to use for the tester by Thomas scherrer in z80.info.You use RESET IN to reset the MPU. RESET OUT is an output from the MPU which is used to reset external devices. The RSTx lines are inputs used to generate interrupts.
in the NSC800 datasheet there is multiple reest pins and i'm confuse which one to use for the tester by Thomas scherrer in z80.info.You use RESET IN to reset the MPU. RESET OUT is an output from the MPU which is used to reset external devices. The RSTx lines are inputs used to generate interrupts.
As far as its bus interface is concerned the NSC800 is more like an 8085 than a Z80. The lower 8 address bits are multiplexed with the data bus. At the start of a Read cycle A0-7 is sent out on the Address/Data lines, then the bus is switched to input mode to read D0-7. You can still pull the Address/Data lines low like in Thomas scherrer's circuit, but you should increase the values of the pull-down resistors to ~2.2k Ohms so they won't overload the bus when it is outputting the address.
Using A0-2 for the LED indicators is not very satisfactory because they will blink 'randomly' when showing the refresh address. So connect the LEDs to A8-10, and increase the clock frequency by ~256 (eg. by changing the 68k resistor to 47k and the 1uF capacitor to 4.7nF) to make them blink at a similar rate. These addresses alternate with the I register, but this has a constant value so it will be easier to pick out the instruction address increment in the blinking pattern.
test results where kind of weird, i got this really odd oscillation pattern in pins 1,2,3 which are pin A(8,9,10) which correspond to pins A(0,1,2)A8,9,10 put out the program counter address during instruction read, and the I register during refresh. On power up the I register has a random value, so each time you test the MPU the pattern could be different. However once powered up the I register contents don't change, so the LEDs should alternate between counting up and a fixed (random) pattern.
[..] On power up the I register has a random value, so each time you test the MPU the pattern could be different.
But on reset it is zeroed out...You are right! (I forgot that unlike other the registers, I and R are cleared on reset). So provided that the CPU only gets NOPs, the LEDs should flash the address count. If the LEDs are flashing 'weirdly' then either the CPU isn't getting NOPs, or one of the control lines is not set correctly.
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 resistorIf you don't have anything connected to the Address/Data lines then you don't know what instructions the CPU is executing, and it could do anything. The tester relies on the CPU executing continuous NOPs (opcode 0x00) which requires that all data lines be pulled low. However the lower 8 address bits also come out on the same pins, so to avoid shorting the address outputs they must be pulled low with resistors.
I'm confused is it supposed to work like this...No, it isn't. When /RESET IN (pin 33) is pulled low the CPU should stop operating. Also RESET OUT (pin 37) should go high. Can you verify that RESET OUT goes high when /RESET IN is low, and goes low when /RESET IN goes high?
i think i will not use the crystal, maybe will use external clock, saw this in the data sheet:Interesting! CMOS Z80's are fully static and have no minimum clock frequency.
"FIGURE 7. Use Of Crystal
The CPU has a minimum clock frequency input (@ XIN) of
300 kHz, which results in 150 kHz system clock speed. All
registers internal to the chip are static, however there is
dynamic logic which limits the minimum clock speed.
but did the measurements i took still apply?No. If some of the control circuitry is dynamic then it could misbehave at low clock speeds, and your traces would reflect this. You need to clock the CPU at the correct frequency. If possible, trigger the scope on /RESET rising edge, then you can see what happens on startup.
I also bought an arduino to help program the eproms i have after i erase them...To erase a UV EPROM you need 'hard' ultraviolet. A germicidal UV lamp can do it, but be careful - it will burn your eyes out in a few seconds. I use a cheap UV eraser bought from eBay, like this one:-
the problem is how? could a CFL bulb work for this?
Do anybody know how to use the two line output control in a M2764A UV EPROM ?That just refers to the fact that it has a Chip Enable input as well as an Output Enable input
shift/load and clock inhibit and the serial in lowWith 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.
will i did that.
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.
With shift/load low it will load the 8 parallel data bits on each clock but it won't shift the bits, so you will just get Q7 over and over. You need to pull shift/load low and apply 1 clock to load the register and get Q7, then pull it high and clock out the other 7 bits.sorry but i didn't quit get it, should i connect the clock pin to shift/load pin?
Also I tried putting out the clock thing for the shift regester to read the eprom but no results...You still only have two lines connected from the Arduino to the 74LS166. You need 3 lines - CLOCK (pin 7), QH (pin 13), and SHIFT/LOAD (pin 15). To load the 8 parallel bits from the EPROM you must set SHIFT/LOAD low and then pulse CLOCK (high/low). This will transfer parallel input H to QH. To read the other bits out serially you must set SHIFT/LOAD high and pulse CLOCK.
Do I need to configure any of the adress pins?
Like to get an output...
The wierd thing is that I got only zero's after that byte...Post your code so that I can check it...
Err... right. You couldn't paste the code into your post?sorry about that ...
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.
void loop() {To read a byte you must first set shift/load LOW and pulse the clock. This loads the byte into the shift register and puts the first bit on QH. Then you set Shift/Load HIGH to enable shifting, and pulse the clock + read QH 7 times to get the next 7 bits. Something like this:-
// put your main code here, to run repeatedly:
digitalWrite(12,HIGH); //SHIFT-LOAD HIGH
delay(10);
digitalWrite(13,HIGH); //CLOCK HIGH
delay(10);
digitalWrite(13,LOW); //CLOCK LOW
int val =digitalRead(11); // read the input pin
Serial.print(val,OCT); // print the input pin
}
#define CLOCK 13 // 74LS166 CLOCK
#define SHFTLD 12 // SHIFT/LOAD
#define DATIN 11 // QH
void loop() {
int i;
digitalWrite(SHFTLD,LOW); // 'parallel load' mode
delay(10);
digitalWrite(CLOCK,HIGH);
delay(10);
digitalWrite(CLOCK,LOW); // clock the parallel inputs into the shift register
delay(10);
int val =digitalRead(DATIN); // read the 1st bit at QH
Serial.print(val,OCT); // print the 1st bit
digitalWrite(SHFTLD,HIGH); // 'shift' mode
delay(10);
for (i=1; i<=7; i++){ // another 7 bits to read
digitalWrite(CLOCK,HIGH);
delay(10);
digitalWrite(CLOCK,LOW); // shift the next bit to QH
delay(10);
int val =digitalRead(DATIN); // read the next bit
Serial.print(val,OCT); // print the next bit
}
Serial.println();
}
Are A12-8 the Y-decoders and A7-0 are the X-decoders ?The order that the address bits are connected to the row and column decoders inside the chip is not important. What is important is that all address lines have defined states. In your latest photo there are no wires going to A0-7. Perhaps you have since added them, however your 'random' data suggests that some address lines are not stable.
What was I doing it right by aplying a parallel binary input to
Adress inputs In which Y-decoders get their own count and X-decoders their own count?
Any ideas to make the output in the serial monitor easier to record?Maintain a counter for the address. Start at address 0x0000 and reset the LS166's. Print the address, followed by a ':'. Collect all the bits of each byte into a single number. Read 16 bytes and store them in an array, and print them out in Hex (all on the same line, with a space before each number). Then print the 16 bytes again as ASCII chars (changing any char below SPACE or above '~' to a '.', to avoid printing control codes). Now send CR+LF (newline) and repeat to do the next 16 bytes. Stop when the address counter gets to the size of your ROM.
Maintain a counter for the address. Start at address 0x0000 and reset the LS166's. Print the address, followed by a ':'. Collect all the bits of each byte into a single number.so should i reset all both the counters and the shift register, because that's what i did, and for output printing should it be like:
Read 16 bytes and store them in an array, and print them out in Hex (all on the same line, with a space before each number). Then print the 16 bytes again as ASCII chars (changing any char below SPACE or above '~' to a '.', to avoid printing control codes). Now send CR+LF (newline) and repeat to do the next 16 bytes. Stop when the address counter gets to the size of your ROM.not quit sure how should i do it am quit confused :(
is it possible to use an EPCI to talk with the e promEngineering, Procurement, Construction, and Installation?
:-DDis it possible to use an EPCI to talk with the e promEngineering, Procurement, Construction, and Installation?
Enhanced Proliferation Control Initiative?
Electronic Payment Certification Institute?
Export Promotion Center of Iran (est. 1965)?
???
after all, i think it will work better than shift registers and counters :)A UART chip? Somehow I don't think it will work any better.
Could it work with 74ls273 instead of the 573 he used in his circuit??Yes. The 273 clocks data in when pin 11 goes from low to high rather than latching when it goes low, but that doesn't matter in this case because the program works with either method.
Is it possible to do what he did?"Fail, fail often - and boy have I been failing hard!".
It didn't give any output I don't quite get what's going on?...It's a very simple circuit and not much can go wrong - if it's hooked up correctly. Check your wiring.
i also tried it with 74LS374 and it didn't work
See circuit:I see a lot of red and green wires but no circuit diagram. How can you check your wiring when you don't have a circuit diagram?
https://drive.google.com/folderview?id=0B5vW-k7HbsL4c09XNjBIbDc4Zmc
#include <xc.h>
// include processor files - each processor file is guarded.
// PIC16F77 Configuration Bit Settings
// 'C' source line config statements
// CONFIG
#pragma config FOSC = LP // Oscillator Selection bits (LP oscillator)
#pragma config WDTE = OFF // Watchdog Timer Enable bit (WDT disabled)
#pragma config PWRTE = OFF // Power-up Timer Enable bit (PWRT disabled)
#pragma config CP = OFF // FLASH Program Memory Code Protection bit (Code protection off)
#pragma config BOREN = ON // Brown-out Reset Enable bit (BOR enabled)
#define _XTAL_FREQ 32786
/*THE FIRST BIT OUT IS D7 & THE LAST BIT OUT IS D0, LIFO*/
char OUTPUT_SHIFT_REGISTER(){
int i; //Set bit position in OUTPUT_ARRAY and counts the bit number
char OUTPUT_ARRAY[8]; //Stores the byte OUTPUT OF THE SHIFT_REGISTER
for(int i=0; i<=8;i++){
PORTBbits.RB0=1; //Set the SHIFT/LOAD of 74ls166 to shift _high
char Qh=PORTBbits.RB3; // Set char Qh to the value of RB3
OUTPUT_ARRAY[i]=Qh; //Writes Qh value to the array OUTPUT_ARRAY in position i
/*Clock for shifting the bits*/
PORTBbits.RB2=1; //Set the CLOCK of 74ls166 to _high
__delay_us(100);
PORTBbits.RB2=0; //Set the CLOCK of 74ls166 to _low
}
return OUTPUT_ARRAY;
}
#include "config.h"
#include <stdio.h>
#include <xc.h>
void main(void) {
TRISBbits.TRISB0=0; //RB0 set to output [ctrl SHIFT/LOAD of 74ls166]
TRISBbits.TRISB1=0; //RB1 set to output [ctrl CLEAR of 74ls166]
TRISBbits.TRISB2=0; //RB2 set to output [ctrl CLOCK of 74ls166]
TRISBbits.TRISB3=1; //RB3 set to input [read QH of 74ls166]
TRISBbits.TRISB4=0; //RB4 set to output [ctrl CLOCK of MC14040]
TRISBbits.TRISB5=0; //RB5 set to output [ctrl RESET of MC14040]
TRISBbits.TRISB6=0; //RB6 set to output [ctrl tri-state buffer stage 74ls541]
TRISBbits.TRISB7=1; //RB7 set to input [read Y of 74ls30]
TRISDbits.TRISD7=0; //RD7 set to output [ctrl A12 of tri-state buffer stage 74ls541]
int a; //Set OUTPUT bit position of OUTPUT_SHIFT_REGISTER, LIFO -LAST IN FIRST OUT- ,MSB=0
while(1){
PORTBbits.RB6=1; //Set the tri-state Buffer of 74ls541 to _tri-state
PORTBbits.RB1=0; //Set the CLEAR of 74ls166 to _low
__delay_us(100);
PORTBbits.RB1=1; //Set the CLEAR of 74ls166 to _high
PORTBbits.RB5=1; //Set the Reset to _high
__delay_us(100);
PORTBbits.RB5=0; //Set the Reset to _low
int Clock; //clock count of MC14040
for(int Clock=0; Clock<=8191; Clock++){
if(PORTBbits.RB7!=1){
PORTBbits.RB4=1; //Set the CLOCK of MC14040 _high
__delay_us(100);
PORTBbits.RB4=0; //Set the CLOCK of MC14040 _low
PORTBbits.RB6=0; //Set the tri-state buffer stage 74ls541 to _enable
PORTBbits.RB0=0; //Set the SHIFT/LOAD of 74ls166 to load _low
OUTPUT_SHIFT_REGISTER();
}
else{
PORTBbits.RB4=1; //Set the CLOCK of MC14040 _high
__delay_us(100);
PORTBbits.RB4=0; //Set the CLOCK of MC14040 _low
PORTBbits.RB6=0; //Set the tri-state buffer stage 74ls541 to _enable
PORTBbits.RB0=0; //Set the SHIFT/LOAD of 74ls166 to load _low
PORTDbits.RD7=1; //Set A12 of tri-state buffer stage 74ls541 _high
OUTPUT_SHIFT_REGISTER();
}
}
}
return;
}
I'm using a pic16f77 with XC8 compiler.I would like to use UART to get the memory data to my computer using a cp2102 USB bridge, so the controller is only sending data through UART...USB to serial is a good way to do it, but...
mmmm....I would like to use UART to get the memory data to my computer using a cp2102 USB bridge, so the controller is only sending data through UART...USB to serial is a good way to do it, but...
What do you intend to do with the 'data' once you get it into the computer? If you want to download code and run it on the NSC800 then you will need some RAM and a way to load the 'data' into it.
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.I guess u are right, I went to digikey and I saw:
The information from old UV based roms can easily be transfered to a newer device.
Today unless you are trying make a very old clone, I would let the TMS4416's collect dust.
The MB8464A is not much better.
From digikey
64kx8 static ram. $2.65
128Kx8 $3.16
512Kx8 $5.48
ROM like
512kx8 flash based $1.70
64kx8 EEPROM $3.12
So if you wire up just two 32 pin dip sockets, you should have all the ROM & RAM you need to start with and the extra space could be used in future.
So can you buy a UV eraser for less than $3.12?
if u know cheaper more reliable programmers or erasers post them please... ur post will help me alot :-+The Minipro is one of the cheapest and is pretty reliable. Watch out though because they have apparently been 'cloned' and the fakes may not work as good.
I will certainly use the MB8464A SRAMYes 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.
for the "way to load the 'data' into it." to the NSC800 computer I will use SCN2661BC1N28 EPCI to load the program to ram from my computer through a USB bridge similar Grant Searle Z80 design.In that case you just need to modify Grant Searle's code to work with the SCN2661. This may take a bit of trial and error to get working, so using an EEPROM would be a good idea (having to wait 20 minutes to erase your UV EPROM makes for a very slow development cycle!).
will this reduction in propagation delay have any effect on a multiplexed bus processor, if so is it bad or good, if its bad how can I fix it?Short propagation delays can be a problem if the memory responds too quickly and violates setup and hold times. However I don't think that will be a problem with the NSC800 as the bus timing doesn't appear to rely on long propagation delays. Another potential problem is noise on the bus caused by fast transitions. Make sure you have good low resistance ground wiring and power supply bypass capacitors on every chip.
For W27C512 you really need a programmer.True, but a programmer is a good tool to have around anyway. The Minipro can also program GALs and MCUs that need high voltage, and test RAM and logic chips.
For SST39SF010A-70-4C-PHE a micro controller or a running NSC800/Z80 can program the chip. The only hard part is the need to enable chip for writes which is not that hard to do. You can not run a program in the chip you are programming, but it's not that hard to put programming code in ram if your using the NSC800/Z80 to program chip.But you need to write the code and get it into the RAM somehow, which means either burning it into an EPROM for the CPU to boot from (chicken and egg problem) or loading it via DMA with some other device.
Look atIt's a clever idea, but quite a bit more complicated than just programming an EPROM and plugging it in. The more complex the design the more things can go wrong with the build, and the harder it is to debug. Since ali6x944 struggled just to read an EPROM with an MCU, I suggest going with the simplest solution - at least to start with.
https://www.youtube.com/watch?v=7eSbZ2Hu_6s (https://www.youtube.com/watch?v=7eSbZ2Hu_6s)
Here an Atmega32A loads a program in the Z80's ram starting at address 0H and then releases the Z80 reset.
I agree, maybe in the future I can do this but for now I should stick to the basics as Bruce Abbott said. :-+For W27C512 you really need a programmer.True, but a programmer is a good tool to have around anyway. The Minipro can also program GALs and MCUs that need high voltage, and test RAM and logic chips.QuoteFor SST39SF010A-70-4C-PHE a micro controller or a running NSC800/Z80 can program the chip. The only hard part is the need to enable chip for writes which is not that hard to do. You can not run a program in the chip you are programming, but it's not that hard to put programming code in ram if your using the NSC800/Z80 to program chip.But you need to write the code and get it into the RAM somehow, which means either burning it into an EPROM for the CPU to boot from (chicken and egg problem) or loading it via DMA with some other device.QuoteLook atIt's a clever idea, but quite a bit more complicated than just programming an EPROM and plugging it in. The more complex the design the more things can go wrong with the build, and the harder it is to debug. Since ali6x944 struggled just to read an EPROM with an MCU, I suggest going with the simplest solution - at least to start with.
https://www.youtube.com/watch?v=7eSbZ2Hu_6s (https://www.youtube.com/watch?v=7eSbZ2Hu_6s)
Here an Atmega32A loads a program in the Z80's ram starting at address 0H and then releases the Z80 reset.
quick question:Yes, wires do have propagation delay. However in the typical lengths required it is very small compared to the chips you are using. Inductance and capacitance can become a problem if they cause ringing or 'ground bounce'. High speed designs often have small resistors in series to damp oscillations, and 'meander' wires to fine tune the delays.
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....
can u give me the seller name of TL866, I don't really trust the current one I have:if u know cheaper more reliable programmers or erasers post them please... ur post will help me alot :-+The Minipro is one of the cheapest and is pretty reliable. Watch out though because they have apparently been 'cloned' and the fakes may not work as good.
I got a cheap nasty eraser from eBay which actually works fine. However for the same price you could buy several EEPROMs, which program faster and erase in a few seconds. 'Vintage' W27C512 EEPROMs sell on eBay for ~$1 each including postage. Unlike more modern EEPROMs these come in a 28 pin DIP package which is easier to work with.
I used a 28F101 in PLCC for the prototype of my current Z80 project. The PLCC socket was a pain to wire up and the chip is not easy to remove, and every now and then I have to sandpaper the pins to get good contact. I changed to the W27C512 for the production version of my project.
QuoteI will certainly use the MB8464A SRAMYes 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.Quotefor the "way to load the 'data' into it." to the NSC800 computer I will use SCN2661BC1N28 EPCI to load the program to ram from my computer through a USB bridge similar Grant Searle Z80 design.In that case you just need to modify Grant Searle's code to work with the SCN2661. This may take a bit of trial and error to get working, so using an EEPROM would be a good idea (having to wait 20 minutes to erase your UV EPROM makes for a very slow development cycle!).Quotewill this reduction in propagation delay have any effect on a multiplexed bus processor, if so is it bad or good, if its bad how can I fix it?Short propagation delays can be a problem if the memory responds too quickly and violates setup and hold times. However I don't think that will be a problem with the NSC800 as the bus timing doesn't appear to rely on long propagation delays. Another potential problem is noise on the bus caused by fast transitions. Make sure you have good low resistance ground wiring and power supply bypass capacitors on every chip.
No, u misunderstood me...
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.
can u give me the seller name of TL866, I don't really trust the current one I have:The official eBay store listed on Autoelectric (http://www.autoelectric.cn/en/TL866_Dealer.html)'s dealer page is Electronic DIY (http://stores.ebay.com/electronicdiy).
http://www.ebay.com/itm/191796916274 (http://www.ebay.com/itm/191796916274)
More hardware is needed to to run CPM.Agreed. CP/M is something to think about once you have a basic setup working. You need a disk drive (preferably two drives) and controller, some way to make disk images etc. Not a simple project!
I would think baby steps that you can verify would be much easier.
mostly lack of programming skills... :-[
Been thinking about this.
1. You tried to use an Arduino to write an EEPROM. Failed, could be lack of programming skills or lack of hardware skills or both.
If this step had worked you would only know what you tried to write to EEPROM matched when when verify read matched. If you had a hardware wiring problem like a swap of A5 with A6, the chip world still verify properly but would not function properly when used with Z80/NSC800.
You would just find it does not work. Hard problem to find with limited test tools.
I agree, but around 1 month ago I fried my only z80 so I must work and learn solely on the NSC800 until the Z80 I ordered from ebay get to saudi...
Been thinking about this.
1. You tried to use an Arduino to write an EEPROM. Failed, could be lack of programming skills or lack of hardware skills or both.
If this step had worked you would only know what you tried to write to EEPROM matched when when verify read matched. If you had a hardware wiring problem like a swap of A5 with A6, the chip world still verify properly but would not function properly when used with Z80/NSC800.
You would just find it does not work. Hard problem to find with limited test tools.
2. You are now trying to replace a Z80 with an NSC800. Not a big change, but still a change. Hardware change is mostly adding an ALE Latch to capture lower address. Not very hard to test if this is working.
3. You are trying to replace a Z80 SIO chip in grant's CPM design with a SCN2661. This requires both hardware design & change, and result must be correct. Then you have to create/change grant's code to function properly with this chip.
When you fail, you will have a blob that just does not work. You are missing one very important thing, A way for CPU to tell you some information on what it thinks and sees..
Sticking to this route, you would probably need at min output display for testing programs. Could be simple 8-bit output latch with led's connected to output. In addition to latch, you would need logic that would tell the latch when to capture data( write address decode).
Only if you get all this to work do you start to have some help from a Z80/NSC800 program on what is working or not working.
Now if you were making an exact copy of grant's design & got all the wiring correct, you have a fair chance of of getting IO to and from serial port and have a foundation you can add new software or hardware. One thing wrong and IT's a BLOB.
And when this is all working, it is just the first step. More hardware is needed to to run CPM.
I would think baby steps that you can verify would be much easer.
A complicated system can be used easer to develop something new. You have more tools you can use to find the problems.
I think you have some knowledge gained when you tried to use an Arduino to program EEPROM.
If a simple step was to connect a small circuit on breadboard to an Arduino and then program the Arduino with an existing program and run it. You have little hardware with known connections and no creating software. If this step is more useful to you then just getting a Z80 running, you gain two ways.
So this is getting long. Short simple steps.
1. use Arduino as ISP to program the Arduino boot loader in blank ATMEGA32A.
2. You now have Arduino boot loader on ATMEGA32A, so you can now use
Arduino IDE to program an existing program to ATMEGA32A
At this point you should have a working serial port connection to PC.
3. You wire up 4 chips.
4. At this point when you run the program on ATMEGA32A the first step is to load some existing code into Z80 ram(the Z80 boot loader) and start Z80. For the Z80 the ATMEGA32A is all the IO needed.
You now have access to a lot of software. Basic, CP/M and more.
If you do not like the idea of a ATMEGA32A supplying IO then you can start adding to system. You have a system that works, adding the SCN2661 will be a lot easer as you have tools to test it's function and not have to work in the dark.
You could add the flash rom you picked to system. Use it to start system when and then as storage(a disk drive)
When you have all the functions and have tested them then the ATMEGA32A could be removed.
Now that you have a cheap working Z80, You can use what you learned to create a second version with the NSC800 working.
Think this makes more sense then a BLOB that might work.
:-+More hardware is needed to to run CPM.Agreed. CP/M is something to think about once you have a basic setup working. You need a disk drive (preferably two drives) and controller, some way to make disk images etc. Not a simple project!
I would think baby steps that you can verify would be much easier.
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.
For Grant Searle's version more hardware is needed for CPM. Grant uses a COMPACT FLASH which acts like many big hard drives.More hardware is needed to to run CPM.Agreed. CP/M is something to think about once you have a basic setup working. You need a disk drive (preferably two drives) and controller, some way to make disk images etc. Not a simple project!
I would think baby steps that you can verify would be much easier.
I would start by programming a ROM with a very simple machine code program and replacing the 'nop' generator with it. Run the CPU at 1Hz and verify that the bus lines are doing what you expect. Then add the serial chip and get that to do some simple stuff (eg. send characters to the PC). Finally, add the working serial code to Grant Searle's Nascom BASIC ROM, and you have a complete computer which can run programs written in BASIC etc.As stated No ROM needed to start Z80 and no mess getting a working serial interface. The ATMEGA32A is IO, what looks like serial ports and hard drives to the Z80.
I made a simple Z80 SBC with a 16550 serial chip and 32k ROM and RAM, running Grant Searle's BASIC. I was going to add a 37C665 floppy drive controller but I am now thinking of using a CH376 USB module - just have to port the code over from my other project. The CH376 is very easy to interface and dramatically increases functionality.
The 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?
mostly lack of programming skills... :-[
I agree, but around 1 month ago I fried my only z80 so I must work and learn solely on the NSC800 until the Z80 I ordered from ebay get to saudi...
Can I use a PIC16f77 or an ATmaga328P instead of ATmega32a?For Grant Searle's version more hardware is needed for CPM. Grant uses a COMPACT FLASH which acts like many big hard drives.More hardware is needed to to run CPM.Agreed. CP/M is something to think about once you have a basic setup working. You need a disk drive (preferably two drives) and controller, some way to make disk images etc. Not a simple project!
I would think baby steps that you can verify would be much easier.
For this version using the ATMEGA32A you have two I2C Flash chips as drives.
https://cdn.hackaday.io/files/19000812896000/A110417.pdf (https://cdn.hackaday.io/files/19000812896000/A110417.pdf)
So NO you do not need Disk Drives and Controller and all that big pile of problems. Both do better then poor floppy drives. The only real need for floppy drives is if you have floppy disks with data or programs as only source.
These days you get programs, data & disk images from INTERNET with a PC.I would start by programming a ROM with a very simple machine code program and replacing the 'nop' generator with it. Run the CPU at 1Hz and verify that the bus lines are doing what you expect. Then add the serial chip and get that to do some simple stuff (eg. send characters to the PC). Finally, add the working serial code to Grant Searle's Nascom BASIC ROM, and you have a complete computer which can run programs written in BASIC etc.As stated No ROM needed to start Z80 and no mess getting a working serial interface. The ATMEGA32A is IO, what looks like serial ports and hard drives to the Z80.
If You looked at hackaday you would have seen Basic also.
The ATMEGA32A supplies Z80 clock so should be able to slow z80 clock at any time.
I made a simple Z80 SBC with a 16550 serial chip and 32k ROM and RAM, running Grant Searle's BASIC. I was going to add a 37C665 floppy drive controller but I am now thinking of using a CH376 USB module - just have to port the code over from my other project. The CH376 is very easy to interface and dramatically increases functionality.
So what I am reading here is that the Z80-MBC (Mobile Breadboard Computer) {what I linked to} is more functional then what you have now. It is easer to wire and cheap. To get close to what this is you have to do a lot of Z80 programming and add hardware.The remaining of quote to me is saying you are going to do what you have had problems doing in the past and only then if all works out have a working system, did I miss something here?
mostly lack of programming skills... :-[
I agree, but around 1 month ago I fried my only z80 so I must work and learn solely on the NSC800 until the Z80 I ordered from ebay get to saudi...
Just quick look at the schematic I linked to looks like very little change is needed to switch from a Z80 to NSC800. A ALE latch with tri-state output could be all change needed.
When you have a working computer things get easer.
Can I use a PIC16f77 or an ATmaga328P instead of ATmega32a?The big reason for the ATmega32a is the large number of digital io pins, it is a 40 pin dip.
I understood ur point...Can I use a PIC16f77 or an ATmaga328P instead of ATmega32a?The big reason for the ATmega32a is the large number of digital io pins, it is a 40 pin dip.
PIC16f77 would require you to create a program. You would have to translate and adapt to pic. Think this is a fail.
ATmaga328P This chip would be easer on software side, but you do not have enough digital IO pins. This puts you in to modifying software and adding hardware to work around the lack of digital IO pins. This is harder due to most are used as outputs & inputs.
The nice thing about ATmega32a is that what most of what you have learned with Arduino IDE & ATmaga328P & can be used.
After you get Arduino boot loader programed into ATmega32a, you might think of this as an Arduino with more digital IO
PIC16f77 would require you to create a program. You would have to translate and adapt to pic. Think this is a fail...I see where you are coming from, and I agree that if ali6x944 has to port or modify the code for a different MCU then it will probably be a fail. The only way it is easier than just burning a ROM is if he can follow an existing design exactly.
The nice thing about ATmega32a is that what most of what you have learned with Arduino IDE & ATmaga328P & can be used.
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 suggestSorry, 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...
I agree with most of what you are saying Bruce, but have these differences.Quote from: CPIC16f77 would require you to create a program. You would have to translate and adapt to pic. Think this is a fail...I see where you are coming from, and I agree that if ali6x944 has to port or modify the code for a different MCU then it will probably be a fail. The only way it is easier than just burning a ROM is if he can follow an existing design exactly.
The nice thing about ATmega32a is that what most of what you have learned with Arduino IDE & ATmaga328P & can be used.
As for which way to go, it depends on what he wants to get out of the project.
No, it's not a clever idea, it might be a "smart idea" but for me the whole-presentation is a stupid idea that can only be motivated by the "cost", which I find it ridiculous since we all trash hundred dollars in electronic-crap (like arduino's shitty clones and those useless toys sold on ebay, including fake-chips sold for less than one USD), so why on the why we should promote the last "four dollars" of garbage from China?Where is China in this?
Where is China in this?
Where is China in this?
The author promotes $4 (four dollars project, which is also in the title) devices bought from China at ridiculous price. It's also written in the BOM.
So the basics is that it is too much to pay <$5 for parts that will/could save time getting Z80 running.
Back in the day, if you wanted to make a new microprocessor system, you used a microprocessor development system if you had the money.I bought my first microprocessor 'development system' (HUG1802, similar to the COSMAC ELF) in 1980. It cost NZ$300 for the kit - a lot of money for a trainee technician whose annual salary was only $3700! I used this to learn about microcontrollers, machine code programming etc. I then made it into a programmer for 2708 EPROMs, and built a computer of my own design using an MC6800 CPU and MC6847 VDG. I developed the circuit and wrote all the code from scratch, using only the datasheets as a guide. IMO there is no better way to truly understand how computer systems work.
ali6x944 built a CPU clock circuit based on a 555 timer. Great chip to really study and simple. How useful is it here in long run?Yes the 555 is a great chip - I often use one when I need to quickly whip up a clock source on a breadboard.
What is gained & lost if you replace the CPU clock circuit with a timer output of an Arduino.
the idea of using AVR8 is smart but not clever (especially in the educational's context) for a simple reason: it's slower than the CPU (especially if programmed with Arduino in mind), which requires people to strictly understand timing between the Z80's bus and AVR8's. Not so simple to understand, especially for beginners.I agree. It could be a good advanced project for someone who already understands the basics.
I bought my first microprocessor 'development system' (HUG1802, similar to the COSMAC ELF) in 1980. It cost NZ$300 for the kit - a lot of money for a trainee technician whose annual salary was only $3700! I used this to learn about microcontrollers, machine code programming etc.
Could be that you are looking at it the wrong way.Quote from: legacythe idea of using AVR8 is smart but not clever (especially in the educational's context) for a simple reason: it's slower than the CPU (especially if programmed with Arduino in mind), which requires people to strictly understand timing between the Z80's bus and AVR8's. Not so simple to understand, especially for beginners.I agree. It could be a good advanced project for someone who already understands the basics.
Here it is even easer, You are user not a developer, you are just connect wires and use.That's the issue. Do you want to be a developer, or just an ignorant user?
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.As a user I would hope that understanding the timing is not required - it should just work. But if it doesn't work then I need to figure out how it works so I can debug it. I would rather debug something I designed myself, because then I already know how it is supposed to work.
So the only critical spot in timing is getting WAIT asserted fast enough.
.Here it is even easer, You are user not a developer, you are just connect wires and use.That's the issue. Do you want to be a developer, or just an ignorant user?
First thing to note is that this is for Z80 only, so a total non-starter for the NSC800.True but no eeprom programmer needed so what is saved can buy a Z80
Circuit looks about as complex as a standard Z80/decoder/ROM/RAM/SIO setup.I would guess most will find it easer to wire. This is very true if you think ahead and put AVR on one bread board and then have jumpers to Z80 chip.
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.
Why should a beginner need to buy a eeprom programmer these days. He listed $50 for real & $25 for clone. Yes it nice to have, but these days how often do you have to use it.
Here I paid 60 euro for a second hand UV-eraser, whose lamp was planned to be used for medical purposes (so yes, it's an hack), and 290 euro for a brand-new professional rom-programmer. Of course I got a super discount, DataMan happens to be much more expensive, and 290 euro is a lot of money, but if you attend public rooms or buildings where gambling games are played., well ... it happens that slot-machines still use UV-prom, so it was a good idea as working-student and it helped to pay my university taxes, and even nine years later since then my prom-programmer is still useful since it also supports serial flash chips.
It also does not mean you have to create a project so that you have to have a programmer when there are other choices.
why force a beginner just starting out to have to buy a programmer when you know there are other choices?
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.
I would say it's you that is being a ridiculous: man.It also does not mean you have to create a project so that you have to have a programmer when there are other choices.
Here you are going a bit ridiculous: man, if you want to deal with old technology, you have to deal with old technology, otherwise get a modern AVR8 chip, load arduino on it, and be happy.
And here we have an Atmega32Awhy force a beginner just starting out to have to buy a programmer when you know there are other choices?
I am not forcing no-one to do anything, and speaking about old-technology MPU, there are a lot of other choices, e.g. HC11 doesn't requires a prom programmer since the chip comes with a serial bootstrap mode which can be used to program external NV-RAM. You might use a simple HC11 board to program a NVRAM (static ram with a battery) to be used on Z80.
I would say it's you that is being a ridiculous: man.
If you do not like the Z80 that is fine.
When I read that, You are saying you have built all the test equipment that you use! If true then great, but double standards are bad.The very first piece of test equipment I had was a multimeter made from a 500uA movement and a bunch of resistors. In 1978 I built a multi-function meter with DC Volts, kHz, milliseconds, nF and uF ranges (shown below) all to my own design. This meter is still in use today. I also built 3 oscilloscopes from scratch (the first one used a 1 inch radar tube and fitted into a briefcase along with the meter and other tools). No double standards here!
True but no eeprom programmer needed so what is saved can buy a Z80This thread is about building an NSC800 computer. ali6x944 could just make an exact duplicate of the Hackaday Z80/ATmega32 project instead, but what would be the fun in that?
And the NSC800 can be a small step in the future after learning the basics.
Break a big project down in to small simple steps that you can test. After a time you have that big project.I agree. That is why I recommended getting an EEPROM programmer. He already has the NSC800 working, next step is to replace the nop generator with a ROM. Then he can burn simple programs into the ROM and verify its operation, add a RAM chip, then an SIO chip - gradually building up a complete computer.
Here one step is Wiring, it has to be perfectAgreed. 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!
hi again,
sorry for not replying for a while now, I was improving the NSC800 testing circuit and I added the following:
1x 74LS374 for de-multiplexing the lower 8-bits of the address bus
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... :(
that A0-A7 is load on the edge of the ALE signal in 74LS374.ohh! I got ur point!!
the 74LS374 is edge triggered clock while what I really needed was state triggering clock of the 74LS373...
so even the 74ls273 would not work... :(
Not quite correct here.
You could have a chip that triggered on a falling clock trigger.
What would be the difference between a falling clock trigger and the 74LS373?
conversely the A0-A7 it is loaded when the ALE signal goes high meaning not on the transition in 74LS374.
that A0-A7 is load on the edge of the ALE signal in 74LS374.ohh! I got ur point!!
the 74LS374 is edge triggered clock while what I really needed was state triggering clock of the 74LS373...
so even the 74ls273 would not work... :(
Not quite correct here.
You could have a chip that triggered on a falling clock trigger.
What would be the difference between a falling clock trigger and the 74LS373?
mmmmm.....
If you use a 74LS374
Input is captured on positive edge, output sees no more changes. If input is still changeing then output is wrong.
If you use a 74LS373
Input starts showing on output when level is high and follows all changes to input. Changes stop when low.
The #3
You do not see input on output until you have the negative edge.
At high speed with NSC800 a 74LS374 can give an invalid A0-A7 address.
The 74LS373 will pass the changing address to down stream devices giving a little more time to these devices if address is stable. Change stops on ALE going low which is when NSC800 says A0-A7 should be stable.
The #3 would work fine also, but you would not have the extra time that A0-A7 might be stable for down stream devices.
Now think how a simple change like a 74LS373 being replaced by a 74LS374 messes with you.
Could be a very hard to find problem. Might not happen but once in a 1000 address requests.
An inverter connected to clock input 74ls374 does change the edge.At 4MHz the minimum hold time from ALE low to AD7-0 tristate is 30ns. The 74LS04 adds 15ns delay maximum (typically 10ns), so it should be OK even at maximum CPU clock speed.
You have a slow #3
What else happens when you do just this much?
Everything takes time. The inverter delays the change 74ls374 clock signal.
You are now capturing A0-A7 at a later time. Is A0-A7 still valid at this time?
You have also reduced the time A0-A7 is valid down stream from 74ls374.
At some point as clock speed increases the extra delay breaks the logic.
For something looking for Z80 type then OE needs to set output to tri-state during DMA and RESET. Z80 DMA needs all 16 address lines. Z80 chips like SIO will not work to full function.Some Z80 based computers had even more restrictions. For example the Mattel Aquarius (which I am currently working with) does not allow interrupts! And yet its 'Quick Disk' drive used a Z80 SIO.
An inverter connected to clock input 74ls374 does change the edge.At 4MHz the minimum hold time from ALE low to AD7-0 tristate is 30ns. The 74LS04 adds 15ns delay maximum (typically 10ns), so it should be OK even at maximum CPU clock speed.
You have a slow #3
What else happens when you do just this much?
Everything takes time. The inverter delays the change 74ls374 clock signal.
You are now capturing A0-A7 at a later time. Is A0-A7 still valid at this time?
You have also reduced the time A0-A7 is valid down stream from 74ls374.
At some point as clock speed increases the extra delay breaks the logic.
Obviously a 373 would be better, but it's not essential.QuoteFor something looking for Z80 type then OE needs to set output to tri-state during DMA and RESET. Z80 DMA needs all 16 address lines. Z80 chips like SIO will not work to full function.Some Z80 based computers had even more restrictions. For example the Mattel Aquarius (which I am currently working with) does not allow interrupts! And yet its 'Quick Disk' drive used a Z80 SIO.
but wait! this means that I can run this chip if the CPU's clock out/system clock is 4MHz...
For slow speed the 74ls374 with inverter should work.
Replace with a 74ls373 as soon as you can get one.
There are other logic families that you could use in place of LS
You said you have a 74ls273
You could replace grant's logic on his CP/M version that insures that ROM is in memory on cold boot with this chip.
The extra 7 could be used in the future change memory map or other functions.
in my test setup is 2MHz, so if I use 74ls04 it will definitely work :-+I don't think the clock frquency makes any difference, but the CPU's rated speed does (4MHz CPU has shorter hold time than 1MHz CPU). In practice bus capacitance will hold the data for a while in tri-state anyway (longer if all chips on the bus are CMOS/NMOS rather than bipolar TTL).
but wait! this means that I can run this chip if the CPU's clock out/system clock is 4MHz...Yes it should work.
system clock in my test setup is 2MHz, so if I use 74ls04 it will definitely work :-+
yup. Excellent! Sooner or later I will design a GB cart with EagleCAD, allowing people to have an alternative to the hack I presented here (https://hackaday.io/project/25808-gameboy-nvram-cartridge). Your EPROM programmer is excellent for this job too since it can program FLASH as well as NVRAM and UV-PROM :DMm.... Interesting...
For UV-PROM, I got a marvelous UV-tube from recycling equipment from an hospital's division. It was used to make a surgical knife free from bacteria and/or other living microorganisms, but it's enough OK to be uses as UV-PROM eraser, it just takes more times, something like 25 minutes of exposition instead of 10, but it didn't costed an eye of my head. I just had to build a metal box to put the UV-tube inside :D
sorry C I was not able to run arduino bootloader on atmega32a, but I will try my best to get it up and running.
true, I will change it in the future...
In some of your videos you use a pointer that conducts electricity, Not a great idea!
In your NSC800 video
You talk about many chips replacing one 373.
Most times it is a bad idea to replace the simple with more complex.
So compare the two, Your many chips vs 373.
With the 373, you have a changing of outputs when ALE goes high. ALE going low holds the now un-changing outputs while letting inputs change with no effect.
How many times does your version upset this smooth change of signals?
Does it have times when output goes unknown?
Does it have glitches in the output?
If you are using CPU clock in the circuit, how does a CPU clock frequency change effect the circuit?
Does it _____
this is the current design before modification:
https://drive.google.com/file/d/0B5vW-k7HbsL4OXg5QnBfeU5lX2s/view?usp=sharing
this is the design after modification:
https://drive.google.com/file/d/0B5vW-k7HbsL4d2ZNazluaVlQb1U/view?usp=sharing
this the design using 74ls541:
https://drive.google.com/file/d/0B5vW-k7HbsL4Ukd1QW4xaWxjb2s/view?usp=sharing
I think it will be fine at steady state, but I have my concerns on the transitions, I'm still not sure yet...
at steady state, the circuit will behave as expected and will not create unknown states.
I think it will be fine at steady state,I don't think it will be fine because the maximum allowable clock out period is 6.7us. You can't stop the clock, it has to keep going to preserve the CPU state.
this is the current design before modification:
https://drive.google.com/file/d/0B5vW-k7HbsL4OXg5QnBfeU5lX2s/view?usp=sharing
this is the design after modification:
https://drive.google.com/file/d/0B5vW-k7HbsL4d2ZNazluaVlQb1U/view?usp=sharing
Both have errors
From what I see in these two circuits, I would think you do not understand how the 374 works.
Re-read the datasheet of the LS374
Then look at NSC800 datasheet
Figures 9a,9b,10a,10b
What is on the 374 outputs? Is it always the low address?
One problem has a simple fix in this simple circuit. Connect LS374 pin 1 to logic low.
This leaves one more problem in above.
1)when the ALE is Low:OK
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:+25ns LS374 off
3)when the ALE is High:OK
4) when the ALE transitions from high to low:+15ns LS374 captures current low address
+15ns LS374 captures current low addressThere 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.
+25ns LS374 ON
+43ns LS374 Output changes (15ns+28ns)
+53ns LS541 OFF (15ns + 38ns)
You have both outputs on for 28ns between the two chips
In addition to this you have old low address changing to current address at 43ns.
You will have one or more bits of low address with different levels.
You are guaranteed a logic level fight for 18ns
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 needsThis 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.
ali6x944: if you are serious about doing this then you should look at getting an oscilloscope or logic analyzer. It's the only way to see what is actual happening in your circuits. A lowly 5MHz dual trace analog scope should be sufficient.I do have a rigol DS1000Z series scope, but I have big problems with it lately with the second channel vertical ranges, I contacted rigol tech support but no proper reply adressing the issue since I first contacted them in July 5,2017... :-BROKE
I do have a rigol DS1000Z series scope, but I have big problems with it lately with the second channel vertical ranges, I contacted rigol tech support but no proper reply adressing the issue since I first contacted them in July 5,2017... :-BROKEYou can get by with 1 channel, but 2 channels are better for doing comparative timing measurements. What exactly is wrong with the second channel?
The vast majority of CMOS CPUs are TTL compatible, but the NSC800 is not...well, that bad I guess.... and its pretty weird...
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 TTLTTL compatibility was achieved by using pull-up resistors.
Bruce says "It's OK SEE CMOS level " but that does not mean your MB8464A is CMOS logic, need to test yours if you want to use as CMOS Levels..Never hurts to test. However the vast majority of CMOS memory chips do output full 0-5V logic levels, even if the datasheets don't admit it.
TTL compatibility was achieved by using pull-up resistorsThat's great, but how dose pull-ups effect the VIL and VIH of the processor?
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...True, but this may not apply to a small system which doesn't operate at 'high' speeds or have 'longer' buses.
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.
Zilog only guaranteed that it would drive 2 LSTTL loads,Z80 VOL <=0.4V @ 1.8mA, VOH >= 2.4V @ 250uA. LSTTL unit load is 400uA low and 20uA high, so it should be able to drive at least 4 LSTTL loads.
and the question repeats its self, how dose the pull-ups effect the VIH and VIL of the nsc800n?Pullups don't affect input thresholds. However they do raise VOL on outputs, increase power supply current, and of course make the build more complex. Use them when necessary, avoid them if you can.
thanks m8 :-+Zilog only guaranteed that it would drive 2 LSTTL loads,Z80 VOL <=0.4V @ 1.8mA, VOH >= 2.4V @ 250uA. LSTTL unit load is 400uA low and 20uA high, so it should be able to drive at least 4 LSTTL loads.
The NSC800 is rated for <=0.4V at 2mA and >=2.4V at 1mA, so it should be able to drive at least 5 LSTTL loads.
However I would avoid LSTTL if possible, for versatility and to save power. A 74LS373 alone draws 30-40mA. My entire SBC with CMOS Z80, ROM, RAM and SIO draws less than 20mA. This might not seem like a big deal, but the more TTL (and NMOS) you use the higher the current draw. HCT logic gives you CMOS and TTL compatibility with low power consumption, and is more readily available.Quote from: ali6x944and the question repeats its self, how dose the pull-ups effect the VIH and VIL of the nsc800n?Pullups don't affect input thresholds. However they do raise VOL on outputs, increase power supply current, and of course make the build more complex. Use them when necessary, avoid them if you can.
For the Z80s all 3 I bought from ebay doesn't work |OI 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.
this is the seller beware:
http://www.ebay.com/usr/adeleparts2010?_trksid=p2057872.m2749.l2754 (http://www.ebay.com/usr/adeleparts2010?_trksid=p2057872.m2749.l2754)
now I'm trying to figure out a way to test the MC68B50P, If any one knows post please :-+To check that a chip is not a 'fake', I start by measuring between pins with a multimeter on 'diode test'. NC (no connect) pins should be open circuit. I/O pins usually have ESD protection diodes that conduct when GND (Vss) is positive and the I/O pin is negative. Between Vss and Vcc you should see a lower diode voltage due to the larger parasitic substrate diode.
On the 6850 Vss is pin 1 and Vcc is pin 12. A 'fake' chip is more likely to have Vss on pin 12 and Vcc on pin 24. So start by doing a Diode Test on pin 1 (+) to pin 12 (-) and on pin 12 (+) to 24 (-). If 1-12 has a lower diode voltage than 12-24 then the power pins are probably correct. Now put the chip in a breadboard and apply power through a current-limited supply. Compare current draw to the specifications. The 6850 datasheet doesn't specify current draw directly, but power dissipation is stated to be 300mW typical 525W max, which corresponds to 60-105mA at 5V.for the Z80s the seller gave me a refund so that is good...
Assuming it draws close to the expected current you can then put signals on input pins and see what happens. Use pull up and pull down resistors to deselect the chip (ie. CS0/1 low, CS2 high). The data bus and other inputs should then be high impedance, while output pins will be stuck high or low. I test pin status by touching the pin with my finger (to inject AC mains noise) while monitoring the voltage with a scope probe. High impedance input pins will rectify the AC waveform as it goes below ground, while output pins will stay high or low.The first chip I tested did the things you described, the second chip how ever is playing on me, the RX data is high and the data bus is high, TX and RX CLK is high,and a couple more weird things, but it dose rectify the AC noise.
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 thingsThat 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.
so far I know that the NSC800 can address 64K bytes of memory, regardless of the type, so what I understand is that I have a 64k byte margin to fit the ROM and RAM stuff in...right? :-//Yes.
alternatively I thought of using only 32K ; because it would make it easier to make.32K should be plenty, unless you are running CP/M in which case you need RAM at 0x0000-7FFF. So put your 32K RAM at 0x8000-FFFF, then you only need to decode A15 (low = ROM, high = RAM). If later you decide to run CP/M you can add another 32K RAM, switched in over the ROM to give a total of 64K.
How can I have 64K of RAM and have ROM? Or how can I switch from RAM to ROM if the max address is the same? Also is microsoft BASIC an OS or a system language?Quotealternatively I thought of using only 32K ; because it would make it easier to make.32K should be plenty, unless you are running CP/M in which case you need RAM at 0x0000-7FFF. So put your 32K RAM at 0x8000-FFFF, then you only need to decode A15 (low = ROM, high = RAM). If later you decide to run CP/M you can add another 32K RAM, switched in over the ROM to give a total of 64K.
How can I have 64K of RAM and have ROM? Or how can I switch from RAM to ROM if the max address is the same?You can have ROM and RAM at the same address if only one of them has its outputs enabled at a time. To switch between them you can have a latch (accessed at an I/O location) which steers decoded /RD to either ROM /OE or RAM /OE. RAM /CE can be activated for both reading and writing, so writing to 'ROM' causes data to be stored in RAM even when the ROM is selected for reading.
Also is microsoft BASIC an OS or a system language?It can be both. The versions designed for ROM based computers have the OS built in. Since BASIC is interpreted it can also act as a user interface, with 'direct' commands that are typed in by the user. The original IBM PC had BASIC in ROM. If you didn't have a boot disk (or a disk drive, which was optional!) it would boot into BASIC.
I'll use a GDC which is the uPD7220, do I make it share RAM with the CPU or have its own separate RAM?The uPD7220 has its own separate RAM. The host CPU interface has only 2 memory locations, which are usually mapped into I/O space. It can also access the host memory via DMA, but this is also memory <-> I/O.
A) in Opcode Fetch: S0 & S1 & /M & /WR are active, so the ROM is selected, and read from.Unfortunately that won't work because many instructions have immediate data after the opcode, which would be read from the wrong memory.
B) in Memory Read: S1 & /M &/WR/RD are active, so the RAM is selected, and read from.
C) in Memory Write: S0 & /M &This will work. You are effectively writing 'under' the ROM into RAM. The ROM could even still be selected, but won't interfere because it only responds to reads (S0 & /M & /RD -> /OE)./RD/WR are active, so the RAM is selected, and written to.
I'm not sure how to create the logic for the switchingYou 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.
and what are the downsides to the full 64K RAM-ROM switching method...Switching between ROM and RAM can be tricky because you can't switch the ROM out while you are in it unless the underlying RAM has valid instructions. One way to deal with this is to simply copy the code from ROM to RAM before switching. Another way is to put a small routine in 'common' ROM or RAM which has the switching code in it. With this method you can have an almost unlimited number of ROMs or RAM banks in the same space.
But what is interrupt mode 2? Is there way to fix the problem?Either don't use peripherals that need IM2, or stick with the NSC800.
Also don't worry about the cpu's RAM its all SRAM.This is not so much of a problem now as it was when the NSC800 was developed. Back then static RAM was very expensive. I was paying $24 each for HM6116's, which would be over $300 for 32k. Still, even at that price it was worth it for the simpler circuit and battery backup capability.
why did the older cpus like the intel 8080 and older ram used so many supply voltages?The higher voltage was needed to power the transistors used in them. Some very early digital chips used depletion mode PMOSFETs that ran on 12~17V (eg. National Semiconductor's SC/MP (https://en.wikipedia.org/wiki/National_Semiconductor_SC/MP)). Early dynamic RAMs also needed a negative bias voltage. Later DRAMs generated the negative bias voltage internally.
note that the eeprom is new thus all positions are 0xFF in the eeprom and suspect this is the responsible...0xFF is RST 38, the external interrupt vector. With the ROM filled with this value it will continuously jump to 0x0038 while (attempting to) push the PC onto the stack.
I have flashed the ROM to all 0x00 but the LEDs are still on...Can you upload a photo of your current setup? A schematic too if you can draw one.
9.4 POWER-SAVE FEATURE
The NSC800 provides a unique power-save mode by the
means of the PS pin. PS input is sampled at the last t state
of the last M cycle of an instruction. After recognizing an
active (low) level on PS, The NSC800 stops its internal
clocks, thereby reducing its power dissipation to one half of
operating power, yet maintaining all register values and in-
ternal control status. The NSC800 keeps its oscillator run-
ning, and makes the CLK signal available to the system.
When in power-save the ALE strobe will be stopped high
and the address lines [AD(0–7), A(8–15)] will indicate the
next machine address. When PS returns high, the opcode
fetch (or M1 cycle) of the CPU begins in a normal manner.
I must say it is a pretty smart trick, but using the /ps control at 4MHz clock is pretty difficult in the sense that how can I step single instructions if some has different numbers t states and M cycles ?That would be fairly simple - like two 74xx series chips and two switches. First you need to decode the Opcode Fetch state. See the first row of the table on page 9 of the datasheet. A 74xx138 3 to 8 line decoder could do the job, generating a low going /M1 pulse during Opcode Fetch. Connect that /M1 pulse to the /CLR pin of 1/2 74xx74 dual D type flipflop, with its Q output connected to NCS800 PS pin. Connect a Step/Run switch and a pullup to the flipflop's /PRE input to force Q high for Run mode. Use the other half of the flipflop as a debouncer - pullups and a SPDT pushbutton grounding /PRE when pressed and /CLR when released, unused inputs tied low - output from Q to CLK of first half to clock in a '1' from the first half D pin which needs to be tied high.
Sorry , but I didn't understand your circuit layout and theory of operation... :-[I must say it is a pretty smart trick, but using the /ps control at 4MHz clock is pretty difficult in the sense that how can I step single instructions if some has different numbers t states and M cycles ?That would be fairly simple - like two 74xx series chips and two switches. First you need to decode the Opcode Fetch state. See the first row of the table on page 9 of the datasheet. A 74xx138 3 to 8 line decoder could do the job, generating a low going /M1 pulse during Opcode Fetch. Connect that /M1 pulse to the /CLR pin of 1/2 74xx74 dual D type flipflop, with its Q output connected to NCS800 PS pin. Connect a Step/Run switch and a pullup to the flipflop's /PRE input to force Q high for Run mode. Use the other half of the flipflop as a debouncer - pullups and a SPDT pushbutton grounding /PRE when pressed and /CLR when released, unused inputs tied low - output from Q to CLK of first half to clock in a '1' from the first half D pin which needs to be tied high.
Result: It runs with the toggle switch at Run, and single steps on a button push when its at Step. You could also hook up the output of a 555 timer to effectively press the step button (use the Discharge pin and wire it to /PRE) to apply a slowish variable auto-step pulse to let you 'slow run' it.
It does however have a flaw - Z80 instructions that take a prefix (i.e. the modifiers to operate on IX and IY rather than HL) and bit instructions etc. have two M1 cycles, so you have to press the button an extra time for every prefix. Decoding the prefixes to detect multi-M1 instructions is more trouble than its worth without a GAL or FPGA.
You've got plenty of space on your breadboards and should be able to hook it up in half an hour or so.