User manual
PICkit™ Serial Analyzer DLL
© 2007 Microchip Technology Inc. DS51647A-page 97
10.3.7 PICkitS.Basic.Reset_Control_Block()
Returns: True if successful, False if not
Inputs:None
Description: Attempts to clear status flags set during a read or write error by issuing cold
then warm Resets while preserving control block contents. Issue this function
call after a read or write failure.
10.3.8 PICkitS.Basic.Retrieve_USART_Data(uint p_byte_count, ref
byte[] p_data_array)
Returns: Data from USART bus
Inputs: p_byte_count: number of bytes to read
p_data_array: Reference to an array of bytes
Description: reads a number of bytes from the USART bus and stores them in p_data_array
array. p_data_array must be at least p_byte_count in size.
10.3.9 PICkitS.Basic.Send_I2CRead_Cmd(byte p_slave_addr, byte
p_start_data_addr,byte p_num_bytes_to_read, ref byte[]
p_data_array,ref string p_script_view)
Returns: True if successful, False if not
Inputs: byte p_slave_addr - I
2
C slave address of UUT
byte p_start_data_addr - I
2
C command code or address of memory to begin
reading
byte p_num_bytes_to_read - number of bytes to be returned
byte[] p_data_array - reference to byte array that will store retrieved data
-must be at least as large as p_num_bytes_to_read
string p_script_view - reference to a string to which will be copied a formatted
view of the command
Description: Attempts to perform I
2
C read command using above parameters. If success-
ful, p_num_bytes_to_read is copied into p_data_array. It is the user’s 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.10 PICkitS.Basic.Send_I2CWrite_Cmd(byte p_slave_addr, byte
p_start_data_addr,byte p_num_bytes_to_write, ref byte[]
p_data_array,ref string p_script_view)
Returns: True if successful, False if not
Inputs: byte p_slave_addr - I
2
C slave address of UUT
byte p_start_data_addr - I
2
C command code or address of memory to begin
writing to
byte p_num_bytes_to_write - number of bytes to be written
byte[] p_data_array - reference to byte array that holds data to be written
string p_script_view - reference to a string to which will be copied a formatted
view of the command
Note: This function issues the I
2
C Read Bytes Nack Last Byte command, not the I
2
C
Read Bytes command.