04-03-2017 07:53 AM
I am working on a project desigining i2c slave module on spartan 3E . I completed the code and now i need to send the serial data to spartan 3E, which has max voltage at pins (lvcmos33) as 3.3v. But the microcontroller (atmega) i am using has output drive of 4.8v (SCA, SDL). So do i have to use level shifters or is there an other way.
I also read some where that using series resistances (after some calculation) will do the job by limiting the current below 10ma.
But i didn't understood it well.
04-03-2017 09:19 AM
In I2C systems devices only drive Low (0). The High (1) level is created by pull-up resistors. So if you connect your pull-up resistors to 3.3v the maximum High level will be 3.3v.
04-03-2017 07:29 PM
As @chapman has said, the high voltage in an I2C system can be set just by setting the pull-up resistors.
Technically a 5V AVR requires the high-level voltage on I2C to be over 3.5V, but most people seem to have no trouble with the bus at 3.3V. To be safe a level shifter should be used.
04-04-2017 05:03 AM
04-04-2017 06:42 AM
Pretty much any pins. Obviously you want some that are 3.3V-compatible (ie on an I/O bank powered by 3.3V), and you need to avoid fixed-function pins (eg. JTAG, power/ground, etc). Apart from that, pick any two pins near each other (to make wiring easier) that aren't being used.
04-11-2017 09:56 AM
04-12-2017 05:23 AM
Given the relatively low speed of I2C you would normally treat both SCL and SDA as logic signals in your design. Internally, you would use a high speed clock to sample these signals or drive them. It's worth noting that an I2C slave is also allowed to drive SCL to slow down the communication rate of the master (i.e. clock stretching) so SCL isn't a normal free-running 'clock'. Once you treat both SCL and SDA as ordinary bidirectional signals you will have no issues assigning them to any I/O pins.