I2C Get Packet; Set Baud Rate - Philips PC-Link Manual

Table of Contents

Advertisement

will send start condition, 0xD0 (I
0x01, 0x02, 0x03, and stop condition.

3.2.18. I2C GET PACKET

Is used to command the module to read 1 data packet via I
Host Command
Module
Response
ADDR parameter is the I
COUNT parameter is the amount of data that will be read.
This command will only perform the reading process. To choose the data
address that will be read (for example, accessing EEPROM), data address can
be determined previously using the I2CSENDPACKET.
Module will send start condition, I
data as many as COUNT, and send stop condition.
If packet is recognized and correct, module will respond with data reading
results (maximum of 32 bytes).
If the packet is false/not recognized, module will respond with NACK (0xEE).
Example:
PC
USB Smart I/O
means that the computer commands the module to read 1 byte of I
with 0xD1 address. Module replies that the reading results via I

3.2.19. SET BAUD RATE

Is used to set UART baud rate.
Host Command
Module Response
BAUDRATE parameter is the baud rate value code.
Code 1 = baud rate 9600 bps
Code 2 = baud rate 19200 bps
Code 3 = baud rate 38400 bps
Code 4 = baud rate 57600 bps
This setting will be saved in EEPROM so it will not be erased when module is
powered off.
If packet is recognized and correct, module will respond with ACK (0xAA).
If the packet is false/not recognized, module will respond with NACK (0xEE).
Example:
PC
USB Smart I/O
will set baud rate to 38400 bps.
2
C device write address that will be accessed),
Byte Count
Command
3
0x27
2 – 33
0x27
1
0xEE
2
C device address that will be accessed.
2
C device read address (ADDR|0x01), read
: 0x58 0x03 0x27 0xD0 0x01 0xAD
: 0x58 0x02 0x27 0x03 0x7C
Byte Count
2
1
: 0x58 0x02 0x30 0x03 0x73
: 0x58 0x01 0xAA 0xFD
15
2
C line.
Parameter
ADDR
1 – 32 byte
-
2
C is 0x03.
Command
Parameter
0x30
BAUDRATE
0xAA
0xEE
COUNT
2
C device
-

Advertisement

Table of Contents
loading

Table of Contents