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: 1456
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: 2778
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 (...)
Microcontrollers :: 14.11.2011 07:18 :: gopintj :: Replies: 8 :: Views: 567
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: 6118
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: 4653
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: 4470
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: 8396
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: 2021
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
Embedded Systems and Real-Time OS :: 26.06.2007 10:09 :: Iain :: Replies: 12 :: Views: 8898
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 (...)
Microcontrollers :: 07.07.2007 06:44 :: bobcat1 :: Replies: 1 :: Views: 663
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: 940
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: 1702
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: 24985
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: 748
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: 910
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: 821
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: 19875
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: 1025
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: 1855
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: 1419
Please read the data sheet, something to do with i2c status, need to wait if i2c busy.
Microcontrollers :: 27.11.2009 08:03 :: rajtech :: Replies: 2 :: Views: 2044
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: 829
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: 421
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 :
Microcontrollers :: 19.08.2011 16:01 :: ayhampic :: Replies: 5 :: Views: 1839
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: 894
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;
Microcontrollers :: 11.08.2012 05:14 :: horace1 :: Replies: 3 :: Views: 307
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: 198