Talk I2C with JTAG Live Script

Want to use JTAG to test and program serial devices that use I2C bus interfaces? With Script from JTAG Live it's a breeze.

 

Script users can request the generic Python modules needed to make talking with I2C devices simplicity itself, via . Simply declare the pin IDs of the I2C master and start using the routines in the prepared module.

 

With the I2C routines you can capture values from serial ADCs (Analog to Digital converters) and program RTCs (RealTime Clocks) with ease.  Add some File I/O routines and you can even program serial PROM devices based on I2C protocol.

 

These routines can also be easily adapted for other protocols such as SPI bus.

Cool_I2C

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Sample routines within the module include:

 

#Mandatory statement required at beginning 

Declare_I2C_Pins(SCL,SDA)

 

#Set 7-bit address of I2C device.

Set_I2C_Address(VarValue)    #VarValue = 7 character string. eg "1101000"

 

#Execute an I2C read operation and compare the byte read back against VarValue.

 READ(VarValue)   #VarValue = 8 character string. eg "00000001"

 

#Execute an I2C write operation. Write a byte of data VarValue

WRITE(VarValue    #VarValue = 8 character string. eg "00001001"

 


back to overview