Showing posts with label µPF--1 KIT. Show all posts
Showing posts with label µPF--1 KIT. Show all posts

Wednesday, May 12, 2021

µPF--2, a µPF--1 clone.

Since a few months, I have been in the process of recreating the well-known µPF--1 microprocessor kit :

Wilipedia.
In fact, this kit has already been recreated, by Wichit Sirichote with the addition of downloading binary files from a PC via a serial interface. 


This solution, more modern than the original kit seems perfect, except that it has some drawbacks and a small operating problem. First, the serial interface comes in the form of a Standard RS232C interface. It would have been really more interesting to offer a serial interface via a USB port. This would have greatly facilitated the use of this kit. On the other hand, the fact that it is the Z80 processor which fully manages the serial interface, the maximum throughput remains very low, at around 1200 Bauds and receives erroneous characters randomly. Downloading even small files takes too long and is unreliable.

Also, I decided to redevelop this kit by offering a much more efficient USB hardware serial interface. I added a serial interface for an external keyboard. The original Wichit Sirichote keyboard being totally unusable. The switches used are not intended for this type of use.

I also added some possibilities and modified the software system accordingly. This allowed me to recreate the kit on a standard FPGA board:

This new system works very well, but on the one hand the FPGA board used is generic and not really suitable for the intended use. This FPGA board also does not offer a USB serial port and the expansion port is not suitable for setting up Z80 type extensions.

So I decided to recreate a system based on an FPGA. After several attempts and configurations considered, I arrived at this system:


Implementing an FPGA is a bit tricky, so I went with a pre-made FPGA board. Going through this type of configuration removes some of the implementation difficulties, and as a bonus, allows me to offer a more 'powerful' FPGA than the circuit originally planned.

The result remains compact and suitable for intensive use. Note also that this system can be used for something completely different than the recreation of the µPF--1 kit since it has 5V compatible serial and parallel inputs / outputs, a 2x16 LCD display in addition to the eight 7-segment displays.

After shipping the design files, I received the printed circuit board. The first thing I did was to see if the FPGA module can be correctly inserted:


Once this check was done I was able to start mounting partially the system. I started by mounting the power parts and checked the absence of 'magic smoke':


Fine! And the USB / serial interface circuit is correctly detected by the system, Win10 in my case.

I was able to continue mounting the board by installing all the components necessary for a first start of the system, i.e. the eight 7-segment displays and the LCD display as well as the interface circuit which will be used to receive the information from the external keyboard:


The FPGA module starts up correctly, The small example which makes the D5 LED flash works. The LEDs and the 7-segment displays are slightly lit which is normal given that all the I / O not used of the FPGA are positioned as inputs with low PULL-UP when it starts up.

It now remains to adapt the code of the FPGA previously developed to this new board.



Saturday, December 5, 2020

uPF--2? In fact, an uPF--1 in FPGA!

A few months ago, I started switching from the uPF--1 compatible kit based on Z80 from Wichit Sirichote to a version fully integrated in an FPGA. Basically, this kit is interesting, but has some shortcomings which make it rather inefficient to use : 


As you can see, this kit uses a keyboard consisting of standard and low-end tactile switches. This certainly allows the product to be offered at a low price, but in fact makes its use very inconvenient.

It is impossible to hit the keys quickly, which makes repetitive operations tedious and therefore does not allow efficient use of this kit. 

For me, the first thing to do was therefore to offer a keyboard with real keys like the Cherry key. But I thought it was a bit 'silly' to integrate this new keyboard to the FPGA board for several reasons. The first is that it would force me to develop a large board with actually few components on it. The second reason is that in fact, this type of keyboard could be used for other kits without having to develop a new version again, for new kits. Also, I developed this:


This is a prototype on which I integrated a connector for real-time debugging. The finalized version will not include this connector but only the 'audio' type connector allowing this keyboard to be connected to the processor board by a serial type link.

Obviously, this way of doing things requires the implementation of a serial link into the FPGA. This does not present a problem, knowing that it is possible to modify the source code of the monitor to integrate this interface. In the end, the whole thing looks like this:


the third reason was to offer a real serial link for file transfer. In fact, on the original kit, the serial link is directly managed by the processor thanks to the use of a bit of an input / output port. Bit detection is performed using timers in the form of code loops. Therefore, even at 2400 bits per second, after a certain number of bytes received, synchronization is lost. The result is that it is not possible to properly load a hex file from a PC to the kit. The received file is systematically corrupted!

Once again I built a real serial ports into the FPGA and modified the monitor to use this new device. It is therefore now possible to load a file at a speed of 38400 bits per second, or 3840 characters per second without problem. I did not push the communication speed any further because the processor still has to handle this flow of byte. On the FPGA board, the serial port will be USB compatible. Because the RS232 standard for this kind of kit is really not practical these days.

Here is a very basic example of sending a message on the display, downloaded then executed on the kit :


Note that the latest version of the source code provided by Wichit Sirichote is incomplete. Some functions do not perform correctly and require rewriting. So I did this work, in addition to that necessary to take into account the new material like serial ports and others... 

I am very satisfied with the result:



And now? It's time to move on to making the FPGA board. In order to work more efficiently with development software, I am in the process of remaking a PC based on a Ryzen 9 3900X processor. My current machine is equipped with an Intel Dual Core E5800 @ 3.2GHz from 2012. A bit outdated today! A good processor in its time but, anyway : bye bye intel ;-)


Monday, October 26, 2020

Retro keyboard.

Iin 2016, Wichit Sirichote created learning kits for different types of microprocessors, including the Z80 : 


This kind of kit is very interesting but suffers from some problems in my opinion. The first of these, and certainly the most important, is the keyboard. The tactile switches used are not suitable for precise, regular and comfortable typing. These are front panel switches, intended to configure a device, but certainly not to serve as an element of 'dialogue' with a computer. 

I'm not even talking about the self-adhesive plastic film where the key symbols are printed. It just makes typing painful : 


So I decided to create a keyboard equipped with real input keys. For this, I start by creating a prototype of what should be the type of keyboard that I will use for my future developments :


After a few days of waiting, I received the printed circuit board and soldered the components that will allow me to perform the programming of the on-board microprocessor :


Why an embedded microprocessor on this keyboard? Because this will allow the development of a keyboard, I hope, adaptable to a large number of materials, without having to recreate it each time.