PreviousNext
Memory read plus 1
Help > Peripherals > FRC > Embedded FRC Commands > Memory read plus 1

FRC_MemoryReadPlus1 = 0x83

 

Same as Memory read but 1 is added to the returned byte to prevent returning 0. This means that this FRC command cannot return the 0xFF value.

 

Example 1

 

This example returns byte+1 being read from EEPROM peripheral at address 3. EEPROM Read DPA Request will be executed and then a byte from _DpaMessage.Response.PData[0] (the request stores the result/response there) will be returned. The actual address of this byte is 0x4A0. See .h or .var files for details.

 

FRC command = FRC_MemoryReadPlus1 = 0x83

Memory address = 0x4A0

PNUM = PNUM_EEPROM = 0x03

CMD = CMD_EEPROM_READ = 0x00

Length = 2 = Two data bytes

PData[0] = 3 = Read from EEPROM address 3

PData[1] = 1 = Read one byte from EEPROM