User manual
PICkit™ Serial Analyzer User’s Guide
DS51647A-page 98 © 2007 Microchip Technology Inc.
Description: Attempts to perform I
2
C Write command using above parameters. If success-
ful, p_num_bytes_to_write bytes are written to the UUT beginning at
p_start_data_addr. Regardless of success or failure, the PICkit™ status
packet is updated after the write attempt and stored for retrieval by the function
Get_Status_Packet.
10.3.11 PICkitS.Basic.Send_SPI_Receive_Cmd(byte
p_num_bytes_to_read, ref byte[] p_data_array, bool
p_first_cmd, bool p_last_cmd, ref string p_script_view)
Returns: True if successful, False if not
Inputs: byte p_num_bytes_to_read - number of bytes to byte[] p_data_array -
reference to byte array that will store retrieved data
bool p_first_cmd - flag for first command, set to true if this is the first (or only)
command in a group of commands. This will prepend the assert Chip Select
byte (0x8B) to the command
bool p_last_cmd - flag for last command, set to true if this is the last (or only)
command in a group of commands. This will append the de-assert Chip Select
byte (0x8C) to the command
string p_script_view - reference to a string to which will be copied a formatted
view of the command
Description: Attempts to perform SPI read command using above parameters. If success-
ful, p_num_bytes_to_read is copied into p_data_array. It is the users respon-
sibility to ensure p_data_array has enough room. Regardless of success or
failure, the PICkit ™ status packet is updated after the read attempt and stored
for retrieval by the function Get_Status_Packet.
10.3.12 PICkitS.Basic.Send_SPI_Send_Cmd(byte p_byte_count, ref
byte[] p_data, bool p_first_cmd, bool p_last_cmd, ref string
p_script_view)
Returns: True if successful, False if not
Inputs: byte p_byte_count - number of bytes to write
byte[] p_data_array - reference to byte array that holds data to be written
bool p_first_cmd - flag for first command, set to true if this is the first (or only)
command in a group of commands. This will prepend the assert Chip Select
byte (0x8B) to the command
bool p_last_cmd - flag for last command, set to true if this is the last (or only)
command in a group of commands. This will append the de-assert Chip Select
byte (0x8C) to the command
string p_script_view - reference to a string to which will be copied a formatted
view of the command
Description: Attempts to perform SPI write command using above parameters.If success-
ful, p_num_bytes_to_write bytes are written to the UUT. Regardless of suc-
cess or failure, the PICkit ™ status packet is updated after the write attempt
and stored for retrieval by the function Get_Status_Packet.
10.3.13 PICkitS.Basic.Send_USART_Cmd(byte p_byte_count, ref byte[]
p_data, ref string p_script_view)
Returns: True if successful, False if not
Inputs: byte p_bytes_count - number of bytes to send
byte[] p_data- data to send to USART bus
string p_script_view - reference to a string to which will be copied a formatted
view of the command
Description: sends data from p_data array to USART bus.