- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi to all,
i want to interface EEPROM to Psoc 3 Externally,can any body help in this regard.
Regards
PRP
Solved! Go to Solution.
- Labels:
-
PSoC 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi PRP,
Which EEPROM device are you planning to interface with PSoC?
In general, EEPROMs support I2C interface. In that case PSoC should act as an I2C Master and the EEPROM device as a slave.
Some EEPROM devices also have the provision of setting their addresses (last 2 bits or so) externally, so that multiple EEPROM devices can be made available on the same bus thereby increasing the memory available.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi PRP,
Which EEPROM device are you planning to interface with PSoC?
In general, EEPROMs support I2C interface. In that case PSoC should act as an I2C Master and the EEPROM device as a slave.
Some EEPROM devices also have the provision of setting their addresses (last 2 bits or so) externally, so that multiple EEPROM devices can be made available on the same bus thereby increasing the memory available.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To add to my previous comment, there are also SPI based EEPROMs available.
The SPI based EEPROMs can be accessed at a faster rate (typically 3MHz SPI Clock). These EEPROMs may support 8-bit or 16-bit data formats.
PSoC should act as an SPI in this case, with apporpriate mode selected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Gautham,
http://www.cypress.com/?id=4&rID=58477 this file i couldnot able to download, please help me in this regard.
Regards
PRP.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have the old version of the project. I think that this project was created in Creator 1.0 Beta 5.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Gautham,
The version of creator i am using is Creator 2.0. may be the project was not compatable so i got the following error.
Error: sdb.M0062: An error occurred trying to retrieve the DRCs for an instance, 'I2C'. Unable to locate and customize component 'I2C_v3_30' used in schematic 'C:\Documents and Settings\Adm\My Documents\PSoC Creator\Example_I2C_EEPROM\Example_I2C_EEPROM.cydsn\TopDesign\TopDesign.cysch'.
Regards
PRP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Gautam,
Actually i am using Del Sig ADC with 8 bit resolution, 8500 SPS, and it will run for 5 seconds so i get too many samples but the RAM avalaible in PSoC 3 is 8 kb only, so i am going for EEPROM interface to accomodate so many samples , is this a correct option any other way?
Regards
PRP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi PRP,
You can update to the latest version, that is, PSoC Creator 2.2
The link to download this version is here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
With the sample rate of 8500, you'll accumulate more than 42K bytes of data in 5 seconds.
You can use external 64KB or 128KB EEPROM to store these samples.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
PSOC 3 EEPROM write speed is 1 row in <= 20 mS, a row being 16 bytes.
So effective write speed is <= 800 bytes/sec, too slow for your sample rate.
You could write FLASH onboard -
http://www.cypress.com/?app=forum&id=2232&rID=41766
http://www.cypress.com/?rID=44327
Alternatively you could use external NOR FLASH, programming times 256 bytes in 3 mS.
External EEPROM now offered in very fast versions -
http://www.storagenewsletter.com/news/flash/stmicroelectronics-eeprom-m35b32
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Dana,
Can we use SD card with memory 1GB or 512KB in place of EEPROM , if we use sd card is there any timing resonse problem occurs.
Regards
PRP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
emFile module can handle the SDCARD. Look at datasheet for config vs
write speeds achievable.
Other solutions -
http://code.google.com/p/psoc3-5-sdcard-library/
Although this is a bootloader could be adapted -
https://github.com/kmmankad/SDBoot
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On second look SDCARD as a byte write memory may not be approach.
You need to acquire sampes at a rate of 8500 SPS ~= 100 uS/byte which is too
fast for byte write speed of SDCARD.
You could use a ping-pong approach, 2 buffers in RAM, one active gathering samples, the
other full from prior gather and being written to SDCARD, say 1KB each. Max speed of write
for SDCARD,to write1K samples, is ~ 36 mS, compared to 1K samples to gather which is ~
118 mS. So record 1KS in buffer A, then switch to B and start recording while writing buffer A
to SDCARD, repeat this loop. So switch between buff that is being recorded/buff being written
back and forth.
You can do the calculations for smaller buffer size, to see if that works out.
Regards, Dana.
gather 1000 samplesin RAM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you only need intermediate storage, you might also use a serial sRAM. Microchip has 1 MBit ones available (e.g. 23LC1024: http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en559066 ). They follow basically the same protocol as the serial EEPROMs, but are much faster. And they have no limits on how often you are allowed to write (and they don't need to be erased before one can write).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi hli,
Can we use Flash Meomory in place of EEPROM to increase Size of SRAM.
Regards
PRP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
"Can we use Flash Meomory in place of EEPROM to increase Size of SRAM."
SRAM is a single cycle R/W memory. Has no lifetime limit on R/W cycles
FLASH, EEPROM is a 20 mS write speed technology. FLASH specs written
aorund 100,000 erase cycles. EEPROM 1,00,000 erase cycles
You could substitue FLASH if you an live with slower write speed and limited
erase lifetime.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
uint16 ADC_Samples[ ];
int16 ADC_Sample_Index = 0;
writeStatus = EEPROM_1_Write(ADC_Samples[ADC_Sample_Index++], 0);
ERROR: .\main.c:108: illegal pointer conversion
i got the following error, but given in data sheet is cystatus EEPROM_Write(uint8 * rowData, uint8 rowNumber) , which is not matching with uint16 ADC_Samples[ ]; , the ADC here is 14 bit . So is there any way to overcome this problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can type-cast the pointer:
writeStatus = EEPROM_1_Write((uint8_t*)ADC_Samples[ADC_Sample_Index++], 0);
(did not try to compile it, though). Note that this call always write 16 bytes of data into the EEPROM. You might want to use EEPROM_ByteWrite() instead.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you trying to write individual samples or a whole row of samples ?
You use either
cystatus EEPROM_ByteWrite(unit8 dataByte, uint8 rowNumber, uint8 // to write a byte at a time, so would take 2 writes
or
cystatus EEPROM_Write(const uint8 * rowData, uint8 rowNumber) // to write a whole row, row size is
CYDEV_EE_BASE The base pointer of the EEPROM memory
CYDEV_EE_SIZE The size of the EEPROM memory space in bytes
CYDEV_EEPROM_ROW_SIZE The size of a row of the EEPROM in bytes
So there are several ways to write the EEPROM
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hli had a small typo in write, should be -
writeStatus = EEPROM_1_Write((uint8 *)ADC_Samples[ADC_Sample_Index++], 0);
However, row method wastes memory if you are not writing a whole row's worth of samples. In other words, if ROW is 16 bytes, write 8 A/D samples would be optimal.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi hli, dana,
the following error came ERROR: .\main.c:108: 'uint8_t': undefined identifier , here i am writing sample by sample from ADC to EEPROM.
copy of code
----------------------------
if (ADC_DelSig_1_IsEndConversion(ADC_DelSig_1_WAIT_FOR_RESULT))
{
/* Get the result */
ADC_Current_Sample = ADC_DelSig_1_GetResult16();
ADC_Sample_Available = 1;
/* Testing for sample available from the ADC */
if (ADC_Sample_Available)
{
ADC_Sample_Available = 0;
/* storing the sample into the array, based on the index */
ADC_Samples[ADC_Sample_Index++] = ADC_Current_Sample;
// EEPROM INTERFACE//
writeStatus = EEPROM_1_ByteWrite((uint8_t*)ADC_Samples[ADC_Sample_Index++], 0);
ADC_Sample_Max = 0;
for (i = 0; i < ADC_Sample_Index; i++)
{
if(ADC_Samples>ADC_Sample_Max)
{
ADC_Sample_Max=ADC_Samples;
}
-----------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In my prior post, change
writeStatus = EEPROM_1_Write((uint8_t *)ADC_Samples[ADC_Sample_Index++], 0);
to
writeStatus = EEPROM_1_Write((uint8 *)ADC_Samples[ADC_Sample_Index++], 0);
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi dana,
i have changed to writeStatus = EEPROM_1_Write((uint8 *)ADC_Samples[ADC_Sample_Index++], 0); , but not working.
Regards
PRP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I compiled OK, but had to change -
uint16 ADC_Samples[ ];
to
eg. give it a size.
Also I used Creator 2.2, and had to change silicon to non ES2. Lastly
I also updated a number of modules at request of Creator, normal for
using a later version of Creator.
Regards, Dana.
uint16 ADC_Samples[ 16 ]; // Not sure what size you intend
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Blasted forum software screwed up post.
change -
uint16 ADC_Samples[ ];
to
uint16 ADC_Samples[ 16 ];
Regards, Dana.