27 Threads found on edaboard.com: i2c Slave Mode Code
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 (...)
Microcontrollers :: 30.07.2007 08:20 :: mdeepamenon :: Replies: 1 :: Views: 1327
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 (...)
PLD, SPLD, GAL, CPLD, FPGA Design :: 10.05.2005 12:29 :: TERRYWU3 :: Replies: 2 :: Views: 2560
Check the datasheet for the PIC16F877A page 82
This is a part quoted from the datasheet:
SSPADD register holds the slave device address
when the SSP is configured in i2c slave mode. When
the SSP is configured in Master mode, the lower
seven bits of SSPADD act as the baud rate generator
Microcontrollers :: 14.11.2011 08:23 :: seadolphine2000 :: Replies: 8 :: Views: 477
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?
Microcontrollers :: 27.01.2004 07:33 :: sadat007 :: Replies: 4 :: Views: 5795
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)).
Microcontrollers :: 21.08.2004 11:13 :: dainis :: Replies: 9 :: Views: 4211
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 (...)
Microcontrollers :: 06.03.2005 13:26 :: fuzzzy :: Replies: 10 :: Views: 4202
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 (...)
Microcontrollers :: 11.12.2006 07:19 :: ubuntu_amateur :: Replies: 6 :: Views: 7645
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
Microcontrollers :: 26.02.2007 05:41 :: kaze :: Replies: 4 :: Views: 1879
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 (...)
Embedded Systems and Real-Time OS :: 25.06.2007 15:26 :: kishore2k4 :: Replies: 12 :: Views: 8474
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.
Microcontrollers :: 04.07.2007 20:39 :: london :: Replies: 1 :: Views: 535
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.
Microcontrollers :: 19.09.2007 13:08 :: gibs :: Replies: 4 :: Views: 802
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 (...)
PC Programming and Interfacing :: 05.06.2008 12:55 :: vasiliugeo :: Replies: 1 :: Views: 1558
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.
thanx in advance
Microcontrollers :: 07.10.2008 02:28 :: dhanraj_kmr :: Replies: 15 :: Views: 23598
Can you re-frame your question :?: and make it a bit more clear..
Do you mean an i2c master with interrupt from slaves. On receiving an interrupt via any of its GPIO pin, the master services the slave. Is this you are asking?
Microcontrollers :: 16.08.2010 16:41 :: hardyethan :: Replies: 1 :: Views: 675
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
Microcontrollers :: 05.01.2012 21:57 :: bigdogguru :: Replies: 2 :: Views: 671
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
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
Microcontrollers :: 22.01.2012 22:30 :: karthikkrv85 :: Replies: 13 :: Views: 648
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.
Microcontrollers :: 19.04.2004 09:34 :: Kripton2035 :: Replies: 21 :: Views: 18957
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 (...)
Digital Signal Processing :: 07.04.2007 10:48 :: Jeeva :: Replies: 0 :: Views: 851
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)
Microcontrollers :: 23.11.2007 03:22 :: supiper :: Replies: 8 :: Views: 1661
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 )
Microcontrollers :: 27.10.2009 14:09 :: kashif_uet :: Replies: 3 :: Views: 1269
I am trying to make a pic to pic i2c communication but it is not work.
Can any friend see what i am doing wrong in my code please ?
const slave_address = 0x69;
unsigned int datain;
unsigned char test;
ADCON1 = 0x10001111;
PORTC = 0;
TRISA = 0;
TRISB = 0b00000011; //
Microcontrollers :: 20.11.2009 18:23 :: infrared :: Replies: 2 :: Views: 1802
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 (...)
Microcontrollers :: 24.03.2011 00:28 :: gw_deja2 :: Replies: 1 :: Views: 691
Simple i2c controller
-- 1) No multimaster
-- 2) No slave mode
-- 3) No fifo's
-- Every command is acknowledged. Do not set a new command before previous is acknowledged.
-- Dout is available 1 clock cycle later as cmd_ack
PLD, SPLD, GAL, CPLD, FPGA Design :: 22.04.2011 08:13 :: daisyzari :: Replies: 0 :: Views: 349
Reference: Microchip Appnote: AN734 - Using the PICmicro? SSP for slave i2cTM Communication
are the addressing and the acceptance of the address done in the hardware or in the software ?
The slave address must be setup by loading the SSPADD register.
Microcontrollers :: 19.08.2011 16:48 :: bigdogguru :: Replies: 5 :: Views: 1453
call Starti2c ; Set SSPCON2.SEN
bcf i2c_Ctrl,0 ; set for write Command
movf i2c_Ctrl,W ; Send slave Address to i2c Bus
movlw 0x00 ; 00H address
movlw B'00000000' ; clk_halt bit disabled
movlw 0x02 ; 02H address 12/24 hrs (...)
Microcontrollers :: 22.02.2011 09:13 :: durgap :: Replies: 3 :: Views: 774
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
Microcontrollers :: 11.08.2012 03:51 :: usmanrahimz :: Replies: 3 :: Views: 243
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
unsigned char *prxdata,ct,temp,humidity,mr,rt;
Microcontrollers :: 22.02.2013 00:22 :: karan29 :: Replies: 0 :: Views: 116