What could my 4004 CPU do?
Jan wrote 06/25/2020 at 21:25 • 0 pointsI'm trying to get some inspiration for my 4-bit CPU project, what could be practical use of it besides blinking some LEDs and writing on LCD?
I'm trying to get some inspiration for my 4-bit CPU project, what could be practical use of it besides blinking some LEDs and writing on LCD?
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
It is possible to decode the 1-bit per second encoding of WWVB or NPL at 60kHz with a 4004 if you pick-up either signal at that frequency. credit www.scissorhub.com.au
Are you sure? yes | no
it's ok to aim high...
Back awhile (cough, late 80's) we ran mobile walkie-talkies with these, full duplex ones on a network (used by police, taxis, London busses etc..) there was a lot going on: channel hopping, control channel monitoring, emergency modes, TX and RX power levels; plus a simple LCD UI, buttons and battery monitoring.
We got it working in the end, all hand coded in assembler, once spent a whole week refactoring just to get 10 bytes of ram free, it was interesting work.
Edit: also worth noting that this was a very real-time application. All our signal and channel hop timings had to be precise, and we had to code all the timings into the code itself by calculating how many cycles each instruction used (varies) then adding NOP's (no operation, one clock cycle) to pad the timings out. We had a script that listed the code with timings in a column to the left. It was invaluable.
Are you sure? yes | no
You can developp your own firmware to manage a text keyboard and a screen. Of course this is only a proof of concept as it exists for decades, not to say more.
Are you sure? yes | no
I need to write code for some (real) 4004 and 4040 boards (hardware done, no firmware yet) and the techniques that you need to even do an 8-bit counter seem alien to today's thinking. It takes an amazing number of instructions to even do something fairly simple.
Are you sure? yes | no
You can do simple chain counting with ISZ instruction, the younger brother of DJNZ on 8051. But it's true than needing something more complex grows large soon. So far I haven't filled one ROM page yet, simple concepts and I/O within the chipset are pretty compact. I'd like to see your boards and what you can do with it!
Are you sure? yes | no
If you can pick-up the WWVB or NPL signal at 60kHz, a 4004 could decode the 1 bit per second encoding with cycles to spare.
I didn't know about the 60kHz signal until yesterday, when I saw a strange oscillation in filter I was testing.
Are you sure? yes | no
Interesting way to find out!
Here in Europe we have DCF 77 kHz timing signal and many wall clocks as well as alarms and home weather stations use it. Which reminds of forgotten project with slightly newer 8048 processor that decoded it for clock display. I have spare receiver sonewhere too, so it should be possible to use. Maybe eliminate the modern pulse decoding chip and use some analog conditioning circuit. Then add couple of nixies 🙂
Are you sure? yes | no
Thanks for all the ideas, guys! I will investigate more the solar controller but the board will eat up all the power available from my small panel :) I could hook up some sensors too. The 4004 with my crystal can do up to 87771 4-bit instructions per second, not much but not so little too.
Are you sure? yes | no
Make it run Crysis!! :D ;)
Are you sure? yes | no
Get it to mine bitcoin
Are you sure? yes | no
MPP suggestion:
https://www.researchgate.net/profile/Abdelhalim_Zekry/publication/290436504_Enhancing_the_design_of_battery_charging_controllers_for_photovoltaic_systems/links/5baa2d1645851574f7e441f8/Enhancing-the-design-of-battery-charging-controllers-for-photovoltaic-systems.pdf
Are you sure? yes | no
That's really interesting suggestion, I do have small solar panel so it's useful project. I have vintage DACs and ADCs that can be used, now how to do PWM?
Are you sure? yes | no
With additional hardware (ADCs) you could program a MaximumPowerPoint Solar Module charging controller. Nice vintage tech combined with todays needs.
Are you sure? yes | no
You prompted me to read about the 4004. A 4 bit ALU,i.e. the word size, an 8 bit data "bus" (paired 4bit registers) and a 12 bit address bus. So the only limit is that manipulation >4 bit requires several instructions. I think I would go with a Wall Plotter as a first project, as it is NOT time sensitive, requires double/triple "word" (=4bit) calculations to stretch your software skills. On the wikipedia for "4004" : "The 4004 was also used in the first microprocessor-controlled pinball game".
Are you sure? yes | no
An all 1970's CNC system? Plug your 4004 in to https://hackaday.io/project/169887 Rip out the parallel port interface and swap the LM324 and LF353s for 741s.
Are you sure? yes | no
Your could do a hand calculator, a sprinkler controller, or any number of things that don't have hard real time requirements that are too agressive. There was a lot of stuff that was done with the old 8 bit machines that could have been done with a 4 bit machine if somebody had thought to do it. That was a time where people were figuring out what could be done with a microprocessor, and the 4004 was early days on that sequence.
Are you sure? yes | no
After working with my own four bit processor build I would say that besides the leds and lcd you also have more than enough processor power for controlling servos, CNC applications, plotters and perhaps 3D printing. Even with a 4004 the sky and your mind is the limit :-)
Are you sure? yes | no