Search Engine

i2c Twi

Add Question

35 Threads found on i2c Twi
Hello. I am confused in c programming when a function is called by (pointer to an instance). For example in the code below: /** * Set the i2c bus speed in conjunction with the clock frequency. * param p_twi Pointer to a twi instance. * ul_speed: The desired i2c bus speed (in Hz) (ul_speed to DesiredClock) * (...)
dude, that's a i2c memory, not a microcontroller... what exactly do you need? an AVR sample in atmel studio (avr-gcc? or AVRASM?) to write an i2c memory (your at24c512) trough the twi interface? (something like this could
Maybe you need to add some delay (about 100ms) before accessing the i2c bus (after the init)... also this kind of problem arise when you don't check properly the twi status value, maybe a too high pull up value? (I usually don't have problems with a 4.7k or 10k pull up, but it's said that you can lower it more) maybe noise interference? (I had a c
My project is i2c LCD with ATMEGA1284. Project tested in Proteus and also mikroElektronika EasyAVR v7 dev board. Code is written in mikroC PRO AVR compiler and uses twi library. mikroC PRO AVR files and Proteus file are attached.
Hi!! Can anyone share the code for ATtiny85 i2c/twi using USI Hardware??
These might help you. A 8051 software i
Here is a i2c code but not for eepeom. There is i2c example code at saeedsolutions but I can't provide its link as I got a warning that I am promoting that website. I have no interest in promoting any website or
There's already on-chip UART in 89s52. You can use it for simplicity. Is there any specific reason for choosing i2c??? The best common technique for implementing SPI or i2c on 8051's is bit banging by using "RLC" in assembly. Refer to this:
Dear All Following code is for PIC16f877a i2c Start condition void i2cStart(){ SEN = 1; while(SEN); } Can I have the i2c start condition code for XMEGA128A1 MCU Thanks in advance
Have you gone through the relevant twi (Two-Wire Interface) section in the ATMEGA datasheet? And have you gone through the BASCOM manual to check out the library functions for i2c? If not, you should go through these first, familiarize yourself with the i2c module of the ATMEGA, and then, you may ask us questions regarding any doubts or (...)
The uC has the different fixed pin for each interface protocol (except for i2c that i can freely configure it everywhere). Means you are using a software i2c master. ATmega has a hardware i2c, with fixed unique pins. Both should work independent of SPI.
You have to first tell us which EEPROM you are using. The protocol and interface used for communication with PIC must be known. This depends on the EEPROM you are using or are required to use. You may have to use SPI, i2c or even parallel communication. But you must tell us which EEPROM you are using.
Hello eeryone, one question apeared while trying to make full i2c(twi) interupt based driver. main problem is after transmitting nACK when I can set it back inside ISR(); and don't leave i2c hanging with nACK in register that way uC being isolated from i2c line. case 0x40: //SLA+R has been transmitted, ACK has (...)
Hello: i am using ov7690 with at91sam usin MCK at 12.3MHz. but for testing purpose i am using i2c at 153KHz from atmega2560 for SCCB. I can read anyregister from ov7690 but I can't write to any register. the response iscorrect i.e. status register of twi of atmega2560 depicts correcr value,meaning it sends data. but when i read back the
Which compiler are you using? Implement i2c with the twi module in the ATMEGA 8/32. If you need ready-made code and don't want to learn how to do it yourself, google it - you can find lots of codes.
I'm working on a project on Atmega16 and i send data throw i2c from slave to master and the problem here is that the slave receive the address and don't send the data to the master i want to know the error in the code the code of the master #include #include #include twi.h> #define MAX_T
Hello, I have the code shown below which will receive one byte from a slave AVR to a master AVR processor. The for loop call each slave with its address and the slave responds with the "SlaveToMasterByte". I have tried now for a while and I find this a little difficult. My question is how do I expand this code so it can receive multiple b
hi, I am using atmega8 to interface i2c(twi), i am a beginner in i2c. from my knowledge I wrote a code, that is given below. but i don't get any response or status, #include #include #include twi.h> void twi_init(void) { TWBR = 32; (...)
also check this i2c Two Wire Interface Tutorial: PIC 16F877 i2c Code Example : 8051 Microcontroller Projects AVR PIC Projects Tutorials Ebooks Libraries codes
Program written in C. 1024 bytes buffer. Hardware twi support. What twi can do: highlighting steered by PWM positioning everything to a pixel vertical, horizontal and oblique lines [
Hi... I would suggest you to read a twi/i2c tutorial... There you could find some solution & you would get some additional information as well... Disecting & rectifying own code will improve ur knowledge further... Here is 1 tutorial for twi/i2c i2c / twi tutorial: Index : 8051 (...)
Hi, Your possibilities include UART, SPI, i2c(twi), One-Wire Interface, etc. Since there are only 2 controllers, I think UART would be easiest. There are UART modules in many controllers (you haven't told us which you are using), so programming it isn't too difficult, and it only requires 1 wire for unidirectional communication (master to slave) or
Hi, For interfacing two dsPICs, you could use parallel communication, simply just connect one port of one dsPIC to one port on the other dsPIC and send/receive data. A more efficient method would be to use serial communication. You could use SPI/i2c(twi)/UART. UART would be simple and requires only 2 pins (for bidirectional data transfer) or one p
Hi, If you are unwilling to use the LM35 in order to avoid ADC, then using a thermistor will not help, as there you would also need the ADC to measure the change in voltage across it due to change in resistance due to change in temperature. If you are don't want to use ADC, you can use something that uses i2c/twi (TC74) or SPI (TC72) or one-wire(D
Hello everyone, I recently started project with ARMSAM7 microcontroller and ublox GPS receiver working on i2c bus. I'm using twi drivers and free RTOS. Problem is following: I have to configure some parameters on GPS module and after that to poll some messages. After writing configuration message toward GPS module it passes ok on physical l
Hi to every being!!! I am confused with i2c interface use with multi-slave mode. How to determine the address of individual slave it predefined by manufacturer of the slave devices or arbitrarily determine by the user? Pls clearify this issue if possible with an example.... I want to interface 5 temperature sensor equipped with
with RS485? ow long is your communication length??? for small lengths o, in-pcb comm, you could use i2c (twi on avr)
I need a source code with c or assembly that creat communication between two atmega 32 ,one micro as a master and other is slave.but we have not premission to use twi module in micro,assume that we use PIC that has not twi module. TANKS with ALL.
Just allow usage of all io pins, and duplicate spi, twi ports as much as you need. Most of the sensors can be found with i2c interface. Also with serial interface you can comunicate with other pcbs. In my design i use as much dedicated (servo) systems, so if main pcb is jammed, system can survive ...
for AVR i2c: do you want code with internal i2c hardware or software (bit bang) i2c? If you need hardware check atmel website, they have application notes on AVR i2c,atmel use word "twi Interface" instead of i2c.
"i2c" is registered trademark of Philips. So other manufacturers which have i2c support in their hardware mention it as "twi".
SMBUS is an extension of i2c (or twi, as it is also called, to avoid patent disputes with Philips). It has some special limitations and special reserved addresses SMBus added special broadcast messages within the i2c protocol. But everything is still addressed the same way, so unless a device is actually listening for the broadcast me
It depends on what language you use. - AVR assembler is quite simple and well structured so you can write your program with ease. Anyway I didn't use i2c/twi interface before, but the datasheet is comprehensive so you need to read it carefully. - If you want to finish the project rapidly and with full features you can program it in C, using
Hallo, how has written a routine for the twi interface. And will share it with me. I like to use a i2c aplication whith the mega323. thank you for you help !!