Command Format using I2C

Hi,

What is the command format for I2C ? Is it similar to UART or SPI ?

The datasheet Pg 17 says that the payload is processed internally exactly the same as UART.

So to send a version command do we send a write command followed by a read ?
Write to ALFAT 0xA4 'V’

Read 0xA5 ?

Please confirm ?

I’m a little lost going through the manual.

Also the code examples provided, does it have one pertaining to I2C. I saw UART and SPI and a basic driver program.

To read

Send address with read bit then read

To write

Send address with write bit then read

The data you read or write is exactly same as if it was UART, except on UART, there is no addressing.

I communicated to the ALFAT board using a terminal program. Tried the “Set Current Time & Date” command with the format as shown in the manual S34212002. The ALFAT acknowledges and it and I get a
!00
!00
response indicating no error code.

However when I send GD command to get the current date, it gives the date that was set in the system initially, 01/01/1980.

Am I doing something wrong ? Please advice.

IIRC, there is a command to init the clock before you set the time.

Thanks Gus. That’s the caveat, send TS followed by the GD command.