View previous topic :: View next topic |
Author |
Message |
Prefekt
Joined: 21 Oct 2010 Posts: 85
|
pic selection |
Posted: Wed Apr 06, 2016 11:33 am |
|
|
Hello,
I have a project that needs 4800 byte for data at one time in the memory.
Until now, I only work with pic 16f and 18f.
And I have no experience wit 16bit PIC's.
What is the better way, use the 18f and store the data in the flash memory, or use a PIC24?
I need two big arrays with 2400 bytes. An Extern EEPROM is too slow.
Which 16bit PIC is popular?
Regards
Volker |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9241 Location: Greensville,Ontario
|
|
Posted: Wed Apr 06, 2016 11:50 am |
|
|
A lot depends on what you're going to do with the data. Is it going to be 'constant' (never changing) or 'dynamic' (it changes or you alter it).
Perhaps use FRAM or even external CMOS RAM?
What about access speed? Maybe n SPI or I2C memory device will work ?
Arguably there's more here using 16 and 18 series parts than 24 or dsPIC series, so more/faster help with code.
Honestly need more information about the application and demands of the project.
Jay |
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Wed Apr 06, 2016 1:20 pm |
|
|
Look at the data sheet for the 18f87k22 chip
8.0 EXTERNAL MEMORY BUS
It allows external parallel static ram chips to be translated as if they were internal to the pic. Very fast access with this chip, so you could incorporate a fast 32k or larger static ram chip as if it was internal memory and still have lots of port pins left over.
BTDTGTTS it works... |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1908
|
|
Posted: Wed Apr 06, 2016 9:18 pm |
|
|
You can opt for a dsPIC as well. I have experience with the dsPIC33FJ256GP710A. Nice processor with 30k RAM and 256k ROM. |
|
|
Prefekt
Joined: 21 Oct 2010 Posts: 85
|
|
Posted: Mon Apr 11, 2016 4:06 am |
|
|
Thanks for the informations.
I get data from a bluetooth device (4200 bytes) and store this data in a external eeprom. The eeprom needs few seconds to write and read the data.
It's an 25LC640 eeprom.
I must send this data with RS232 in less than one second. And a read from eeprom needs to much time. I use the ccs read_eeprom and write_eeprom functions.
So my idea is to store the data in the internal data memory.
The data are constant.
Volker |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1908
|
|
Posted: Mon Apr 11, 2016 6:53 am |
|
|
If you use an SPI FRAM or MRAM external memory, you'll probably be able to do the store in the allowed timeframe. An FRAM or MRAM has an instantaneous write (no write delay like a conventional EEPROM). |
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Mon Apr 11, 2016 7:44 am |
|
|
Quote: | store this data in a external eeprom |
Frequent re-write cycles are NOT going to be sustainable over any large span of time. There is a reason EEPROM has a write cycle life spec.........and your code will show it to you eventually........ |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1908
|
|
Posted: Mon Apr 11, 2016 9:15 am |
|
|
asmboy wrote: | Quote: | store this data in a external eeprom |
Frequent re-write cycles are NOT going to be sustainable over any large span of time. There is a reason EEPROM has a write cycle life spec.........and your code will show it to you eventually........ |
A conventional EEPROM, yes. FRAM or MRAM have essentially an infinite rewrite lifetime. |
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Mon Apr 11, 2016 9:22 am |
|
|
Quote: | It's an 25LC640 eeprom |
Endurance: 1M cycles (guaranteed)
i take such guarantees at no more than 30% of "face value"
|
|
|
gpsmikey
Joined: 16 Nov 2010 Posts: 588 Location: Kirkland, WA
|
|
Posted: Mon Apr 11, 2016 9:47 am |
|
|
asmboy wrote: | Quote: | It's an 25LC640 eeprom |
Endurance: 1M cycles (guaranteed)
i take such guarantees at no more than 30% of "face value"
|
I wonder what their "guaranteed" bit is - double your data back if it fails??
I prefer eeprom (even if 1M cycles "guaranteed") for calibration and other such stuff that seldom changes. RAM of one form or another for stuff that changes often (or a combination - eeprom for fixed string chunks and ram for the stuff in the middle that does change - assemble chunks and vars when sending). _________________ mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3 |
|
|
Prefekt
Joined: 21 Oct 2010 Posts: 85
|
|
Posted: Mon Apr 11, 2016 11:55 pm |
|
|
I think I will try a FRAM.
Are there popular FRAM's which you used often?
I found the M25W256-G FRAM from Cypress, seems good for my demand. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9241 Location: Greensville,Ontario
|
|
Posted: Tue Apr 12, 2016 5:34 am |
|
|
As for PIC choice..consider one with TWO Hardware UART AND TWO hardware SPI peripherals. Something like the 18F46K22. Maybe there's a similar 16F PIC. To do all the data transfers you'll NEED hardware peripherals and interrupts otherwise you stand a good chance of losing data while the PIC is busy. You'll also need speed when you look at the 'path' the data has to follow.
Better to buy a more more powerful PIC now than waste a LOT of time trying to 'tighten' code, redesign PCBs, etc. You'll always need a couple extra I/O pins (LEDs, debug port) and memory (programs always get bigger !).
As for FRAM, I'd get a 16KB unit. Create a buffer of 'data-from-BT' and a 2nd buffer 'data-to-PC'. Use interrupts and data transfers will work 'in the background' while the PIC does 'other things'.
Jay |
|
|
Prefekt
Joined: 21 Oct 2010 Posts: 85
|
|
Posted: Sun Apr 17, 2016 6:37 am |
|
|
Is there a driver available for FRAM?
I found a driver for Ramtron FM24C256, but this chip is no longer available. Cypress FM24W256 seems the follower for the FM24C256.
Can I use the driver for FM24W256 or is there another FRAM driver? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sun Apr 17, 2016 11:04 am |
|
|
Research the topic. Type this into Google:
Quote: | FM24W256 vs. FM24C256 |
Several hits discuss the compatibility of these two chips.
Note this significant difference:
Quote: | Power-Up to First Access
Power-up to first access specification is added in FM24W256 device.
Ensure that the FM24W256 device is accessed only after 1 ms from power-up. |
|
|
|
Prefekt
Joined: 21 Oct 2010 Posts: 85
|
|
Posted: Tue Apr 26, 2016 11:23 pm |
|
|
The FM24W256 works and it's fast!
Thank you for your help! |
|
|
|