01.06.2013 Views

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Interrupt 0xAA service 0x82: Transmit / Receive Character<br />

Parameters<br />

AH<br />

AL<br />

CL<br />

Send or receive a single character.<br />

0x82<br />

Slave address, LSB:0 => Transmit, LSB:1 => Receive<br />

If Transmit: CL = Byte to transmit<br />

If Receive: CL = 0 for last char to be received<br />

Return Value<br />

Comments<br />

Success: Carry flag cleared and CH contains received byte (if receiving)<br />

Failure: Carry flag set and AL contains I2C error code<br />

The <strong>IPC<strong>@CHIP</strong></strong> is the I2C bus master.<br />

The least significant bit of the slave address determines the direction of the communication.<br />

Even address: Master sending to slave<br />

Odd address: Master receiving from slave<br />

If the direction or the slave address changes, this functions executes the I2C restart function<br />

automatically. This will insert a I2C start condition on the bus. After this, the I2C address is send again.<br />

I2C error codes:<br />

Related Topics<br />

Top of list<br />

Index page<br />

8: Timeout<br />

9: Slave faulty or not available<br />

I2C Transmit/Receive Block<br />

Interrupt 0xAA service 0x83: Transmit/ Receive Block<br />

Parameters<br />

AH<br />

0x83<br />

Page 318 / 400

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!