Table of Contents
Multicomp with larger FPGA
In June this year I got a link from a forum member regarding CycloneIV boards on AliExpress. I followed the link and was very surprised to find besides the “old” CycloneIV system a newer one with much larger FPGA (EP4CE15F22N8) (1) offered for a reasonable price (board size:8×6.4cm^2, round about half the size of my Multicomp !). That was the start for a new project: To rework my Multicomp. Six weeks later, the German customs send me a letter, claiming the unpaid tax (19%). Ok, the bought boards are in Germany… It took me 4 hours to drive to their office, pay the tax and get back to my home… Why 4 hours: It's a small customs office in a also small town. The physical drawback: 1 hour local customs time is 2 hours real-time, time is relative…
(1) It looks like that the QMTECH EP4CE15-SDRAM core board is running out of stock (2020.06.09: 500pcs. in stock again - all fine ). A possible replacement is the CycloneV 5CEFA2F23 SDRAM (sadly for more then twice the money). The pin assignment stays the same (only a quick check, no guaranty) but the I/O naming is different. I haven't migrated the VHDL code to the new core board yet, because at present I do not have one for testing the new IO-assignment.
As mentioned before, I re-used the schematic of the CycloneIV-June2015 design and added some things I want to have included:
- +5V keyboard supply at the Mini-DIN6 jack
- +5V mouse Mini-DIN6 jack (with mouse-controller in VHDL)
- Audio out jack (stereo) for 80's sound feeling (with two SN76489 + 2 Sigma-Delta-DAC's in VHDL)
- A PIO-Port with a 8255 for adapting external hardware (a 2nd one can be plugged in the pin-socket right-hand side to the 8255 on the photo)
- A better reachable connector for serial-c_TTL
- A better reachable Reset-Button (Sorry, I need that, I too often crash the system… )
- A I2C-Port for my Swiss-Pi board (I2C-Controller in VHDL)
- A GPIO-Port for connecting a peripheral board located on TOP or BOTTOM of the Multicomp board (that's the idea) Meanwhile I've a Joystick-board for 2 joysticks (thumb-Sticks), some switches, buttons, LED's and a 10-bit GPIO Port to plug onto to 40-pin GPIO header TOP-side. If the 2nd PIO is needed, its Pin-Socket should be swapped to the bottom side so the PIO-PCB is located below the Multicomp-PCB. That gives a nice 3-level sandwich construction… Your intension may differ - you are free to do so or not !
- Two +12V DC power jacks (for Input & output), so I can chain the power for Monitor and Multicomp to one power supply (my monitor needs +12V)
- A additional +5V OUTPUT- Jack to connect LOW -power experimental boards at the rear side of the board. The +5V regulator should have a heat sink for better cooling ! It's possible to use the +5V jack at the front side (as OUTPUT only) of the FPGA board.
- A MAX705 Reset/Power-Fail IC for the RESET-Button and for monitoring the +5V when power is switched ON/OFF ( I had some troubled with a destroyed SD-Card image, therefore the MAX705).
- REMARK: If the system is already switched ON and running don't connect a external board with large capacitors to the +5V jacks. The MAX705 may detect a Power-Fail situation when the voltage drops below +4.65V and will reset the system !
Board size is now 160x132mm^2. SRAM, the MAX3232 level-converter IC's for Serial-A & -B, +3V3-Converter LM2574 and MAX705 are covered by the FPGA Core-Board and can't be seen on the photo. WiFi is located at the lower left corner.. The PIO chip is the large IC on the right side of the PCB.
The system is compatible to this CPM Software collection (download MC-2G-1024.zip ) here in the forum - with one exception: The transceiver of serial-B got its own I/O-address. Probably that will affect MP/M-II and every software using serial-B. The baud-rate gen. keeps its I/O-address. I installed the system18.img on the SD-Card.
Purchasing the new Multicomp-PCB
The board was manufactured by Aisler-B.V. in Germany. The German web-site (in English) is here. Scroll down for more manufacturing locations. They offer a production of 3 pcs. per batch. If you need more then 3 PCB's stepping is: 3, 6, 9, … Of cause, you can choose a manufacturer of your own choice Use this link, if you intend to order a batch. Gerber -Files are included in the project-archive, but I uploaded the .kicad_pcb file to my Aisler Project-Folder. They can use this file directly - so I do not need them… That means in turn - I hope that all data is included, but I can't claim that.
Meanwhile the number increases to 3:
- NEW: I2C-Clock-EEProm-Adapter with DS3231 Clock-Module. You can order a PCB batch (3 pcs.) if you want here.
- OLD: Swiss-Pi Adapter PCB (I2 C) with EEProm and I2 C Clock (to install the clock module on the adapter PCB is very easy. You have to drill some 1mm holes and glue the module top down with double sided tape on the PCB and solder 4 wires to connect it to J1 (That's the way i've done it myself). I will upload some photos later on.
The new PCB layout is already prepared for the added clock module.I've dropped the layout, because there are too many different DS3231 PCB-Versions out there with different signal routing to the pin header. So, the 4…6 hand-drilled-hole-solution is the best. Links to Modules are here and here, for example. You can order a PCB batch (3 pcs.) if you want here.
- PIO PCB. You can order a PCB batch (3 pcs.) if you want here.
- Joystick PCB. You can order a PCB batch (3 pcs.) if you want here
REMARK 1: I am in no relation to Aisler-B.V., to offer a link to the PCB's is ONLY a simplified way to order them without using kiCAD or what else… You are free in any way to choose a different manufacturer for the PCB's.
REMARK 2: A alternative (cheaper) PCB manufacturer may be JLCPCB in USA, but there I do not have a account. You will have to do that by your own and upload the gerber files. Don't forget to take into account the unavoidable higher shipping costs if ordering from outside the USA.
Helpful hints for assembling
NEW: I2c-EEProm-Clock-Module Adapter
I've slightly modified the old adapter this way, that the DS3231 clock module is now soldered to the PCB. Still remove the old pinheader and solder a new straight one the IC side so the module can be soldered with the battery holder on top to the PCB. See picture 1 below. A 3D view is included as a subpicture. The two IO's on the I2C Header are renamed to INT1 & INTB. At present they are not used as interrupt input, but they are now additional IO's of the PIO-Port0 on the Joystick PCB. More in the Multicomp System Manual downloadable below.All data is in the archive “Multicomp-July-2019_V1.0.0_I2C-Clock_EEPROM-Adapter.tar.gz”
OLD: Swiss-Pi Adapter: Adding a Clock Module
If it is intend to mount a DS3231 clock module on the PCB, drilling the holes at the right position is a concern. To get the appropriate hole spacing and position, prepare a small piece of a experimental board with 4 holes as shown in picture1, then glue it with double sided tape to the position you want to drill (check that the module doesn't collide with pin-header J1 and J2). The resistors R2 & R3 must be installed on the bottom side of the PCB and soldered on the TOP side later on when installing the other components and before you install the clock module !
If this is done you are ready to solder all parts on the PCB except the clock module. This comes as last. On the clock module the old pin header must be removed and replaced by a new vertical one installed on the TOP side where the DS3231 IC is located. Put a small piece of double sided tape on top of the DS3231 and glue the module on the PCB, the header pins must go through the holes ! Now everything is ready for the last step. The Picture shows how the pin header of the module has to be connected to J1. On the top left side is shown how the clock module with the new pin header is installed on the PCB. The shown wiring is only valid for the ECKSTEIN module on right hand side of picture1 !
Joystick-PCB: Preparing J5, R21/R22 for soldering first
R21/R22: Both resistors must be mounted on the bottom side of the PCB !
See picture 1. Do this as your first step !
Preparing J5 Pin-Socket: I've used a 10×1 pin-socket from the Arduino Project for mounting stackable PCB's on a Pin-Header (There are 20×2 stackable Pin-Sockets from the Raspbery-Project too, may be that they have to be treated in the same way). When trying to plug them on J6 (on the Multicomp-Board) I've found out that they can't be mounted side-by-side. So some mechanical treatment was necessary. After doing this, check out that all pins are vertical aligned when plugged into the box-header on the Multicomp board (J6). Next serveral M3 Nylon Hex Spacer (length see picture2) and Nylon washers, M3x0.8mm thick, are needed. I bought a larger amount of them on ebay or AMAZON. They offer collections of different spacer types (male-female, female-female) and length for less money. Regarding the washers: I bought them from AMAZON PROTECH_STORE, “PROTECH Large Polyamidwashers DIN 9021 M3 50 pcs.”, see picture2 for installation. The Acrylic sheets are 3mm thick, color is green, but the chosen color is up to you… The outer dimensions are as the Multicomp PCB. The corner hole positions are marked by using the Multicomp PCB as a hole mask (drill: 3.5mm diameter). The Acrylic sheets are bought from AMAZON as 200x300mm^2 pre-cut parts. I've done the cut to Multicom-PCB dimensions by myself. Maybe that the chosen shop will cut it for you…
After installing the 2 resistors on the joystick board install the washer and spacer as shown on picture2 to get the joystick board to the right level above the RS232 Dsub-9 connectors. Fiddle the pins from the sockets through the holes of J5 (Joystick-Board), then plug the socket into J6. Check their position in the box-header, then solder only one pin of each socket and check again. If everything is ok, solder all pins, then cut off the not needed length of the pins.
Multicomp-PCB: installing the spacer for Acrylic sheets and ADD-On PCB's
Picture3 shows how to install the various spacer/washer to get the right distance for mounting Swiss-Pi- & Joystick-PCB and the Acrylic sheets.
PIO-Expansion PCB: TOP/BOTTOM installation of the PIO-Expansion Socket
Where to install this socket depends on what you want to have most on the TOP side of the Multicomp-PCB: Joysticks on TOP or 2nd PIO-Port. To remove the 40-pin box-header may become a hard job and may damage the through-hole plating ! From my point of view it's of higher value to installed Joystick-PCB on TOP (if the 2nd PIO-PCB is not needed, leave the PIO-Epansion socket uninstalled). In principal the Joystick-Interface is more a multipurpose hardware, because the four analog inputs are voltage-to-pwm converters that transform 0..5V to it's corresponding puls-width. Nothing else the 4 counter in the FPGA do when reading back the thumb-stick position (bandwidth is roughly 45Hz, so most “slow motion” things will work fine). It's a suggestion…, at the end it's up to you.
Although the code is running without any known issues, I've to bring down the number of warnings. That might cause some minor changes in the VHDL Code, but the general line is defined. The GPIO Bus is a 10-bit 2 port system with one 8-bit port (LOW) and a 2-bit port (HIGH). Single Input/Output programming is possible. Two user-controllable LED's (use a open collector driver) are connected to the header to. They can be used as a feedback indicator. I used them for testing the GPIO-Port - very helpful The I2c, Mouse and Sound-Hardware is tested and operates as expected - as far as I can say at present. Nevertheless there might be some unexpected behavior. The I2C controller really needs some explaining words, if you want to know more (yet), read the VHDL Code and follow the mentioned web-link in the header. The mouse-controller initializes the mouse for streaming-mode. More information can be found in the VHDL Code. The sound-channel has a special feature: It's possible to bypass the PSG's and write 8-bit data directly to the Sigma-Delta-DAC inputs. This can be used for DC-Output or to write data-streams directly to them. Again, read the VHDL Code for details/port-addresses.
Programming the VHDL Code
The Core-Board has only a jtag connector. That implies that only .sof files can easily be programed. If the code has to go to the EEPROM for permanent storage some extra steps are necessary each time you want to do this. How this can be achieved describes INTEL's “AN 370: Using the Intel FPGA Serial Flash Loader with the Intel Quartus Prime Software”. I've extracted the relevant section and created a short “Readme_Converting_.sof_to_.jic-Files.pdf” file which is easier to use and find. Follow these steps. The “Output_files” folder in the Project Folder includes a “Microcomputer.cof” file which is the Conversion-Setup for the conversion .sof → .jic. Read this in by clicking in the Selection-Box on “Open Conversion Setup-Data”. This automates all needed settings. Next click on “generate”. In the programmer select “Mikrocomputer.jic” for writing to the EEPROM.
Now ready for Serial-A…-C and the I2c-Interface. Next stop is having a program to set/read the RTC. While the RSX for the I2c-Interface is ready now, but - that's life - the targeted (2nd) I2c-controller refuses to cooperate. Therefore I will put it aside for some time and give it a 2nd try later - may be.Yet I've to stay with the 1st one - what is no real drawback.. Max. transfer speed is 600kHz (for the RSX), so the usual used 100kHz & 400kHz are covered. I've updated the VHDL code, because 2 minor bugs came up when routing the 'BUSY' signal from the I2c-Controller to the Drive activity LED (LED0 on the FPGA board). So you should update the FPGA binary code. Both archives incl. the usual sources, the RSX, a ref-manual and a demo to show how to use the RSX-library. The archive 'rtc-1.0.tar.gz' includes no RSX, it offers 3 CPM3 console commands that handle time data transfers from the CPM3 system-clock to the RTC and vice vesa. The 3rd program displays the RTC-Time. More in the incl. Ref-Manual.
|zserial-1.0.tar.gz||165.3 KiB||2020/12/06 08:24|
|iwire-1.0.tar.gz||748.9 KiB||2020/12/06 08:24|
|rtc-1.0.tar.gz||1.7 MiB||2020/12/06 07:54|
Due to the use of kiCAD5, the Schematic & PCB-Data can't be processed with kiCAD4, I haven't tried this but the files are not backward compatible. Many things are different in Version 5 !
All incl. in the presented archives. So have a closer look into them.
04.04.2020: Uploaded the I2c-RSX together with an updated version of the VHDL code that removes 2 minor bugs
08.04.2020: Uploaded a new I2c-RSX which removes a issue with Ack-Error detection in the I2cWrBuff() function & a ret-stack unbalance in I2cRdBuff() too
11.04.2020: Upload of the RTC-Package to support the DS3231 RTC module.
17.04.2020: Upload of new Picture1 with now right connection of SDA of DS3231-clock to J1/Pin10
20.04.2020: Upload of new VHDL- & zserial-package. Added read back of BRG for Serial-D Wifi channel
18.05.2020: Upload new zserial package w. added new function 'ChkTTYinp' in C-code & RSX, minor corrections + update of Zserial Ref-Manual
21.05.2020: Upload of iwire-1.0 & rtc-1.0 archive with corrected iwire.rsx. Function 'I2c_CpyBuff' had a bug regarding return on byte-cnt = 0
06.12.2020: Upload new rtc.tar.gz. Incl. are programs to support new hardware: 1. a Uptime-counter, 2. a random-number gen. in hardware. Updated multicomp-july2019 VHDL file incl. the new hardware code. Renamed and updated Port-Addresses pdf to Multicomp-July2019_System-Manual and uploaded it as separate file
10.12.2020: New VHDL-File for the FPGA. The .cof-file was gone il and generated a unusable FPGA programming file (CPM freezes after a few seconds…). It took me a while to find out who was responsible for that. Beside that the RND-Gen. got some improvements, it tends to freeze the system too - fu** that random shit and its combinational loops… but I want to have it
|multicomp-z80_xgraph_20190411.tar.gz||568.7 KiB||2019/04/12 05:34|
|multicomp-cycloneiv-july2019_vhdl.tar.gz||29.9 MiB||2020/12/10 12:24|
|docu_cycloneiv_ep4ce15-core-board.tar.gz||928.5 KiB||2019/11/16 06:09|
|docu_ep4ce15f23c8n_aliexpress.tar.gz||5.9 MiB||2019/11/16 06:09|
|kicad-5.0.2_multicomp-july-2019_v1.0_pio-extension.tar.gz||771.8 KiB||2019/12/21 16:12|
|kicad-5.0.2_multicomp-july-2019_v1.0.0_i2c-clock_eeprom-adapter.tar.gz||1.7 MiB||2020/12/09 13:45|
|kicad-5.0.2_multicomp-july-2019_v1.0_swiss-pi-adapter.tar.gz||459.6 KiB||2019/11/16 06:09|
|kicad-5.0.2_multicomp-july-2019_v1.0_joystick-board.tar.gz||2.9 MiB||2019/12/21 16:13|
|kicad-5.0.2_multicomp-july-2019_v1.2_main-board.tar.gz||14.2 MiB||2019/12/23 21:59|
|multicomp-july2019_system-manual.tar.gz||1.1 MiB||2020/12/06 08:23|