Author Topic: Heathkit ET-3400 FPGA clone  (Read 2568 times)

0 Members and 1 Guest are viewing this topic.

Offline james_sTopic starter

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Heathkit ET-3400 FPGA clone
« on: July 19, 2018, 04:31:29 am »
I've been playing with another FPGA project recently, this time recreating the Heathkit ET-3400, a popular 6800 microprocessor trainer from the 1970s. I've posted releases for the Terasic DE2 board and the cheap little EP2C5T144C8T "mini board" dev boards you can get from ebay, aliexpress and other Chinese sellers for under $15. Those boards lack a display so I added support for a couple of popular serial interfaced 7-segment LED displays and it should be straightforward to make nearly any display work. I also included a PS/2 keyboard interface which is in parallel with the row and column lines to which you can connect a 3x6 matrix of keyswitches like the original.

There are a couple of rough edges, for one thing the CPU68 core is not cycle accurate and runs quite a bit faster than a real 6800 CPU. There is also an issue I've not yet succeeded in solving where unlit segments of the display sometimes glitch while it is updating, this may be another symptom of the CPU not being cycle accurate. Overall though I'm pretty happy with this, I have a real ET-3400 too and the experience of using the FPGA version is very similar. I have tried several of the example programs from the manual and they all work. I also created a simple addressable latch in the "breadboard" section of the top level file which allows LEDs on the dev board to be controlled by writing to that memory location. At some point I may add a recreation of the ETA-3400 memory/IO expansion as there is really not much to it, although I already have more capable FPGA retro platforms that run BASIC. I've released all the code as open source so anyone who wants to play with it is welcome to.

https://github.com/james10952001/Heathkit-ET-3400
 
The following users thanked this post: oPossum, bingo600, geraldfryjr

Offline geraldfryjr

  • Newbie
  • Posts: 6
  • Country: us
  • I am a self taught sound and electronics engineer
Re: Heathkit ET-3400 FPGA clone
« Reply #1 on: July 24, 2018, 08:39:43 am »
Hello there James, Jer here, and I just now finally joined this forum and it is.... My Very First Post !!

I have just starting to get in to the world of FPGA's this year and this project really intrigues me!!
This is just the sort of thing that I got me to decide too start using FPGA's in the First place.

Back in the 80's I was big into the all of the 8 bit CPU's of the era especially the Motorola chips and the VIC-20, later I got a Coco and added a hard drive to the system !!

I had in my head, and some on paper, laid down the basis of a fully discrete version of the 6809 cpu .

 I hated the PC based machines at the time due to them being so so slow and thought to myself imagine what it would be like to run OS9 on a version as such that is 30-50 times the current stock clock speed of the CoCo's.

Well as life has it, I ventured on to other things but never never forgot about my dream.

Back then making boards was a huge chore and cumbersome and that was what had set me back,  besides working 60 hours a week as a dishwasher and then onto being a Chef/Cook in the Country Clubs of Naples Fla.

I eventually did get Circuitmaker in the 90's to help me with the project but I also had a recording studio that took up all of my time down there as well.

I was also one of the few people that help too create the local collage in Naples and taught people how to use their computers with My Friend and Boss, Chef Dave, when we worked at Bears Paw C.C. in 1986.

Since then I am now pretty much retired and just play with my projects.

I am also very fluent at DIYAudio at building diy audio equipment and DIY ESL's (electrostatic loudspeaker's).
I am the First one ever to create a Desktop ESL that really perform's extremely well and it is an on going project that has yet to be finalized.
In fact it was that project that First got me in to MCU's 5 years ago in order to digitally control the preamp for it !!

Anyhow I will be following your project closely as it is right up my ally of what I would like to accomplish for myself even though what I want to do has already bean done.

So far I have an EPM240CPLD (MaxII) and a Cyclone II EPC5T144C6 to work with and soon to get a Cyclone IV 22k le board as well.
I also have two Spartan6 LX16's with SDRAM's to work with once I get the proper programmer for them.

I have a nice Hitachi V-425 scope that I have had for the last 30 years and got it new when I used to fix TV's in Naples.
I just picked up a Tektronix 2465a three weeks ago.
It works very nice so I am covered there.

I have never slacked off through the years hardwarewise and I have always kept up to date on the latest cutting edge technology ever since.
My interest in electronics started at the age of 3 as my Uncle is a licensed HAM Radio operator.

But in programming I miss the good ole' days of just using basic and assembly language and I am still learning C only when I have to use it.

When it comes to VHDL and Verilog, Well, I just discovered them and I am quite green when it come to those two, but I am learning and beginning to understand some of it.
Actually I understand it better than C !!
Or, Maybe it is just because I am mainly a hardware guy and I just really want learn to use it.

I just figured out to make Quartus 13.1 to run and verified that the programmer works this morning (yesterday) in an Ubuntu 18.04  based Linux Distro called "Ultimate Edition 5.9 server" that came straight from the developer himself, this server version had not been released yet when I got it a while ago, but has been super solid for me.
I do have everything working in windows if I need as a backup as well, But, I Despise It !!

I have gotten everything I have work with PIC's, ARM, Arduino, Circuitmaker2000 and more working in Linux now so that I don't have to keep switching back and forth, And Now FPGA's Too !!!
It was my last hurdle and I am Syked !!!

I think that this may be the perfect project for me to get started in to this field of programming and hardware, besides using the schematic editor.

Recently I have been following Grant Searle's pages and the 100mhz Z-80 FPGA projects as well.
Not to mention the Facebook CocCo FPGA pages too!

As for my project I did mange to get a 16 bit ALU (74181),16 bit PC and 7 or 8 8bit registers and multiplexers (enough to make a 6800 or 6502) to fit in the EPM240 before adding one more thing maxed it out!! He,he,he,he  :-DD
All done only with the schematic editor !!  :phew:

Thanks for Posting this project !!  :-+

Cheers !!  :clap:
 :popcorn:

jer :)
 

Offline james_sTopic starter

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Heathkit ET-3400 FPGA clone
« Reply #2 on: July 24, 2018, 11:59:05 pm »
Wow that's a hell of a first post.

If you've got Grant's Multicomp working then getting this going should be a piece of cake, it's the same hardware and I've used the same pins for the PS/2 keyboard. All you need to add is a display, the cheap MAX7219 8 digit things you can get for under $2 on ebay work great. I've included drivers for two different displays, just comment out the one you aren't using and un-comment the one you have. If you want, you can also bring out all the display signals and drive some 7-segment LEDs directly as done on the DE2 version since that board has 7 segment displays on it.
 

Offline geraldfryjr

  • Newbie
  • Posts: 6
  • Country: us
  • I am a self taught sound and electronics engineer
Re: Heathkit ET-3400 FPGA clone
« Reply #3 on: July 25, 2018, 03:27:03 am »
Ya, sorry about the long Intro !!  :=\

But I figured that I would give a little background about myself, even though I am a Noob at FPGA's, I am not at all one in this field of technology in order to skip over the very basics.

Nope, I don't have Grant's setup working yet, I had to stop for a minute due too a few other issues and the desire to do it all in Linux.

I have yet to install Python next, but no biggy.
It took me to find a few examples to understand what he was doing with Python (another language I know nothing about) since I had not ran the script yet.
I have used it to flip some GPIO's on an Rpi but that's about it.

I do have one or two of the MAX7219's here and I did get it to work I think on the Pi as well.
I love those things I'm gonna get some more of those for sure.
I do have plenty of LCD's and raw 7 segment displays as well.
I like the idea of bring out the signals to drive them as this will eliminate much of the delay it takes to feed the MAX7219's the data.

I will have to look up the DE2's schematics as I have no interfaces to work with at the moment, gotta build those yet.

There is an I/O board made just for my Spartan6 FPGA's and I will order one soon.

I had found a VT-100 project based on a z80 core and I got it to compile, but I thought that I had programmed the CycloneII with it but I couldn't find any video pluses coming out of it (My First chance to use my new scope!!  :-+ ).  :-BROKE

I was (still am) planning to use my Color Maximte (CGmaxII) from Geoffe's Projects at the Backshed forum to do the displaying via its 40 pin GPIO for these projects, but the PIC32 was improperly soldered (as bought a few years ago) and was erratic.

I though that I could just hit it with some quick heat but I ended up destroying about 4 or 5 traces.
I have done SMD work before but I didn't use my iron with the custom tip I made for such work, and now I am paying for it !!!  |O

So, I have to tack on a new VGA green wire and forget about the other lost GPIO pins.........
That is when every thing came to a Screeeeaching halt for a while !! :wtf:

jer :)
« Last Edit: July 25, 2018, 03:44:01 am by geraldfryjr »
 

Offline james_sTopic starter

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Heathkit ET-3400 FPGA clone
« Reply #4 on: July 25, 2018, 07:28:07 am »
I'm not sure what Python has to do with any of this, it's a useful language but not for FPGAs, Grant's Multicomp is pretty much a turnkey project, once you get Quartus II up and running you just paste in the options you want, compile it and load it on the FPGA board.

There's nothing really interesting about the schematic of the DE2, the display segments just each connect to IO pins on the FPGA. Since most of the pins can be used for anything you want, you just go to Assignments -> Pin Planner and assign he pins you want to use to the corresponding signals. The serial displays work just fine though, there's no delay to speak of, at least not in human time scales, as far as you'd ever be able to tell the updates occur instantaneously. Remember that the ET-3400 is a primitive computer system from the mid 70s that runs at a a brisk 500 kHz so if anything, that's going to be the bottleneck. There's no software overhead when driving these things from an FPGA, it's done with a hardware state machine that runs in parallel everything else. Don't worry about other FPGA boards right now either, even the little Cyclone II mini board is overkill for this and only like 35% filled.

I highly recommend getting something going before you try modifying it. Once you have Quartus installed it should take about 5 minutes to have the ET-3400 booting up. Just connect a display to the pins assigned in Pin Planner and then send the bitfile to the FPGA and you should get "CPU UP" on the display. At that point either connect a PS/2 keyboard as shown on Grant's Multicomp web page or wire up a 3x5 matrix of keyboard or tactile buttons and connect that to the row and column pins. Again Pin Planner is your friend here, you can use that to see what pins go to what, or shuffle them around as desired.

Oh and forget about the schematic entry tool, just pretend it doesn't even exist. It's a waste of time that is extremely tedious to use for all but the most trivial projects. It;s a nightmare to debug and maintain, and produces non-portable code that won't work on any other FPGA platforms. It's a crutch that will only hold you back. Take the time to learn VHDL or Verilog and you will never look back. What takes an hour to draw up in the schematic tool you can type some code in a few minutes that does the same thing. Also forget everything you know about programming because with FPGAs you're not writing a program, you're describing hardware using a language that superficially looks like a program, but it's not.
 

Offline geraldfryjr

  • Newbie
  • Posts: 6
  • Country: us
  • I am a self taught sound and electronics engineer
Re: Heathkit ET-3400 FPGA clone
« Reply #5 on: July 25, 2018, 05:37:47 pm »
Okay Cool, Most everything you have mentioned I have already done and been through, I just have to start going through some tutorials on VHDL and how to add the files in to a blank project now.
Most of my projects I am just looking to use certain CPU cores and I/O blocks by themselves without making a whole SOC configuration, the 6821 in one of them too.

I know about the pin planner, My point was to have the same hardware made so that I could just load other example projects using the DE2 and have it work right way without having to set any pins (providing that those configurations have been saved in the project) by just compiling and uploading to the FPGA.
Like I have done with the few projects I made on my CPLD.

I am not trying to get away from learning how to do it the right way from the very beginning, it just usually helps me to see what is going on with a project that is already working and then start modifying it in whatever way I choose once I see it working.
That is how I have been able to learn some C projects, by seeing it work first.

A lot of this has had to do with verifying that everything is setup correctly in Linux typically envolving the programming hardware.
Yes, In widows it works just fine, but I have already stated what I think about windows.  :-DD

When I started working with the STM32's (when they became the big fad 5-6 years ago) there was very little hobbyist support for them then and it was difficult to get some projects working due to the different versions of IDE's that were being used and getting the correct version of GCC as well as being determined to make it all work in Linux.

I had gotten a Free STM32F429I discovery board (3 of them actually) by taking an online course sponsored by STM and I only had a limited time to use IAR, and most of the noobs were using Coo Cox and making it work.
It was my Very First venture into that field and the 30 or 60 days that IAR allowed me to use the IDE was hardly enough to even get me going as I knew nothing about C at the time

I do understand how the parallel processing works as well and is not sequential like normal programming, that is what I really like about VHDL.
It is almost the way I think all the time and is why programming in general on Microcontrollers or any other cpu is just very boring to me because it is just a glorified sequencer really.

Just so that I do understand................
let's say I have the whole circuit written up in VHDL and I realized that I needed to add another function like adding an inverter or some other gate in there for whatever reason, I can just add that right at the bottom of my HUGE script and it will pick it up and add it to the circuit properly, (providing I have used the proper connection labeling) and it does not have to be anywhere near the section of the script to where the part was added too, right?

As an example of the Black box, who cares about what is in there as far as registers and such, The Only Thing That Matters Is, just as long as the input/output functions work as required that is all that is needed.

This is what I love about this type of programming with VHDL and Verilog!! :)

Yes, it can be very tedious using the schematic editor, but I am used to this as a tech, and reading them for years has gotten me over that.

Imagine back in the 90's when I used to draw the exact same project I did on the CPLD only on a 800x600 resolution or worse in Circuitmaker version 4, 6 and 2000, But I did it !!! He,he,he,he
Let alone trying to see the simulation work !!! He,he,he,he

It is sad that using the schematic editor doesn't produce portable code, but the good thing is that it forces me to want to learn VHDL!! ;)
Ya, I can go in and change my part using the schematic method, but the project is useless if I want to use a part form a different company like Xilinx or Lattice.

I took another look at Grant's page and your right I don't see the Python code I had mentioned.
I must have gotten that from another version of the project where a python script was used to help select the options and it would generate the code to add in the original format that Grant used, and then just paste that file into the project.
If I run across it again I will post the link for you to check it out if you like.

Sorry for taking up your thread on my learning issues, But this conversation has helped me Tremendously and I Truly Appreciate it !! :-+
I am now ready to continue on and get cracking on some VHDl and learn some more !!   :box:

:phew:

It is not often that I get to communicate with someone on my level of thinking and that is why I finally joined this forum, I have only known about it for a short time and I am very impressed at what I have seen by lurking around.  :-+
I have been on many other websites were just plain lame IMHO, or, have very little action going on at all.  :=\

I don't even get on DIYaudio anymore because in general the same subjects come up all of the time and I find myself just repeating everything that I had already explained previously in several other threads !!!!  |O

I Do, Do My Best at researching subjects before I go asking anyone any questions.
And as you can see, I do like to be very detailed in my posts, as I have been caught up with comments from others thinking that I am a complete noob and know nothing at all !!!
But, Your advice has helped me a lot as I Am New to the Wonderful World of FPGA's !!

I Thank You Very Much for Your Time on this  !!!  ;D

Cheers !!! :popcorn:

Jer :)

 

Offline geraldfryjr

  • Newbie
  • Posts: 6
  • Country: us
  • I am a self taught sound and electronics engineer
 

Offline james_sTopic starter

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Heathkit ET-3400 FPGA clone
« Reply #7 on: July 26, 2018, 01:28:02 am »
Well it's overkill for this project but it should certainly work. You'll just have to change the PLL and memory instances using the Megawizard manager, change the device type in the project settings and then enter all the pin assignments.
 

Offline geraldfryjr

  • Newbie
  • Posts: 6
  • Country: us
  • I am a self taught sound and electronics engineer
Re: Heathkit ET-3400 FPGA clone
« Reply #8 on: July 26, 2018, 02:37:08 am »
Okay , Thanks I will check it out. :)
I know it is big but I have been wanting to get this one for quite some time and I found the link in this forum.

The biggest models I could only find using a search was the E15 a,d E10 version at Aliexpress, but I knew it existed as I had seen it in the past but the link I had saved was broken.
I wanted something a bit bigger than the DE0-Nano that is used for the Mister and CoCo3 fpga projects.

Meanwhile I will start my learning on my EP2C5.
The nice thing is that the goodies are on a separate board from the FPGA board so that I can use it with my other ones too via jumper wires.
I already have the example programs for the Spartant6's so no need now to get that I/O board anymore, just need a programmer for them.

Learning to use the PLL's is one of the First things on my list of things to do next.
I have a few things I want to try with those.

jer :)
 

Offline james_sTopic starter

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Heathkit ET-3400 FPGA clone
« Reply #9 on: July 26, 2018, 03:57:11 am »
The PLLs are dead simple, for Altera just go to Tools -> Megawizard plugin manager, create new, and then for Cyclone II "altpll" is under IO, then you set the input and output frequencies then instantiate it in the top level file. If you look at any of the projects on my github page they all use a PLL. The Cyclone II PLL's are quite a bit more limited than those of the Cyclone IV but they all do roughly the same thing.

For Xilinx the process is very similar but they're called DCMs.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf