The Museum of HP Calculators

HP Forum Archive 16

[ Return to Index | Top of Index ]

HP 50g and SD Memory
Message #1 Posted by Gerry Schultz on 29 Aug 2006, 9:17 p.m.

To All:

Hello. My name is Gerry and this is my first post to the Museum of HP Calculators. In way of some background, my first calculator was an HP-45. I've always been facinated with HP calculators and I've ended up as a bit of a collector. At present, I own the HP-55, a 41C, 41CV and a 41CX with a lot of old peripherals like quad memory, a bunch of software packs like the PPC plug-in ( yes, I was a member), the original 41C thermal printer, a 41 card reader, a wand, eprom reader and a port extender.

I also have a couple of 48GXs, a 49G, a 49g+ and now a 50g. My question (at last!) has to do with SD memory for both the 49g+ and the 50g. I read somewhere that the maximum SD memory size supported by both the 49g+ and 50g is 2GB. When I bought the 50g, I wanted to add the SD ram and when I went to CompUSA, they had 2GB SD chips on sale for $79. When I plugged in the RAM and checked the filer, it showed a little less than 1GB of SD RAM on both the 49g+ and the 50g. I also have a 64MB, 512 MB, and a 1GB SD RAM chips and they all show about the right amount of RAM in the filer.

What's interesting is that the 1GB and 2GB SD RAM chips read the same amount of space in both calculators. Also, I can see files and subdirectories on the 2GB SD RAM chip in the filer of both calculators and the RAM is formatted FAT16. Finally, both the 49g+ and the 50g are running 2.09 firmware, so they function identically.

Has anyone else seen this with their calculators? It's by no means a big deal but it appears to me to be a bug in the firmware.

Any ideas?

Gerry

      
Re: HP 50g and SD Memory
Message #2 Posted by Gene Wright on 29 Aug 2006, 10:09 p.m.,
in response to message #1 by Gerry Schultz

The maximum size the filer can display is just under 1GB. A card of 4GB will still show only 1GB free.

Difficult to overcome at this point, but a large card should work fine.

      
Re: HP 50g and SD Memory
Message #3 Posted by James M. Prange (Michigan) on 30 Aug 2006, 3:08 a.m.,
in response to message #1 by Gerry Schultz

As Gene indicated, it seems to be a limitation as to how much free capacity the filer can display, not in how much capacity the calculator can actually use. As an experiment, you could try using up most of the capacity and see whether the calculator can still read and write the card. Whether there's any built-in maximum to the capacity the calculators can use (other than any imposed by the file system on the card itself), I don't know.

Perhaps a minor point, but SD cards have the type of memory called flash, not RAM. As you know, the cards are formatted much like a hard disk (or floppy disk), using a FAT12, FAT16, and FAT32 file system. For updating the "ROM", the card has to be formatted FAT16, but other than that, the calculators (at least with recent ROM revisions) can use any of these three file systems.

In general, with a card inserted, there is a delay after pressing the ON key before anything is displayed. Experimentally, the more clusters the file system has, the longer the delay is. I surmise that the delay is more or less proportional to the size of the FATs in the file system, and of course also depends on the speed of the card itself. If the delay is too long for you, try formatting the card with larger (and therefore fewer) clusters, or FAT16 instead of FAT32. Of course, larger clusters implies more wasted "slack space", but I expect that most calculator users won't actually be storing enough files to use the whole card anyway.

Be aware that the cards can't be "merged" and used as "System RAM". When the calculator stores something on the card, it's stored as a "binary transferred file", just as if you'd made a binary transfer to your PC. To use anything on the card, the system has to transfer it to System RAM, either to "user memory" as a variable or to a "temporary object" area. It follows that the file has to be small enough to fit into the free system memory. A library can be stored on the card, but to attach it, it has to be copied to port 0, 1, or 2.

You can also use a MultiMediaCard (MMC) in these calculators, and of course, with the appropriate adapter, any of various further miniaturize versions of the MMC and SD cards.

Regards,
James

            
Re: HP 50g and SD Memory
Message #4 Posted by Gerry Schultz on 30 Aug 2006, 9:26 p.m.,
in response to message #3 by James M. Prange (Michigan)

To Gene Wright and James M. Prange:

Thank you for your responses. I tend to think of any solid-state memory as RAM but your point, James, is well taken. The SD RAM chips are formatted as disk drives so it makes sense to call them Flash. Even then, I tend to think of them as Flash RAM since it's solid-state read/write memory.

Also, your point about only needing to format the SD Flash as FAT16 for firmware updates is interesting. The manual didn't explain why the SD Flash had to be formatted FAT16 but I guess the rudimentary OS that the calculator runs on during a firmware upgrade must only support FAT16 with the main OS supporting all three file systems.

I'll also try loading up my 2GB Flash from my PC and see how much of it is seen by the 49g+ and 50g.

Thanks again, Gerry

                  
Re: HP 50g and SD Memory
Message #5 Posted by Gene Wright on 31 Aug 2006, 10:16 a.m.,
in response to message #4 by Gerry Schultz

Gerry wrote: "...but I guess the rudimentary OS that the calculator runs on during a firmware upgrade must only support FAT16 with the main OS supporting all three file systems."

Gene: This is what JYA has explained recently on comp.sys.hp48. Apparently, upgrades require a FAT16 formatted card.

                        
Re: HP 50g and SD Memory
Message #6 Posted by James M. Prange (Michigan) on 31 Aug 2006, 8:31 p.m.,
in response to message #5 by Gene Wright

Quote:
Gene: This is what JYA has explained recently on comp.sys.hp48. Apparently, upgrades require a FAT16 formatted card.

And the explanation given is that the "Boot ROM" simply doesn't have enough room to add the capability of reading another file system.

It seems to me that as more cards are formatted FAT32, more users will get tripped up by trying to update the "ROM" by not having a card formatted FAT16. Maybe some future model might allow updating from a FAT32 formatted card?

A bit of history: For the main operating system (loaded from ROM), early 49g+ ROM revisions could handle only FAT12 and FAT16. Later revisions added the capability to handle FAT32, but the ability to handle FAT12 was lost temporarily, but eventually it was restored, so recent 49g+ and all 50g revisions can handle all three file systems.

If you use the 49g+ to format a card, then 8MB cards are formatted FAT12, 16MB and 32MB cards are formatted FAT16, and 64MB and larger cards are formatted FAT32. I suppose that there could be cards 8MB and 16MB, or between 32MB and 64MB; what the calculator would format these to is a matter for experimentation. It would be nice if the calculator would offer a the a choice of which file system and cluster size to format a card to, but for now, you have to format it somewhere else to get a choice.

Regards,
James

                  
Re: HP 50g and SD Memory
Message #7 Posted by Marcus von Cube, Germany on 31 Aug 2006, 11:45 a.m.,
in response to message #4 by Gerry Schultz

Gerry,

SD ("Secure Digital") cards are not RAM (Random Access Memory) but electrically erasable programmable ROM (Read Only Memory), also called "flash" memory. "SD RAM" is an older technology of dynamic RAM for PC main memory (SD stands for "Synchronous Data" in this case.)

The main difference is that flash memory (and thus SD cards) keeps its contents even while no power is provided. Any form of RAM (static or dynamic) needs some backup power to keep its contents. Dynamic RAM even needs to be "refreshed" in regular intervals by the controller logic.

Flash ROM can only be erased in chunks. This makes it suitable for file systems where data is written in sectors or blocks at a time. Modern flash cards (SD, CF, MMC, xD) have a built-in controller logic that mimics a hard drive with ATA commands. The host (PC, PDA, calculator) addresses such a device like it would do with a real hard drive and puts a file system on it. With the correct software you can even create multiple partitions on a flash card.

Marcus

                        
Re: HP 50g and SD Memory
Message #8 Posted by James M. Prange (Michigan) on 1 Sept 2006, 4:19 a.m.,
in response to message #7 by Marcus von Cube, Germany

Note that "RAM" ("Random Access Memory") and "ROM" ("Read-Only Memory") are rather misnamed.

As far as I know, both "RAM" and "ROM" apply only to solid-state memory, and any particular memory cell in them can be accessed "at random", without (serially) accessing other memory cells.

Originally, ROM was written as part of its manufacture, and can't be erased or rewritten (this still applies to plain ROM), so it's essential that ROM be non-volatile, that is, it doesn't require any power to retain its contents. In actual use of the names "RAM" and "ROM", volatility for RAM and non-volatility for ROM are the real distinguishing characteristics, so we also have PROM (Programmable ROM) that can be written only once after manufacturing, EPROM (Erasable Programmable ROM) that can be erased and rewritten, and EEPROM (Electrically Erasable Programmable ROM) that can be erased without resort to such cumbersome methods as exposure to ultraviolet light.

Magnetic and optical discs are non-volatile and pretty much "random access" (as compared to the serial access of a magnetic tape), but we never refer to them as either ROM or RAM; they're considered to be mass-storage media rather than "memory", although a hard disk is often used for "virtual memory".

EEPROM (such as flash memory) can easily be erased and rewritten, so it's not really "read-only", but because it's non-volatile, it's considered to by a type of ROM. Of course, the flash cards are used as removable mass-storage media as well, used much as we would use removable magnetic or optical discs.

The blocks of flash memory erased at one time are relatively large (32KB in a SanDisk document that I read), and writing anything, even a single bit, to flash entails reading the whole block, changing the contents, erasing the block, and writing the block, so writing to flash is rather slow and uses a lot of power, at least as compared to the SRAM (Static RAM) used in the calculators. Writing to flash requires more power than anything else that the calculators do.

Erasing flash memory also "wears it out". I think that typically, flash memory is designed for about 10,000 to 100,000 erasures per block (depending on the grade). The controllers for the cards also do "wear leveling" by remapping the "logical sectors" on the card to different physical "sectors", for example, to avoid always writing the FATs to the same block(s).

The non-volatility of flash memory makes it very suitable for uses in which this is desired and it won't be written to all that many times, such as upgradable "firmware", occasional storage or transfer, using libraries in port 2 of the 49G, 49g+, or 50g, and use in digital cameras, cell phones, and music and video players. But the file systems used on the flash cards make them unsuitable for attached libraries, although they can indeed be used for storing and transferring library files. The low write speed, high power requirement for writing, and limited number of write cycles make flash memory unsuitable for "merging" with a calculator's "System RAM", or the frequent writing that a PC's operating system typically does to its hard drive.

The calculators can indeed use a card with a "Master Boot Record" and partitions, but will use only one partition, so if the card is intended for use only with the calculator, there's no advantage to formatting it this way. Formatting a card more like a floppy, with just a "Boot Record", works just fine.

"Secure Digital" (SD) cards are based on the older MultiMediaCard (MMC), and the "Secure" refers to added "security features" for copy protection; perhaps more secure for copyright holders, but no more secure for the user. To be sure, an SD Card does have a lock/unlock switch, but note that early revisions of the 49g+ will write to the card even with the switch in the lock position, so I surmise that it's up to the device to determine the state of the switch and act accordingly.

Having firmware (including the "ROM-based" operating systems in the calculators) upgradable is no doubt an advantage (no need to replace the device or a chip to fix any bugs), but it has the disadvantage that developers may initially release a device with "beta-quality" firmware as "good enough", expecting that they can always fix the bugs later, as users discover and complain about them.

Regards,
James

                              
Re: HP 50g and SD Memory
Message #9 Posted by Marcus von Cube, Germany on 1 Sept 2006, 6:45 a.m.,
in response to message #8 by James M. Prange (Michigan)

James,

Quote:
The blocks of flash memory erased at one time are relatively large (32KB in a SanDisk document that I read), and writing anything, even a single bit, to flash entails reading the whole block, changing the contents, erasing the block, and writing the block, so writing to flash is rather slow and uses a lot of power, at least as compared to the SRAM (Static RAM) used in the calculators.

With respect to writing, that's not quite true. Once a block is erased, it can be written in much smaller quantities (bits/bytes). If a flash card contains a file system, writing a single sector which has been erased as part of a bigger block earlier, is thus possible.

Marcus

                                    
Re: HP 50g and SD Memory
Message #10 Posted by James M. Prange (Michigan) on 1 Sept 2006, 9:15 a.m.,
in response to message #9 by Marcus von Cube, Germany

Quote:
With respect to writing, that's not quite true. Once a block is erased, it can be written in much smaller quantities (bits/bytes). If a flash card contains a file system, writing a single sector which has been erased as part of a bigger block earlier, is thus possible.

I see your point; there's no need to erase anything if it's known that the location to be written to has already been erased. Of course with the FAT file systems on these cards, all access is in whole sectors, or clusters, as the case may be. But does the controller on the card actually keep track of which sectors have been erased, or does it assume that with each new write the sector(s) need to be erased first? Of course another possibility would be to read the area to be written to and check whether it's nulled out.

Of course the built-in flash on the calculators is different; for example, it doesn't emulate a disk drive with sectors. I wouldn't know how large the erase blocks in port 2 are, or whether the system keeps track of which locations have already been erased.

Regards,
James

                                          
Re: HP 50g and SD Memory
Message #11 Posted by Marcus von Cube, Germany on 3 Sept 2006, 11:19 a.m.,
in response to message #10 by James M. Prange (Michigan)

Quote:
But does the controller on the card actually keep track of which sectors have been erased, or does it assume that with each new write the sector(s) need to be erased first? Of course another possibility would be to read the area to be written to and check whether it's nulled out.

I don't know but I guess the controller is quite intelligent. If it is able to remap physical pages to logical sectors (to reduce the chance of wearing out the FAT or directory sectors) it should avoid unneccessary erase operations as well.

Standard EPROMs are erased to FF by UV light, not to 00. But it might be that the controller logic in a flash card inverts the physical data to make erased memory appear as all zeroes.

That's nothing but speculation, though...

Marcus

                                                
Re: HP 50g and SD Memory
Message #12 Posted by Steve Borowsky on 3 Sept 2006, 5:01 p.m.,
in response to message #11 by Marcus von Cube, Germany

I wonder if anyone more knowledgable than me can clarify something regarding flash memory. I first heard of flash memory around 1990 or so as a new product from Sundisk (now Sandisk), but EEPROM had been around for quite some time before that. What's the difference between 'flash' memory and the EEPROM that had been around for years before?

                                                      
Re: HP 50g and SD Memory
Message #13 Posted by Marcus von Cube, Germany on 4 Sept 2006, 3:10 a.m.,
in response to message #12 by Steve Borowsky

I searched the Net for

EEPROM versus FLASH technology
(no quotes) and came accross an interesting PDF-Document: http://www.ida.ing.tu-bs.de/service/download/DigSchalt/Vorlesungen/FlashMem.pdf

Marcus

                                                            
Re: HP 50g and SD Memory
Message #14 Posted by Steve Borowsky on 4 Sept 2006, 3:28 a.m.,
in response to message #13 by Marcus von Cube, Germany

Thank you Marcus! I searched awhile ago but never found anything that detailed, thanks!

                                                                  
Re: HP 50g and SD Memory
Message #15 Posted by GE on 4 Sept 2006, 5:09 a.m.,
in response to message #14 by Steve Borowsky

...and what about bubble memory ?
Went down memory lane recently re-reading old magazines, and in the 80s many high-end machines were touted to use "Bubble" memory.
Seems to be some non-volatile storage medium, based on small magnetized areas on some adequate substrate.
This technology abruptly disappeared. Does any old timer here have any information ?

                                                                        
Re: HP 50g and SD Memory
Message #16 Posted by Steve Borowsky on 4 Sept 2006, 9:05 a.m.,
in response to message #15 by GE

I don't know why it disappeared, but I remember there was a laptop by Sharp that used a bubble memory cartridge for non-volatile storage. I think it was long enough ago that it was before IBM compatibles and the memory cartridge was measured in kbytes, I think 128.

                                                                              
Re: HP 50g and SD Memory
Message #17 Posted by Steve Borowsky on 4 Sept 2006, 9:12 a.m.,
in response to message #16 by Steve Borowsky

http://en.wikipedia.org/wiki/Bubble_memory


[ Return to Index | Top of Index ]

Go back to the main exhibit hall