Use I2C to operate the at88 encryption Chip

Source: Internet
Author: User
1. Power-on sequence, omitted directly


2. waitclock sends two bytes of 0x00 to the I2C bus. The specific method is to write a byte 0x0 to the address 0.
3. Run the "0xb8 00 00 0x0a" command to directly return the command and data.
The rule of at88 is to send commands before reading and writing data each time. Therefore, reading and writing data must contain commands.
The Data Writing operation is very simple. The first byte of the command is used as the address, and the rest of the command and data are used as the general data transmission.
Read operations are a little more complex. The timing of at88 is not standard I2C, but is generally compatible. I2C cannot implement the normal read sequence described in at88, but it can be replaced by the random read operation. The specific implementation is to first send the write data command "0xb4 xx N", where "xx n" represents the address and Data Length. At this time, nack should be used. Then use "0xb1" as the address to read.
For example, to read data, run the "0xbx bb cc n" command to read n bytes of data. perform the following operations using I2C: write three bytes to I2C with the address "0xb4" and the last three bytes of the command "bb cc n". Therefore, the I2C should ignore nack. Then read n bytes of data with the address "0xbx.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.