CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

pic selection
Goto page 1, 2  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Prefekt



Joined: 21 Oct 2010
Posts: 85

View user's profile Send private message

pic selection
PostPosted: Wed Apr 06, 2016 11:33 am     Reply with quote

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: 9229
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Apr 06, 2016 11:50 am     Reply with quote

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

View user's profile Send private message AIM Address

PostPosted: Wed Apr 06, 2016 1:20 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Apr 06, 2016 9:18 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Apr 11, 2016 4:06 am     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Apr 11, 2016 6:53 am     Reply with quote

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

View user's profile Send private message AIM Address

PostPosted: Mon Apr 11, 2016 7:44 am     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Apr 11, 2016 9:15 am     Reply with quote

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

View user's profile Send private message AIM Address

PostPosted: Mon Apr 11, 2016 9:22 am     Reply with quote

Quote:
It's an 25LC640 eeprom


Endurance: 1M cycles (guaranteed)

i take such guarantees at no more than 30% of "face value"
Very Happy Very Happy Very Happy
gpsmikey



Joined: 16 Nov 2010
Posts: 588
Location: Kirkland, WA

View user's profile Send private message

PostPosted: Mon Apr 11, 2016 9:47 am     Reply with quote

asmboy wrote:
Quote:
It's an 25LC640 eeprom


Endurance: 1M cycles (guaranteed)

i take such guarantees at no more than 30% of "face value"
Very Happy Very Happy Very Happy


I wonder what their "guaranteed" bit is - double your data back if it fails?? Twisted Evil

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

View user's profile Send private message

PostPosted: Mon Apr 11, 2016 11:55 pm     Reply with quote

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: 9229
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Apr 12, 2016 5:34 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sun Apr 17, 2016 6:37 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sun Apr 17, 2016 11:04 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Apr 26, 2016 11:23 pm     Reply with quote

The FM24W256 works and it's fast! Very Happy

Thank you for your help!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group