- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello all ,
i have the psoc 4 pioneer kit .
i am trying to implement an ezi2c slave with 5 registers in it .
and i want to write to a specific register from the bridge control panel
without overwriting the other registers.
if i write to offset 00 - i can write to the first register
bridge panel command i send: w 13 00 aa p;write to address 13 with offset 00 ,data to reg1 aa
if i write to offset 00 , 2 commands in a row i can write to both of my registers
bridge panel command i send: w 13 00 aa bb p;write to address 13 with offset 00 ,data to reg1 aa ,data to reg2 bb
but i want to write only to register 2 ,if try to write to offset 01 some data it still writes to the first register
bridge panel command i send: w 13 01 bb p;write to address 13 with offset 01 ,data to reg2 bb .
can someone please tell me what is the bridge control panel command
i need to send in order to write just to register 2 ??
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
w 13 00 aa command write 0xaa to Registers[0] only, other array elements just keep current value no change.
w 13 00 aa bb write 0xaa to Registers[0] and 0xbb to Registers[1] , other array elements just keep current value no change
w 13 01 bb write 0xbb to Registers[1] only, other array elements just keep current value no change, no over write happen.
w 13 00 00 p w 13 01 bb clear Registers[0] to 0x00 and write 0xbb to Registers[1],
If you send command w 13 01 bb p w 13 00 r 13 x x x x x p just after silicon powered up, then you can see only reg2 is changed to 0xbb, others keeps 0x00, 'p' means send i2c stop condition, w 13 00 used to change offset to 0x00.
You can refer Bridge Control Panel Help file to get more details of command format.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
w 13 00 aa command write 0xaa to Registers[0] only, other array elements just keep current value no change.
w 13 00 aa bb write 0xaa to Registers[0] and 0xbb to Registers[1] , other array elements just keep current value no change
w 13 01 bb write 0xbb to Registers[1] only, other array elements just keep current value no change, no over write happen.
w 13 00 00 p w 13 01 bb clear Registers[0] to 0x00 and write 0xbb to Registers[1],
If you send command w 13 01 bb p w 13 00 r 13 x x x x x p just after silicon powered up, then you can see only reg2 is changed to 0xbb, others keeps 0x00, 'p' means send i2c stop condition, w 13 00 used to change offset to 0x00.
You can refer Bridge Control Panel Help file to get more details of command format.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks .
i cannot understand the read operation ,
if i write : w 13 00 aa bb p
and then perform read operation :
but if i write : w 13 01 bb p
i know only Registers[1] = bb because the led starts to blink .
but if i try to read that register value its seems to appear in the Register[0] index
and not on Register[1] as i expected :
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Offset can only be set(and must be set) when you use write command. if you read, it will read data out from the offset you set last time.
w 13 00 aa bb p write offset 00 into ezi2c, then if you use r 13 x x x p, will read data out from offset 00.
w 13 01 bb p set offset to 01, the if you sue r 13 x x x p, the data is read out from offset 01. You actually didn't read register[0] out at all.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you xzng ,
so after i perform a write operation with an offset,
and then i want to read all of my registers (even those before that offset)
how can i do that ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
w 13 00 ; set offset to 00
r 13 x x x x x; read data our from offset 00
or use command 'r 13 00 p r 13 x x x x x'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you so much
For your time xang