This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

i2c baud rate

i posted this here now because i am new to this forum and accidentally posted on another thread and got severely flamed.

i use the processor PSD3233QAT-RF

i've got a question about i2c function.
1) is it true that i can set any fixed baud rate (clock) from 0 to 100KHz?
2) if i set the bit I2CFREQ, what value should i put into the register if i'm using crystal 4MHz?
4) if i set the bit I2CFREQ2,SMP=0, is the baud rate fixed to 400KHz or i'm free to set any baud rate from 0 to 400KHZ? what value should i put into I2CADD then using a 20MHZ crystal?

answers are appreciated.
Thank you.

  • what?

    why is it that the only responses i've had are when i posted this message in the wrong place?

  • 1) is it true that i can set any fixed baud rate (clock) from 0 to 100KHz?
    what you can set will be in the datasheet for your device.
    you can run any IIC device at 0.0000000001Hz to 100kHz, you can run most IIC device at 0.0000000001Hz to 400kHz you can run some IIC device at 0.0000000001Hz to 1MHz.

    the answers to 2) and 3) will be in the fdatasheet for your device

    Erik

  • IIC does NOT have a 'baud rate' it does have a 'bit rate'

    Erik

  • erik,

    thank you for the helpful reply. i was starting to wonder if the only responses i would get here were from flamers!!!

    ps; yes i understand what you say aboot baud rate and iic

  • beware that if your device is SMB, not IIC (sometimes you will se things misnamed) there IS a minimum speed.

    sorry about posting as afterthoughts, it is early here.

    Erik

  • why is it that the only responses i've had are when i posted this message in the wrong place?

    A lot of people can spot posts that have been sent to the wrong thread, or posts that misses important information.

    When you have supplied all required information, it may then require people with knowledge about your specific processor to know the answer to processor-specific questions.

    However, unless the chip designers are fools, you should be able to program a wide range of bit rates, and the data sheet should specify the equation needed to figure out what value you should use, given the original oscillator frequency. And the datasheet for the device should inform you of any limitations for the specific device.

    You will obviously not be able to set any bit rate down to zero, since to existing chip has the capability to divide the clock source an infinite number of times. If you apply the formula from the datasheet, you will see how slow you can manage to configure the I2C controller - the register you program has a limited number of bits. The specification will also say if you may use any value from zero to all bits=1, or if there are forbidden values. It isn't uncommon that there is a minimum value allowed to program in dividers.

  • What flamers? Getting a response telling you that you have done something wrong - or haven't specified all required information - is not flaming.

    Would you prefer that people lie to you? Maybe we should assume any random chip, and give answers specifically for the chips _we_ uses? Would that make you happy?

    When your internet cable is smelling sulfur, you will know that you are being flamed ;)

  • Hello Jeffery,

    I am not familiar with the PSD3233QAT-RF, but we have worked with the uPSD3233B, uPSD3233BV devices.

    Keil does have some source code for a 3300 device, that could be ported to work with the 3200 series.

    If you have installed the Keil C51 evaluation tools, the example will be found on your hard drive at:

    \Keil\C51\Examples\ST uPSD\upsd3300\DK3300-ELCD\I2C

    The upsd3300_i2c.c file allows you to set the timing of the I2c Connection, based on a Bus Frequency and a Frequency Oscillator.

  • all IIC hardware implementations I have seen with the exception of the SILabs deviates have been quite similar (exept for clocking).

    I believe that the PDS chips are a Crolles/Crolles2 design (i.e. same root as Philips) and, in that case, you can use CodeArchitect free from http://www.esacadfemy.com to get you started.

    You should be able to determine if you can in 10 minutes or less.

    Erik