Anonymous
Not applicable
Jun 26, 2014
07:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 26, 2014
07:51 AM
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 !
Labels
- Labels:
-
PSoC 3
3 Replies
Jun 26, 2014
09:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 26, 2014
09:09 AM
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
Jun 26, 2014
09:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 26, 2014
09:59 AM
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.
Anonymous
Not applicable
Jun 27, 2014
10:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 27, 2014
10:40 AM
Bob, Dana, That save me time to finally sort this out. Thank you, both !