discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] DBSRX, I2C Interface Verification


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] DBSRX, I2C Interface Verification
Date: Thu, 8 Feb 2007 15:04:30 -0800
User-agent: Mutt/1.5.9i

On Thu, Feb 08, 2007 at 05:25:47PM -0500, Gregory W Heckler wrote:

> I need to verify that the I2C write commands 
> are getting through to the Max2118. For the Max2118 3 bytes are written 
> over the I2C to write a single register, they are:
> 
> 1) (Device address<<1) + write bit
> 2) Register address (0...5)
> 3) Register value
> 
> I noticed that in the python code the first byte is left out, is this 
> taken care of by the FPGA?

Yes, that's why you pass the i2c_addr to the write_i2c method, just
like the read_i2c method.

  /*!
   * \brief Write to I2C peripheral
   * \param i2c_addr            I2C bus address (7-bits)
   * \param buf                 the data to write
   * \returns true iff successful
   * Writes are limited to a maximum of of 64 bytes.
   */
  bool write_i2c (int i2c_addr, const std::string buf);

  /*!
   * \brief Read from I2C peripheral
   * \param i2c_addr            I2C bus address (7-bits)
   * \param len                 number of bytes to read
   * \returns the data read if successful, else a zero length string.
   * Reads are limited to a maximum of 64 bytes.
   */
  std::string read_i2c (int i2c_addr, int len);



Eric




reply via email to

[Prev in Thread] Current Thread [Next in Thread]