Announcements
IMPORTANT: Cypress Developer Community is transitioning on October 20th. To learn more and be prepared for this change, check out our latest announcement.
cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

Anonymous
Not applicable
        Hi, I’m using the Ezi2cDesign example that creates RAM that other devices can access through I2C. It appears that I2C supports sizes of both 8 bit and 16 bit data values. I’d like to store 32 bit values. Is there a way to do this without breaking it into two “chunks” ? I realize the other devices that read the values need to read 8 bit or 16 bit values. Just wonder if the PSoC can write to the RAM in 32 bit values. I’d like to make storing 32 bit values the least expensive as possible. I haven’t decided on a processor so if there is a PSoC that handles this better or if there is way to do this better, I’m open . . . Cheers !   
0 Likes
3 Replies
Bob_Marlowe
Expert II

The I2C bus is a byte-wide serial transmition, so all transfers have to be made in byte chunks. Nevertheless I2C allows for transmitting (nearly) unlimited streams of data. There will be no performance loss when transmitting larger amounts of data.

   

When interchanging data between different CPUs you have to observe the chapter "Handling endianess" in the datasheet.

   

 

   

Bob

0 Likes
ETRO_SSN583
Esteemed Contributor

There is a buffer write API. So you could have an array or a structure,

   

both of which you know their length, and R/W them at will using buffer

   

write f(). Structure has advantage of mixed variable types.

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable
        Bob, Dana, That save me time to finally sort this out. Thank you, both !   
0 Likes