▼
Posts: 88
Threads: 26
Joined: Jan 1970
Hello,
after more than one year, I returned to my hobby project of the redesigned user downloadable ROM module for HP-41.
The whole idea is to use the modern parts and fit 16KB (10 bits wide) of EEPROM into original HP-41 module.
Currently, I have two possible solutions how to fit the necessary memory and interface electronic into small place inside the original module.
1. PIC18F252 in SO28 package or 18F452 in TQFP44 package. Both processors have enough internal memory for both the necessary code and 16KB of HP-ROM code.
2. PIC16F72 or similar in the SSOP28 package and external SPI compatible serial EEPROM (256 Kb, 32768 x 8).
Both modules can be loaded with HP ROMs binary images from PC, via RS-232 port and special adapter.
Anyone is working on similar project ? I would like to share ideas and/or problems.
▼
Posts: 308
Threads: 26
Joined: Jul 2007
Hi Pavel..
I'm not 'working' on this but have a few ideas...
Maybe try a small PIC 12Cxx CPU. In an 8pin DIP these have 5 or 6 I/O pins. And then use some serial EEPROMs - 93Cxx, 24CXX, etc. All CPU has to do is manage the HP41 bus protocol and the I2C or Microwire serial memory protocol.
You might even be able to use a MMC or SD card!!
Bill Wiese
San Jose CA
▼
Posts: 88
Threads: 26
Joined: Jan 1970
It is not so simple. Those small PICs are not fast enough to do the job. When you look at the timing diagram of HP-41 bus cycles, you can see that the ROM address is sent between 16-32 cycle and the opcode must be sent by PIC between 46-00 cycle.
So, there is only 14 cycles for the whole processing. It is 14 x 2.8us = 39.2 us. It is roughly 39 PIC instructions (let's suppose that the PIC is running on 4 MHz). During this time, you must check the address (if it is in the module or not), recalculate the address to the EEPROM address space, send the command and address to the EEPROM and read back 16 bits of EEPROM data (at least 40 clocks on CLK line of serial EEPROM).
I2C is of course out of discussion, because maximum clock rate for I2C is 400 KHz.
On the other side, with PIC16F72 or similar (with hardware SPI/Microwire) it is possible to do it. Modern SPI/Microwire EEPROMS can have clock rate up to 5 MHz and PIC itself can run at 20 MHz.
Personally, I think that the 18F252 is the best solution, because there is only one chip inside the module and also, the fast serial EEPROMs in SMD package are hard to buy in small quantities, at least in my country.
▼
Posts: 88
Threads: 26
Joined: Jan 1970
There are more problems than the timing.
One of them is power consumption. Of course, it is possible to send the PIC to "sleep" state, but when there is wake-up from sleep, the PIC needs to wait 1024 clock cycles before it is able to continue. It is 51.2 us for the 20 MHz clock or 18.28 HP-41 bus cycles.
It means that the module will draw approx. 5 mA all the time when the HP-41 is switched on.
▼
Posts: 13
Threads: 1
Joined: Jan 1970
>There are more problems than the timing. One of them is power >consumption. Of course, it is possible to send the PIC to
>"sleep" state, but when there is wake-up from sleep, the PIC
>needs to wait 1024 clock cycles before it is able to
>continue. It is 51.2 us for the 20 MHz clock or 18.28 HP-41
>bus cycles. It means that the module will draw approx. 5 mA
>all the time when the HP-41 is switched on.
This is simply a K.O. criteria for the PICs despite of what other merits they might have (typicially the only merit is
that people are just accustomed to them for long - this is
still keeping the lousy 8051 pest alive). You might consider
TI's MSP430 series as a suitable alternative.
Holger
▼
Posts: 304
Threads: 23
Joined: Jul 2007
Actual for thuch a HP41 plug in rom solution the existing Zeprom is the reference :-)
Best wishes from Germany - Christoph Klug
▼
Posts: 88
Threads: 26
Joined: Jan 1970
I read about ZEPROM, but I never saw what is inside.
Posts: 88
Threads: 26
Joined: Jan 1970
I just looked at MSP430 and it looks good. Thx for the idea, maybe I should learn a new micro family.
▼
Posts: 304
Threads: 23
Joined: Jul 2007
Dear Pavel,
inside a Zeprom you find a small pcb. On top side of pcb is placed the Eprom and less smd components. On the bottom side of pcb is placed a surface mounted ASIC chip for interfacing the Eprom to HP41 bus. The ASIC chip is bonded directly to the pcb and sealed by a black glue mass.
Zeproms make available 16KByte ROM and opional bank switching.
Best wishes from Germany - Christoph Klug
Posts: 308
Threads: 26
Joined: Jul 2007
Pavel
I didn't realize the PIC12Cxx series was that slow (or HP41 bus timing that fast).
Yes, take a look at the TI MSP430... small fast low power...
Bill
▼
Posts: 301
Threads: 28
Joined: Jan 2005
With this microprocessor (TI-MSP430F449 with 60KB flash ROM) you can put THE ENTIRE HP-41 INSIDE!! I just ordered some (free!) samples from TI, I'll start to develop a emulator with this chip. Its assembler language is really powerful, it is best suited to a project like this than the PIC series. It is also capable to drive a LCD display directly!
(not the one from HP-41 :'( it has much more segments... but the (numerical) one from the Voyagers is great!)
Best regards,
Nelson
▼
Posts: 88
Threads: 26
Joined: Jan 1970
of course, you can emulate the whole HP with this chip. I suppose that the same you can do with ATMega128 or similar.
But in my project, I am facing a different problem. I must fit one or two packages in a really small space. I measured it and the whole design must fit on the PCB which is 10x24 mm.
It is really not easy, especially if the whole design should be made from available SMD parts (this mean no fancy micro packages, sold only in 1000 quantities).
Posts: 528
Threads: 85
Joined: Jul 2005
All info on my project is on www.kuipers.to/hp41, but this will not fit in a module housing. My intention is to put it in a cardreader. Power consumption looks acceptable and connects to a PC with USB.
Meindert
▼
Posts: 88
Threads: 26
Joined: Jan 1970
Of course, I know about your design. Actually, I have the printed PDF just here at the table. :-)))
But my goal is not to make MLDL, but to make a replacement for normal ROM modules which will be downloadable by user.
BTW, how do you catch the start of the 56 bits cycle in your design ?
I hooked the HP-41CV to my logic analyzer and it seems that all timing diagrams which was described in PPC or your PDF are a bit wrong.
Namely, the SYNC does not go low with the raising edge of CLK02, but with falling edge.
Also, after pressing the ON button, there are really wild things on SYNC and POW lines.
▼
Posts: 528
Threads: 85
Joined: Jul 2005
I almost feel flattered ;))
I have looked at the exact relationship of SYNC and the clocks with a scope, and they are a bit off indeed. Just make certain that it does not matter. The best reference is the original MLDL design, which catches the end of SYNC with 2 flipflops, mine is based on this. If you want to have the VHDL code, send me an email and I will mail it to you. I will publish the final code anyway. The important times are the rising edges of the clocks, do not use any other edges of HP41 signals!
Note that my MLDL is a ROM replacement as well, but just in a larger housing, but a smaller module would be great anyway. If I would do a project like yours I would go for the 8051 variations of Cygnal see (www.cygnal.com). The big problem will be power consumption as you need to verify the address in every single cycle. Startup times after a powerdown will be critical as well, but the HP41 will be doing several internal cycles anyway before accessing external ROM.
The relationship between PWO and SYNC is described in the HP41 Service Manual. Use google to find the relevant website, as the URL cannot be used in this forum unfortunately.
Meindert
▼
Posts: 88
Threads: 26
Joined: Jan 1970
The problem is, that I never had a chance to look at the original MLDL design. I only have a PDF with the first part of the article, where are no schematics. Maybe, I should buy a PPC Journal CDs.
Because I am trying to use only microcontroller, the VHDL is not necessary. BTW, I like the idea of using old card reader as a housing for MLDL and/or modules. I was thinking about similar design, but I do not have card reader, so I am trying to put everything in normal small module.
I have the service manual (from HP-Museum CD-ROMs), but the informations in the manual are not complete. Between pressing ON button and the phase when HP-41 is going to Standby mode and waiting for key press, there are especially wild things on SYNC and PWO lines.
In my current prototype, I am testing both PWO and SYNC lines and I am waiting for the state, when PWO is low and SYNC is high for at least 200 us. This seems a solid indication that calculator is in standby mode. As soon as SYNC goes low and PWO up, we are at the 54 cycle and the program start counting CLK pulses.
Posts: 774
Threads: 93
Joined: Aug 2005
Hi everybody,
Pavel, I'm deeply interested in this issue.
Please take a look at: http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv013.cgi?read=40493.
The full thread is interesting indeed, please read.
I'm still working on the PIC18LF252 approach. Last weekend I finished my (home-made) PIC programmer, and I'm still reading the oversized PIC Data-sheet.
I followed the advice from Vassilis Prevelakis (on the referred thread) and sent a mail to Mr. Ioannidis asking for the code, but I haven't received his reply... yet? So the code for the 18C252 is still a secret for me. May you can try to ask him and perhaps the luck be with you... :-)
On time, the MPS430F14x(1) (wich seem to fit the suitable size for the task) are "huge" 64 pin QPF's... Remember you only have 12mm x 23mm PCB space inside a standard 41 module.
They use 1.8v... 3.6v supply. As far as I've tested, all my 41's (I've got 1 "C" 1 "CV" and 3 "CX") started to show a weird behavior when logic "1" falls below 3.5v, this looks like a very narrow gap (0.1v) for the reliability to fit in.
And MPS430's (please correct me if I'm wrong as I've not yet read the full specs) don't run above 8Mhz.
At 40Mhz a PIC18LF252 powered at 4.2v. draws 10mA typical, wich seems quite reasonable. Should the code handle the task efficiently, lower frequencies (and currents) can be reached. Furthermore, the required 1024 cycles for start-up are not needed if you use EC mode, and keep the oscillator running while PIC is in SLEEP.
So, next step, try to get the existing code (I'm not very confident about that) or develop a brand new one from scratch.
If your're interested mail me.
Cheers.
▼
Posts: 88
Threads: 26
Joined: Jan 1970
It is interesting, that same ideas and arguments are recycled over and over again. :-)
The low power microcontrollers (with 3.x V power supply)really does not work reliable with HP-41. I already tried it. So, MPS430 or Cygnal are not usable.
Others have timing problems when it comes to wake-up from sleep (for example Atmel ATMega, PIC) etc.
BTW, did you tried to look at the power consumption of external oscillators ?
I tried and it seems that the average external oscillator consume 3x more power that the PIC or ATMega at full speed.
I think that the only solution is to use normal crystal attached to the PIC and use a smart software.
The PIC must be in the SLEEP state when the calculator is switched off. There is enough time for 1024 Tosc cycles, because the ROM-module access is not needed at least for several HP-41 instruction cycles.
It seems that it should be OK, if PIC start to work when the calculator is in Standby mode, just after the pressing the ON button. When the calculator is switched off (ON button pressed once again), the PIC can do to sleep.
The only problem is, that the PIC will consume power when the HP-41 is in Standby mode. Personally, I can live with it.
|