It’s a nice challenge to program the Intel 4004 processor. All the registers and accu are 4 bit wide. So when you want to make a little delay I need at least 4 register’s to create a nice wait-delay. This hole weekend I study and work at my program with a couple of subroutine’s.
I make a lot off progress and hope I can finish next weekend the main program to run 2 or 3 challenge’s for the Roborama game’s on 5 November at the Robotica club.
Happy Programming the Intel c4004 !
More and more I learn about the assembly code for the Intel 4004 processor. It is fun to work with it. Also it is a little bit complicated because I am not a very good programmer. But I make slowly progress.
First I make some note’s on paper, later I make some little test program’s and then I try to connect those little parts together to the right program.
Time, time and time. This is what this progress cost. But it give’s also a lot of fun. So I keep going.
I want to show you the robot car I have build for the Intel 4004 processor. The frame-work fot the robot is a vero-board print. Mounting 2 motor’s under it, a line-following sensor strip in the front and a powerpack an motordriver on the top of the print. A voltage meter fot the level of the LiPo accu’s complete the frame-work.
On the 4002 RAM I have 4 output pin’s. These are connected to the motordriver. 2 Bit’s for direction for the 2 motor’s and two bit’s to set the motor ON or OFF. On the 4001 ROM I have 4 input pin’s. Tree of them are connected to the line-following sensor en the last one is connected to a press-button on the back of the robot-frame-work. I can use this one for start or stopping the robot in the program for example. After testing the hole setup it is time to program some stuff in 4004-assembly to finish the Robot-game’s.
First I must go to describe very good the goal of the game for myself.
Halfway the Retrochallenge 2016/10 and still a lot of things to do. Let’s GO !!
Last day’s I have work on the speed of the Intel 4004 microprocessor. In the Propeller assembly program I have do a lot of tuning and debugging and now I run at a clock speed of the 4004 processor of 736 kHz. This is very nice. Also I have test the I/O at this speed. It work’s !!
Now I go to build my 4004 system on a robot car.
Last months I have write some program’s for the 4004 system to emulate a ROM by a Propellerchip. I write these emulation program’s in the SPIN language for the Propellerchip. This SPIN program work’s fine but is relative slow. I use the Propeller olso for the clock for the 4004 and my maximum clock speed in the SPIN language is around 30 kHz. But the original speed of the 4004 is 740 kHz so I want to speedup my clock. I decide to rewrite the emulation program for the Propellerchip in Assembly.
This give me a lot of trouble. I am not very familiar with writing program’s in assembly but I don’t give up. The whole weekend I spend a lot of time to write and debug my assembly program.
I use a ZIF-socket with some resistor’s, to use as voltage-dividers, to bring down the 15 Volt for the 4004 down to 5 Volt, to measure the signal level’s with a logic analyser.
After some very long debug-session’s I have the 4004 processor working with a clockspeed of 300 kHz. This is just the beginning. It work’s and more speed come’s later. My goal is to work with a speed of at least 600 kHz.
For this moment I am very happy, a littele [-NOP and jump to zero-] program works good with the assembly program for the ROM emulation. Now I have to write a program for the 4004 to use the I/O to read from the 4001 and write to the 4002.
This challenge give me a lot off energy.
A couple years ago I get a white ceramic gold pinned Intel 4004 processor. I was so happy to have it and I put it in a very nice box. Later I ask myself: “Could it work”. Or a better question: “Could I bring this 4004 processor to live”.
2 Years ago a read the blog from Frank Buss and this was my start to build around and program the Intel 4004 processor. Frank Buss use a Pic-processor to clock the 4004 and also hold the ROM image with the program for the 4004 processor. I have make some project’s with the Propellerchip from Parallax and decide to use this chip as clock and also as ROM, but the ROM-image for the 4004 I store on a SD-cart. So when I want to change a program for the 4004 I need to change the file on the SD-cart. On a vero bord I build a system for the 4004. I use a couple 16-pin’s ZIF-socket for the 4001, 4002 and 4004.
There are 3 powersupply’s, the first is a 15 Volt for the MCS-4 chipset and the second is a 3.3 Volt for the Propellerchip. There are some glue-chip’s to convert the 15 Volt from the MCS-3 chipset to the 3.3 Volt of the Propellerchip. And at the left under side there is the SD-cart in it’s holder.
The Intel 4004 processor is a 4 bit processor with a 4-bit multiplexed adres bus. An 4001 ROM contain’s 256 byte memory and 4-bit’s I/O. You could connect 16 ROM’s to the system wich give’s you a 4K memory. A 4002 RAM hold’s 4 bank’s of 20 4-bit’s memory’s and 4-bit output. And there is a 4003 serial in, paralel output chip. This 4 chip’s are called together the MCS-4 chipset.
I decide to use only the originel MCS-4 chip’s added with the propellerchip with act as ROM for the 4004-program. The I/O from the 4004 to the real world I want to do with the 4001 and 4002. This bring’s me to a big problem. The normal around these time’s of the 4004 you send your papertape with the program for the ROM to Intel and the make them. Include the metal-mask setting’s for the I/O. You must to specify the pin’s for Input or Output. When I want to use a real ROM as input of my system I need a 4001 which have NOT the internal numer of zero (because the system start on ROM page-0 witch is the propellerchip) but the I/O pin’s set to Input. So I search on the internet for 4001-ROM chip’s. I buy 10 of them and first I read the internal page-number. 6 of the 10 have the number-zero so the are useless for me. The other 4001-ROM’s I tested to write to and read from the I/O and at least 1 4001-ROM have 4 Input’s.
So I have a 4004 microprocessor, a good 4001 ROM with 4 Input pin’s and a 4002 RAM with 4 Output pin’s. With this I could build a system to control a robot.
During the RetroChallenge 2016/10 I go to work at my i4004 project. Last year I have build a system around the first Intel processor, the Intel C4004. Mayby 15 year’s ago I get a white ceramic gold pinnend Intel 4004 processor. All the time it was stored in a box and 2 year’s ago I start to think to bring the processor to live.
A cople year’s ago I read the blog writen by Frank Buss and this was for me the start to build also a system around the i4004.
The first step of the Challenge I want to use to documentate the status of my project and set the goal’s.