The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

HP 30b repurposing
Message #1 Posted by Philippe Cairic on 17 Oct 2012, 1:18 a.m.

Among the people who already worked on the HP20B/30B, could someone tell me if it is possible to keep a reasonably accurate time with what's available on the platform? Is there a crystal oscillator in the calculator?

Thank you.

      
Re: HP 30b repurposing
Message #2 Posted by Marcus von Cube, Germany on 17 Oct 2012, 2:02 a.m.,
in response to message #1 by Philippe Cairic

Yes and No. Adding a crystal is easy because the hardware is prepared for it, you'll just need the parts and some soldering skills. But the original 20b/30b firmware does not make use of the built in quartz oscillator so you need to switch to a different firmware. The only available option so far is our WP 34S project.

            
Re: HP 30b repurposing
Message #3 Posted by Philippe Cairic on 17 Oct 2012, 4:41 p.m.,
in response to message #2 by Marcus von Cube, Germany

Thank you, I saw this article.

However, ideally, I'd like to implement some sort of RTC without modifying the calculator.

I am looking at Atmel documentation, I know for AVRs there is a register that can tweak the internal oscillator to get a more accurate clock, wether you can do it for their ARM chips remains to be seen.

            
Re: HP 30b repurposing
Message #4 Posted by Philippe Cairic on 17 Oct 2012, 5:34 p.m.,
in response to message #2 by Marcus von Cube, Germany

Ah ha! I found this: http://www.atmel.com/Images/doc6148.pdf

Maybe a crystal is not needed after all.

Edit: direct reference to Atmel web site.

Edited: 17 Oct 2012, 7:03 p.m.

                  
Re: HP 30b repurposing
Message #5 Posted by Katie Wasserman on 17 Oct 2012, 9:25 p.m.,
in response to message #4 by Philippe Cairic

That's a pretty interesting method they describe. But it sure seems like a ton of work to go through to avoid adding a $0.40 crystal.

                  
Re: HP 30b repurposing
Message #6 Posted by Marcus von Cube, Germany on 18 Oct 2012, 2:35 a.m.,
in response to message #4 by Philippe Cairic

The note talks about the AT91SAM7S and X models, not the L type which may not have the necessary hardware for the TIA process (to be checked but why bother?).

                  
Re: HP 30b repurposing
Message #7 Posted by Eric Smith on 18 Oct 2012, 3:09 a.m.,
in response to message #4 by Philippe Cairic

That method is not applicable to the SAM7L series. There is no way to get accurate timing on the 20b or 30b hardware without modifying the hardware.

Even if the SAM7L *did* have that hardware, it still wouldn't work on the 20b and 30b. The described technique depends on having a crystal for the high-frequency oscillator (3-20 MHz), and the 20b/30b don't have that.

Edited: 18 Oct 2012, 3:12 a.m.

      
Re: HP 30b repurposing
Message #8 Posted by Walter B on 17 Oct 2012, 7:57 a.m.,
in response to message #1 by Philippe Cairic

To complete Marcus' statement: you have to add a quartz crystal and two capacitors yourself. The parts are specified and the steps are described in the linked file on pp. 1-6.

            
Re: HP 30b repurposing
Message #9 Posted by Katie Wasserman on 17 Oct 2012, 11:56 a.m.,
in response to message #8 by Walter B

You don't specify what "reasonably accurate time" is.

If you use a standard crystal and capacitors you'll get an accuracy of 20 to 30 ppm about 1 minute per month. I used a trimmer capacitor in place of one of the fixed capacitors and am able to adjust to the clock to within 5 seconds per month. (All assuming a constant temperature environment.)

                  
Re: HP 30b repurposing
Message #10 Posted by Philippe Cairic on 17 Oct 2012, 4:45 p.m.,
in response to message #9 by Katie Wasserman

I could live with a few seconds per day even, it's not that critical. I need to time events that are at the most 14 hours long or so and two hours on average. Like I said, I hope it is possible without modifying the calculator.

Thank you for your answer.

                        
Re: HP 30b repurposing
Message #11 Posted by Harald on 18 Oct 2012, 4:08 a.m.,
in response to message #10 by Philippe Cairic

Hello Philippe,

I'll send you the crystal and caps as well. I think you will end up installing them if you want to use the timer.

Regards, Harald

                              
Re: HP 30b repurposing
Message #12 Posted by Philippe Cairic on 18 Oct 2012, 3:56 p.m.,
in response to message #11 by Harald

Thanks you Harald, it's very kind of you.

The problem I wanted to solve is how to use the RTC without installing the crystal...

After careful consideration of the RTC app note and the data sheet for the AT91SAM7L, it appears that this particular processor doesn't have the necessary registers. There is a counter that allows you to determine the main clock frequency vs. that of the slow clock, (CKGR_MCFR) but I can't find anywhere how to change the frequency of the slow RC clock. On top of that, from the app note, it seems that the drift for the RC oscillator is about 10% anyway, so I guess that will never work.

Short or reinventing the wheel, I guess I'll just have to install the crystal. Thank you all for your contributions.

                                    
Re: HP 30b repurposing
Message #13 Posted by Eric Smith on 19 Oct 2012, 9:44 a.m.,
in response to message #12 by Philippe Cairic

It still wouldn't work if it had the registers, because those only let you calibrate the 32 kHz RC oscillator against a high speed (3-20 MHz) crystal, which the 20b/30b also don't have.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall