Hi John, love this series of the z80 and now this programmer. Also seeing that while I'm watching this today on March 14th and your attention to the Pi for your design, happy Pi day, hehe. Thanks for sharing -Tony
Thank you for all your positive comments on this series! -- I completely overlooked the fact that today is PI day. 😳... I should have planned something on that theme!! 🤔... Start the wheels turning for next year.
Thanks for kind words! I probably dwell a bit much on these tangents. But when I was starting out, they were THE things that caused all my problems... and NO ONE was explaining them. So, among other things, these are some sort of messages to my younger self. :-D
Note that 2N7000 transistors are susceptible and great at demonstrating ESD damage. The best way to demonstrate it is to drive an LED with 2N7000 and then expose it to ESD. The LED's brightness will dim with accumulated ESD events until the LED doesn't light up at all. The closed captions are funny - with "Weight States" (are we on a diet?) and "Boss acknowledgements.
Ugh... I'm gonna call this another reason to have a closer look at the SPI version of the MCP chips (since SPI only uses single-direction signals and therefore simpler shifting needs.) I guess RUclips has a way to go on cleaning up their speech-recog. :-D
Nice series so far. Since you have decided to use the Pi as a programming tool, why not go and add the components to the programming board to implement a serial port connection between the Pi and the Z80 board. You could implement an RS-232 to 3.3v interface on the programming board with appropriate header between the programmer board and the Z80 so that when both boards are connected together you have a complete development system and Flash programmer (via the Pi), and a terminal with HDMI output and USB keyboard input via the PI back into the Z80 board. The stacked boards would be a permanent system allowing code development on the Pi, and a terminal into the Z80 with modern peripherals.
This is an interesting thought. Seems easy enough to do by hacking the programmer board by adding a female header that sits down on the pins that I use to config the TX and RX lines on the retro hoard... Assuming that we add an rs232 driver to the flash board... since we'd need a level shifter anyway. Ill add it as an issue on the github page so i remember next Time I look to tweak the PCB.
Don’t feel bad, back in the 70’s one of my S-100 board had the following issue: “Very true, my Processor Technology 3P+S (3 parallel plus serial) card had a glaring error that took me months to figure out. One of the 232 converter chips was in the backwards. Not only was pin one on the board etched backwards, but the silk screen on the board was also backwards, and the manual was too. The parallel part worked great, but the serial port wouldn’t, until I found the error. ‘The Bleeding Edge’ was a very apt term in those days, but still fun to work though.” Think you made a goof, what do you think the guys at Processor Technology did, they did not have any way to fix their goof, other than by a new letter months later if you were lucky and that the end user ever got to see that.
This one was a bummer. 🙄 But easy enough to fix even if you need to cut a trace on the board. If you keep watching this series you'll see a more impressive "goof" in the first draft of the TMS9918 display card. 😁
If you put the correct sex 40 pin connector on the board, and tweaked the layout a bit, you could have the Rpi Zero plug into the board, and maybe even be powered off it (might need an extra cable to do that). OR power the board off of the Rpi. Could have the Pi mounting holes placed on the board so a pair of standoffs would hold them together. That would be cute. Also, if the Rpi USB can look like a 'slave', then it should be possible to do an ethernet over USB between the pi and the computer. Actually I KNOW that works because I saw a project where the Pi was used as a USB stick. And what does the symbol for KiCad say about pin 18? Input, Output, Passive, or what? Did you get any circuit errors detected by KiCad to hint that that pin was an input?
Wooooaaa!!! Good-eye! The part I used came from the Digikey library and it is marked as an OUTPUT!!!! They fell for the screwy image on the datasheet front page too! I'm not entirely following with the USB discussion. I originally intended to use a PiZero but decided the total cost after adding the required USB adapter cable & Ethernet dongle (since I use wired Ethernet on my bench) and USB hub (if you want to add a second SD card with another adapter when we get to formatting it for use on the Z80 Retro board) ends up driving the price up enough to warrant considering a regular PI... and since I have a few laying around...
A PI has... I think 26 viable GPIOs. So you might be able to get by. But you'd probably still need level shifters and one open collector driver. So, yes.. You'd need more than just wires. With the parts costing less than $15 (if you get them with the rest) I never considered trying to optimize it out.
@@sparkybrit Yeah, a Mega should be able to do the job. Of course then you'd need to write the Arduino version of the code I wrote for the PI and then write another app for the host machine (where you plan to do your Z80 development) to download the binary file to the Mega to do the programming. This is certainly all doable.
Hi John - loving the project and your presentation style is great too. I´ve built my Z80 Retro board and the programmer board too. I am trying to work through the Blinkyś but have hit an issue; When I run the Flash program Product ID returns all zeroś and I get an Invalid FLASH signature error in the terminal. I´ve swapped the the SST39SF020A for a spare but I still get the same error. Any suggestions on how to debug this issue? Output from terminal; sudo ./flash < ~/Z80-Retro/2063-Z80/tests/blinky1.bin Product ID: 0x00, 0x00 Invalid FLASH signature: 0x0000 != 0xbfb5
How many ICs are plugged into the board? I'd remove everything that is not needed. You could probably run the flash app with zero chips installed. You should get a signature of all ones. Zero in the retro that is... All chips in the programmer.
@@JohnsBasement Originally I had all the Ics plugged in. I tried removing just the main ICs and then I removed all of the ICs. In both cases I get the output from Flash bel;ow; sudo ./flash < ~/Z80-Retro/2063-Z80/tests/blinky1.bin Product ID: 0xff, 0xff Invalid FLASH signature: 0xffff != 0xbfb5
Good. (divide & conquer) To me this difference means that your programmer sees the pulled up bus when no chips are in and it sees something reacting when the chips are in. The programmer is probably OK. I gotta ask: are your soldering skills ok? How likely is it that you shorted anything? -- Can you send high res photos of your handy work? If the parts are installed right then it could be a bad chip. Due to the simple design, the memory should work without the cpu or other big chips. Start again with everything installed EXCEPT the cpu, ram, flash, ctc, sio and the 244 (the input port chip.). This should react the same way as nothing should be able to alter the data bus lines. Then plug in the flash & test again. It should work & respond properly. If not then your reset or flash select logic is bad. If it is OK then add the 244 and test again. Then add the sram. Then the cpu. Keep going until it fails. Then we know what to look at.
@@JohnsBasement John some progress; I followed your steps above. When I got to the point where I plugged in the Flash again it worked, I then plugged in the 244 again and it still worked, same for the SRAM too. But when I plugged in the CPU it failed again. I swapped out the CPU for a spare and it still failed. How should I send you some high res images of the board?
Search for my name along with northern illinois university. You'll find an email address on my faculty page. Meanwhile, check the pin 1 orientation on EVERY one of the SIP resistors. Especially the two between the programming header and the Z80. Those two are in mirror image orientation of each other!!! Having C9 in the right holes and RN1 in the right way is critical for this operation. Do you have an oscilloscope? Make sure the click is running on Z80 pin 6
Hi John, love this series of the z80 and now this programmer. Also seeing that while I'm watching this today on March 14th and your attention to the Pi for your design, happy Pi day, hehe. Thanks for sharing -Tony
Thank you for all your positive comments on this series! -- I completely overlooked the fact that today is PI day. 😳... I should have planned something on that theme!! 🤔... Start the wheels turning for next year.
@20:00 ~ish- To quote Gru "Light bulb!"
You rock at explaining this stuff.
Thanks for kind words!
I probably dwell a bit much on these tangents. But when I was starting out, they were THE things that caused all my problems... and NO ONE was explaining them. So, among other things, these are some sort of messages to my younger self. :-D
Very good walk through!
Thanks!
Note that 2N7000 transistors are susceptible and great at demonstrating ESD damage. The best way to demonstrate it is to drive an LED with 2N7000 and then expose it to ESD. The LED's brightness will dim with accumulated ESD events until the LED doesn't light up at all. The closed captions are funny - with "Weight States" (are we on a diet?) and "Boss acknowledgements.
Ugh... I'm gonna call this another reason to have a closer look at the SPI version of the MCP chips (since SPI only uses single-direction signals and therefore simpler shifting needs.)
I guess RUclips has a way to go on cleaning up their speech-recog. :-D
Nice series so far.
Since you have decided to use the Pi as a programming tool, why not go and add the components to the programming board to implement a serial port connection between the Pi and the Z80 board. You could implement an RS-232 to 3.3v interface on the programming board with appropriate header between the programmer board and the Z80 so that when both boards are connected together you have a complete development system and Flash programmer (via the Pi), and a terminal with HDMI output and USB keyboard input via the PI back into the Z80 board. The stacked boards would be a permanent system allowing code development on the Pi, and a terminal into the Z80 with modern peripherals.
This is an interesting thought. Seems easy enough to do by hacking the programmer board by adding a female header that sits down on the pins that I use to config the TX and RX lines on the retro hoard... Assuming that we add an rs232 driver to the flash board... since we'd need a level shifter anyway.
Ill add it as an issue on the github page so i remember next Time I look to tweak the PCB.
Don’t feel bad, back in the 70’s one of my S-100 board had the following issue:
“Very true, my Processor Technology 3P+S (3 parallel plus serial) card had a glaring error that took me months to figure out. One of the 232 converter chips was in the backwards. Not only was pin one on the board etched backwards, but the silk screen on the board was also backwards, and the manual was too. The parallel part worked great, but the serial port wouldn’t, until I found the error. ‘The Bleeding Edge’ was a very apt term in those days, but still fun to work though.”
Think you made a goof, what do you think the guys at Processor Technology did, they did not have any way to fix their goof, other than by a new letter months later if you were lucky and that the end user ever got to see that.
This one was a bummer. 🙄 But easy enough to fix even if you need to cut a trace on the board. If you keep watching this series you'll see a more impressive "goof" in the first draft of the TMS9918 display card. 😁
@@JohnsBasement just don't think that was the biggest goof I have seen over the years. LOL
Why don’t use the MCP23S17 / SPI?
I asked myself the same question... right after I got it all working! 😂
The simple fact that I had several 23017s around is why I used I2C.
It's OK.
@@JohnsBasement version 2.0?
Indeed!
@@JohnsBasement nice. can’t wait.
M1 is a refresh signal to ram 🙂
🤔 /RFSH is a refresh signal to the ram
@@JohnsBasement Are sorry my mistake :-) Love your work
If you put the correct sex 40 pin connector on the board, and tweaked the layout a bit, you could have the Rpi Zero plug into the board, and maybe even be powered off it (might need an extra cable to do that). OR power the board off of the Rpi. Could have the Pi mounting holes placed on the board so a pair of standoffs would hold them together. That would be cute. Also, if the Rpi USB can look like a 'slave', then it should be possible to do an ethernet over USB between the pi and the computer. Actually I KNOW that works because I saw a project where the Pi was used as a USB stick.
And what does the symbol for KiCad say about pin 18? Input, Output, Passive, or what? Did you get any circuit errors detected by KiCad to hint that that pin was an input?
Wooooaaa!!! Good-eye!
The part I used came from the Digikey library and it is marked as an OUTPUT!!!! They fell for the screwy image on the datasheet front page too!
I'm not entirely following with the USB discussion.
I originally intended to use a PiZero but decided the total cost after adding the required USB adapter cable & Ethernet dongle (since I use wired Ethernet on my bench) and USB hub (if you want to add a second SD card with another adapter when we get to formatting it for use on the Z80 Retro board) ends up driving the price up enough to warrant considering a regular PI... and since I have a few laying around...
Do you really need a programmer card? Doesn’t the Pi have enough GPIO pins to control the whole Z80 bus directly?
A PI has... I think 26 viable GPIOs. So you might be able to get by. But you'd probably still need level shifters and one open collector driver. So, yes.. You'd need more than just wires.
With the parts costing less than $15 (if you get them with the rest) I never considered trying to optimize it out.
@@JohnsBasement ah, you’re right. I forgot that the Pi’s 3v3. Perhaps a Arduino Mega could program the Flash directly then?
@@sparkybrit Yeah, a Mega should be able to do the job.
Of course then you'd need to write the Arduino version of the code I wrote for the PI and then write another app for the host machine (where you plan to do your Z80 development) to download the binary file to the Mega to do the programming. This is certainly all doable.
Hi John - loving the project and your presentation style is great too.
I´ve built my Z80 Retro board and the programmer board too. I am trying to work through the Blinkyś but have hit an issue;
When I run the Flash program Product ID returns all zeroś and I get an Invalid FLASH signature error in the terminal. I´ve swapped the the SST39SF020A for a spare but I still get the same error.
Any suggestions on how to debug this issue?
Output from terminal;
sudo ./flash < ~/Z80-Retro/2063-Z80/tests/blinky1.bin
Product ID: 0x00, 0x00
Invalid FLASH signature: 0x0000 != 0xbfb5
How many ICs are plugged into the board? I'd remove everything that is not needed.
You could probably run the flash app with zero chips installed. You should get a signature of all ones.
Zero in the retro that is... All chips in the programmer.
@@JohnsBasement
Originally I had all the Ics plugged in. I tried removing just the main ICs and then I removed all of the ICs. In both cases I get the output from Flash bel;ow;
sudo ./flash < ~/Z80-Retro/2063-Z80/tests/blinky1.bin
Product ID: 0xff, 0xff
Invalid FLASH signature: 0xffff != 0xbfb5
Good. (divide & conquer) To me this difference means that your programmer sees the pulled up bus when no chips are in and it sees something reacting when the chips are in. The programmer is probably OK.
I gotta ask: are your soldering skills ok? How likely is it that you shorted anything? -- Can you send high res photos of your handy work?
If the parts are installed right then it could be a bad chip.
Due to the simple design, the memory should work without the cpu or other big chips.
Start again with everything installed EXCEPT the cpu, ram, flash, ctc, sio and the 244 (the input port chip.). This should react the same way as nothing should be able to alter the data bus lines.
Then plug in the flash & test again. It should work & respond properly.
If not then your reset or flash select logic is bad.
If it is OK then add the 244 and test again.
Then add the sram.
Then the cpu.
Keep going until it fails. Then we know what to look at.
@@JohnsBasement
John some progress;
I followed your steps above. When I got to the point where I plugged in the Flash again it worked, I then plugged in the 244 again and it still worked, same for the SRAM too. But when I plugged in the CPU it failed again. I swapped out the CPU for a spare and it still failed.
How should I send you some high res images of the board?
Search for my name along with northern illinois university. You'll find an email address on my faculty page.
Meanwhile, check the pin 1 orientation on EVERY one of the SIP resistors. Especially the two between the programming header and the Z80. Those two are in mirror image orientation of each other!!! Having C9 in the right holes and RN1 in the right way is critical for this operation.
Do you have an oscilloscope? Make sure the click is running on Z80 pin 6