I2C0 CLK [frequency]
I2C0 CLK ?
frequency
parameter can be set to any frequency from 100000 Hz to 3400000 Hz in 1000 Hz steps.I2C0 ADDR [format]
I2C0 ADDR ?
format
parameter can be set to either 7BIT
or 8BIT
.I2C0 PULL [state]
I2C0 PULL ?
state
parameter can be controlled by the following:1
, ON
, or EN
.0
, OFF
, or DIS
.I2C0 SCAN
I2C0 SCAN [address]
address
parameter can be set to any valid 7-bit I2C device address.-I2C0 SCAN [address]
followed by either OK
if a device was found with that address, or NG
if no device was found. In the case of scanning the entire bus for device, upon the completion of the scan a summary will be reported: -I2C0 SCAN OK [n] DEVICES
where n
indicates the number of devices discovered on the bus.I2C0 WRITE [data]
I2C0 WRITE BUF[n] [count]
data
parameter can be any valid 8-bit integer (byte) of data to send.count
parameter is the number of bytes to be sent from the buffer, from 1 to 256.I2C0 REQ [address] [count]
I2C0 REQ [address] BUF[n] [count]
address
parameter can be any valid 8-bit I2C device address.count
parameter is the number of bytes to be requested, from 1 to 256.I2C0 RXD
followed by the received bytes separated by spaces. If the command fails, the function will return a NAK Response.I2C0 START [address]
address
parameter can be any valid 8-bit I2C device address.I2C0 END
I2C0 END R
I2C0 WHR [hex7BitAddress] [endStop] [bytesToRead] [bytesToWrite] [hexPayload]
hex7BitAddress
is the address of the I2C peripheral device. This parameter should be entered in hex with a leading "0x".endStop
parameter is used to send a repeated start bit if desired. This parameter can be either 0
to follow the transaction with a repeated start bit, or 1
to send an I2C stop bit.bytesToRead
parameter instructs Nova how many bytes to read from the target I2C peripheral device after the write operation has completed. This can be 0
to 1024
.bytesToWrite
parameter indicates the number of bytes to write to the target I2C peripheral device on the bus. This value can be from 0
to 1024
and must match the length of the hexPayload
parameter.hexPayload
parameter is the data that will be written to the I2C peripheral device. This parameter should be entered as a string of hex values without a leading "0x" and no spaces. The length must match the bytesToWrite parameter.OK
or NG
when the WHR command is used only to write data (bytesToRead = 0) to an I2C Peripheral device. When the WHR command is used to perform a read operation (bytesToRead > 0), the response will contain the requested number of data bytes read from the I2C peripheral device, or NG
indicating that command failed to execute successfully.I2C0 SLAVE [address]
I2C0 SLAVE ?
address
parameter can be any valid 8-bit I2C peripheral device address.I2C0 SLAVE MODE [mode]
I2C0 SLAVE MODE ?
mode
parameter can be either USEPTR
or STARTZERO
.I2C0 SLAVE REGCNT [count]
I2C0 SLAVE REGCNT ?
count
parameter can be any integer value from 1 to 256.I2C0 SLAVE REG [register] [value]
I2C0 SLAVE REG [register] ?
register
parameter can be any integer value from 0 to the number of registers configured in the device using the REGCNT
command, a max of 255. This parameter can also be PTR
to access the pointer register.value
parameter can be any integer value from 0 to 255.I2C0 SLAVE READMASK [register] [value]
I2C0 SLAVE READMASK [register] ?
register
parameter can be any integer value from 0 to the number of registers configured in the device using the REGCNT
command, a max of 255.mask
parameter can be any integer value from 0 to 255, where a 1 corresponds to granting read access to the corresponding bit in the register.READMASK
register to the desired value for the specified register. If the command fails, the function will return a NAK Response.I2C0 SLAVE WRITEMASK [register] [value]
I2C0 SLAVE WRITEMASK [register] ?
register
parameter can be any integer value from 0 to the number of registers configured in the device using the REGCNT
command, a max of 255.mask
parameter can be any integer value from 0 to 255, where a 1 corresponds to granting write access to the corresponding bit in the register.WRITEMASK
register to the desired value for the specified register. If the command fails, the function will return a NAK Response.