Search Engine

i2c Slave Mode Code

Add Question

27 Threads found on i2c Slave Mode Code
Hi, I am working on PIC microcontrollers currently-dsPIC33F256GP710. I want to work my PIC as a slave device for i2c communication. I have done the initialization part only till now. If any one have the code for i2c slave mode for any microcontroller please upload here or please forward (...)
Hi , I want to send serial eeprom data to CPLD/FPGA in i2c bus . My component is AT24C16 and AT89s52 and FPGA There are two way I could think of : Way 1:So need to write a i2c HDL code let FPGA directly read AT24C16 Way 2:Use AT89s52 to read AT24C16 then write to FPGA by i2c bus . Coudl you help to get (...)
I would like to transmit and receive data between two 16f877a in which one as Master and One as slave. In this, i have two doubts. 1. Can i connect the SDA and SCL pins of master directly to SDA and SCL pins of slave without using an i2c expander? 2. If i connect SDA and SCL of master and slave, i need to give address (...)
Hi, Does any one knows that the codeVision for AVR use Hardware or Software i2c in Automatic Program Generator OR its include i2c library? Like the DS1307 library is using Hardware/Software i2c? thx
Can show me some useful link with the project above? Main problem is CPU that working as fast slave mode i2c ( with hardware i2c controller, or with fast Risc CPU as Ubicom (Scenix)).
Do not use this SSP module in slave mode, because it's full of bugs. In case of use in slave mode always use PIC's with MSSp module., It works ok. tjalps, what do you mean? i'm trying to use i2c between 2 PICs (16f876)by HW i2c but the slave can't receive data from (...)
Chose two I/O pins for SDA and SCL and connect them to i2c device(slave mode) directly. See, it works. The C code for 8051:
Dear all, I have some problem. I want to interface ATMEGA8535 with cmps03 using i2c. I have interface the ATMEGA8535 with DS1624 before and it work well, but when I interface it with cmps03, the problem I have is the data that I passed to the port always changing when I reset my AVR, supposedly the data is static (don't change)cause I didn't change
Attached are a couple of code snippets for master transmission/reception and 10-bit slave reception. These were test cases so pins have been driven to indicate status (e.g. BF flag set, Interrupt Routine entered, etc.) We have many customers developing multi-core systems as, when you step or debug in Proteus, the whole system advances/pauses
Hi Yes it is , you will need to do bit banging on the I/O poert simulating i2c bus in master mode Do not try to do i2c bus in slave mode using I/O very hard to impliment I belive you can find code for i2c master mode in TI site All the (...)
Hi All I'm a beginner in SSP comm,I want to tap i2c signal between two IC's that are communicating in i2c mode.For this purpose my controller(PIC24FJ64GP008) should be configured as i2c slave.Furthermore I should not interfere by sending out Ack to those lines.Kindly guide me. Thanks.
I did a communication between a dspic 33 fj256gp710 as a master (on a explorer 16 board) and a pic 16f887 as a slave (on a pickit 2 board). When I'm runnig the programs(both master and slave) in animate mode it is ok for the first cycle, in next cycle thoose does not syncronize I think. In normal running mode the same (...)
Hi to all.i am newbie to i2c in pic16f877a, i need to learn to programe for i2c in pic16f877a. but th datasheet of it is really confusing. so i cant get a neat idea abt how to start to write for SDA and SCK. so some tell me exactly how to write for it and upload some sample programes for MPLAB. :cry: thanx in advance
Is there any way to circumvent this stuff with pointers? I tried using them in the put command but it treated the pointer as a string as one would expect and not as a pointer to a variable. Unfortunately not, all numerical values must be converted to character strings. The Microchip Explorer PIC18 has LCD inte
Dear all, I wrote a program for interrupt. so it is working well for my demo board but when I debug the program using my PICkit2 clone it does not interrupt please advice hai... i am not much familiar with assembly language. May be the below information help you As u said, your code doesn't go to interrupt dur
be aware that if you look at the details of the picbasic language, the i2c routines works well only with hard i2c chips for example 16f876, but not the 16f84... they work quite in master mode, but quite not in slave.
hi all, i trying to interface EEPROM and RTC with my 6713 dsp using i2c bus which is inbuild module in 6713. I have written code based in the documents given my code is working in DIGITAL LOOPBACK mode. but when im trying ti write some thing to EEPROM or RTC i didnt get any acknowledgement from (...)
Hi all, I need some code to share i2c EEPROM between 2 PIC. I need to use multi-master configuration. The first Master will write on the EEPROM and the second will read from. I need your help! (I use assembler) Thanks,
Dear All Hi! I tried PIC16F688 for the purpose of two channel temprature data logger was successful to the level of saving(logging) the values to External EEPROM but couldnot manage to get back data logged in EEPROM (AT24C02), Used i2c Library (Author:- John ) with fo
Hi, Please read the data sheet, something to do with i2c status, need to wait if i2c busy.
Hello all, I am using two PIC 16F877A and i2c code from Microchip AN734 and AN735 for Master and slave. There is communication between Master and slave when debugging the slave in MPLAB, but not when Debugging from the Master. When I use MPLAB Debugger on the Master firmware, the Debugger steps or runs (...)
Simple i2c controller -- -- 1) No multimaster -- 2) No slave mode -- 3) No fifo's -- -- notes: -- Every command is acknowledged. Do not set a new command before previous is acknowledged. -- Dout is available 1 clock cycle later as cmd_ack -- library ieee; use i
hi, I have a Project which uses a two pic18f4550 as master and slave in order to communicate to each other , When the master send a string , the slave received it correctly .And that based on the interrupts , But the problem is : the slave accept any transition from the master even if the address was wrong ? my questions are : are (...)
DS1307_init call Starti2c ; Set SSPCON2.SEN bcf i2c_Ctrl,0 ; set for write Command movf i2c_Ctrl,W ; Send slave Address to i2c Bus call Send_Byte movlw 0x00 ; 00H address call Send_Byte movlw B'00000000' ; clk_halt bit disabled call Send_Byte movlw 0x02 ; 02H address 12/24 hrs (...)
Hello, I want to do Full Duplex Communication using Two Different Micro controllers both running at different Crystal Frequencies.... is it possible because i have seen communication between same type of ucontrollers using i2c
i have msp430fg4618 controller. i trying to integrate hyt-221 sensor with it my connection is ok and i provide pull up at slave(sensor).but its not responding.any one who previously integrate hyt-221 with msp plz help!!!!!!!! here is code but not works #include "msp430fG4618.h" unsigned char *prxdata,ct,temp,humidity,mr,rt; unsigned char