View previous topic :: View next topic |
Author |
Message |
Gizz
Joined: 15 Jun 2004 Posts: 21 Location: Nottingham UK
|
A bit off topic: MMC Card Stuff |
Posted: Wed Nov 03, 2004 3:43 am |
|
|
Chaps (and quite possibly chapesses):
Sorry if this is a bit off topic, but you all are so knowledgable, it would seem churlish not to ask:
I have a requirement to read in lots of data from RS232 device to MMC memory (10MB or more) and then squirt out on USB.
Thinking of using 16F87 with a SIL CP2102 USB chip....but I have a question or two:
1) Where can I find the MMC spec?
2) Can one buy MMC memory chips ready for surface mount, or do I need to get hold of a carrier? And if so where from?
3) Can I really drive MMC using I2C or similar, and will the 16F87 cope with that? I read that the 512 byte input buffer for the MMC chip can be clocked really slow, so speed isn't an issue (the data comes in down to 9600...)
And, while I'm asking (!!!) - does anyone know of a supplier for LCD display that uses serial or I2C interface and runs on 3.3V, for 20x4 chars or similar?
Thanks in advance
Gizz |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Wed Nov 03, 2004 5:08 am |
|
|
Quote: | 1) Where can I find the MMC spec? | Lazy? Use mmc in Google and the first hit is www.mmca.org
Quote: | Can I really drive MMC using I2C or similar, | SPI you mean. Other option is the 4-bits wide MMC-bus.
Beware that you can only write data in blocks of 512 bytes. So in order to change a single byte you have to read the whole block, change the byte in RAM and then write the whole block again. Data reading is possible bytewise.
The 16F87 only has 368 bytes of RAM. A good option is to include the possibility for connecting an external memory to your processor, for example the Ramtron FM24CL16, a serial 16kbit FRAM memory, EUR2,31. FRAM sits in between RAM and EEPROM, as fast as RAM but doesn't loose it's contents when power is removed.
If you choose to implement multiple SPI devices, then be aware better not to place them on the same SPI bus. The MMC block-write of 512 bytes requires the chip-select to be active during the whole write making it impossible to switch to another SPI device on the same bus (only 368 bytes of RAM in the 16F84...). That's why I suggested the FM24CL16 which is I2C instead of the FM25C160 which is SPI. The CCS compiler is good in implementing an I2C software interface. |
|
|
Gizz
Joined: 15 Jun 2004 Posts: 21 Location: Nottingham UK
|
Not lazy, just a bit thick! |
Posted: Wed Nov 03, 2004 9:10 am |
|
|
Thanks ckielstra
I appreciate your saying that there is not much RAM on the 87, but my app is very very simple, and doesn't need much RAM.... the data rate in is 9600 baud and all I'm doing is storing it, not parsing it or acting on it, so it can go straight into the MMC. And then straight out again via USB. Its v cost sensitive so a Ramtron part is not desired, even though they are cheap.
I wouldn't be changing a byte of data, simply writing in big chunkcs, and then streaming them out again on USB a few minutes later.
I take it that SPI has to be done manually on the PIC? |
|
|
treitmey
Joined: 23 Jan 2004 Posts: 1094 Location: Appleton,WI USA
|
|
Posted: Wed Nov 03, 2004 9:36 am |
|
|
I didn't check the numbers,...BUT to write a 512 block, you need to store,(buffer) until you recieve that many bytes, right??? So there your RAM req is busted. I personaly would use a PIC that could store the whole 512. |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Wed Nov 03, 2004 10:18 am |
|
|
Quote: | Thinking of using 16F87 with a SIL CP2102 USB chip.... | You are fast! This chip was only released 2 days ago! Are you sure it is already available?
Quote: | I take it that SPI has to be done manually on the PIC? | The 16F87 and most other PICs have hardware support for SPI. The CCS compiler has additional great support functions like spi_write and spi_read.
Don't take my word for it, I haven't tried it and didn't study the specs in detail regarding the following...
MMC timing is not very critical, as long as you keep the MMC Chip Select line active you can clock in your data at any rate you want. Even long delays between succeeding bytes of the 512 byte block are allowed (I think). So theoretically you can indeed read data from RS-232 and copy it directly to the MMC.
Two restrictions to remember:
1) Writing to USB will have to wait for the current 512 bytes block to be finished.
2) During USB writes you still need to buffer incomming RS-232 data.
In a cost sensitive device the price for the connector is a possible problem. I never heard of a solderable MMC. Connectors always give electrical problems, soldering is much better. We use glue to fix the MMC card in the connector. |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Wed Nov 03, 2004 10:44 am |
|
|
treitmey wrote: | I didn't check the numbers,...BUT to write a 512 block, you need to store,(buffer) until you recieve that many bytes, right??? So there your RAM req is busted. I personaly would use a PIC that could store the whole 512. |
Unless it is possible to write the bytes as they come in. Is there any limitation how slowly you can write that 512 block? I don't know MMC but I haven't heard anything yet to disqualify the 16F87. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
SteveS
Joined: 27 Oct 2003 Posts: 126
|
3.3v display |
Posted: Thu Nov 04, 2004 7:57 am |
|
|
On the display subject, you may want to look at the Nokia 3310 display. It's very thin and small, 2-something to 3.3V, B&W, graphical (84 x 48), serial interface. You can do 6 lines by 14 characters using 8x5 fonts. Reflective, so no backlight needed - of course that's a negative if you need to read it in the dark....
- SteveS |
|
|
Gizz
Joined: 15 Jun 2004 Posts: 21 Location: Nottingham UK
|
|
Posted: Mon Nov 08, 2004 12:41 pm |
|
|
ckielstra, the CP2102 is being sampled in the UK next week - I have a few on order.
And, the USB and the RS232 interfaces are used at different times (RS232 for data in, then USB for data out at a different location...)
Thanks all for your comments! |
|
|
|