Search Engine www.edaboard.com

i2c Slave Mode Code

Add Question

27 Threads found on edaboard.com: 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 (...)
On our board we are planning to connect 2 devices(slave) with i2c interface to 1 MCU (master). But the master (MCU) has NO i2c interface, should use 2 GPIO pins to simulate i2c timing, to implement the communication between processor and the devices. The host processor will be running linux 2.4.X on it. How to write a (...)
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
I've never worked with PICs but I am not sure if PIC comes with such capabilites in hardware. If you want to implement it in software its quite easy. I've done it with AVRs and 8051s. i2c/SPI is a definite go if its available as it allows such communication. You can memory map the slaves in masters address range thereby making slave (...)
I am using MSP430F449. I am using external RTC wit i2c bus. My micro 2 SPI 's are occupied. So Is it possible to use configure the general perpose I/O ports for i2c communication by software as well. If so pls explain me. thanks
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
HIIIII I WANT TO IMPLIMENT i2c (MASTER mode) USING INTERRUPTS. IN ISR WAT EXACTLY I code FOR THE SAME PLZZZZ HELP ME
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 (...)
should be no problem so long as you get the baud rates and other parameters the same, e.g. for a PIc24 // write to i2c1 address array wrptr of length, if sendStop is 1 send a STOP at end int writei2c1(const int address, const unsigned char *wrptr, int length, int sendStop) { unsigned int i2cbrg=((SYSCLK/100000L)-(SYSCLK/1111111L))-1;
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