Hello to all.
I want to use the raspberry pi as a slave.
But I do not know.
Please tell me the information that would be helpful.
I am using Python.
It does not matter other languages.
Information that is written in the following PDF will care.
・Raspberry Pi Education Manual (130page)
http://212.187.212.72/bt/69fc7f0b8f84a2 ... Manual.pdf
"Inter-Integrated Circuit (I2C)
I2C is an interface on which you can connect multiple I2C slave devices.
The Raspberry Pi acts as the master on the bus."
master only?
※
I am also using the Google translation.
Sorry, but it might have been in the wrong sentence.
Yours sincerely
- mahjongg
- Forum Moderator
- Posts: 13587
- Joined: Sun Mar 11, 2012 12:19 am
- Location: South Holland, The Netherlands
Re: How to I2C slave
Yes, master only, its not written there by accident, concluding anything else is just wishful thinking.
AFAIK the only way to create a slave I2C interface is to write a bit-banging routine using normal GPIO ports.
or to use an external micro controller that can be an I2C slave, and communicates with the PI using its UART (serial port).
AFAIK the only way to create a slave I2C interface is to write a bit-banging routine using normal GPIO ports.
or to use an external micro controller that can be an I2C slave, and communicates with the PI using its UART (serial port).
Re: How to create an I2C slave interface
The Pis with the 40 pin header and the compute module export one I2C/SPI slave peripheral on the expansion header.
The I2C/SPI slave peripheral is not supported in the kernel. I know at least one poster was trying to use it from Linux userland. I haven't seen any evidence of success. There are bare metal examples of code.
The I2C/SPI slave peripheral is not supported in the kernel. I know at least one poster was trying to use it from Linux userland. I haven't seen any evidence of success. There are bare metal examples of code.
Last edited by joan on Mon Apr 13, 2015 9:42 am, edited 1 time in total.
Re: How to create an I2C slave interface
Dear mahjongg and joan,
Thank you for your answer.
I found out that OS isn't supporting it.
bare metal...
I do not know.
I try to search on Google.
Thank you all.
Thank you for your answer.
I found out that OS isn't supporting it.
bare metal...
I do not know.
I try to search on Google.
Thank you all.
- mahjongg
- Forum Moderator
- Posts: 13587
- Joined: Sun Mar 11, 2012 12:19 am
- Location: South Holland, The Netherlands
Re: How to create an I2C slave interface
You normally use Linux userland drivers like PIGPIO to control the GPIO's and its special functions, of course you don't need to write your own bare metal drivers.
-
- Posts: 19
- Joined: Wed Jun 24, 2015 7:34 am
Re: How to create an I2C slave interface
Hi Joan,joan wrote:The Pis with the 40 pin header and the compute module export one I2C/SPI slave peripheral on the expansion header.
The I2C/SPI slave peripheral is not supported in the kernel. I know at least one poster was trying to use it from Linux userland. I haven't seen any evidence of success. There are bare metal examples of code.
than means, the I2C/SPI slave couldn't be achieved/implemented on RPi2(40 pin header) with Linux support?
Re: How to create an I2C slave interface
It means that no one has written a Linux driver to support the I2C/SPI Slave peripheral. I'm sure it is possible. My personal view is it would not be very useful even if someone did write a driver.krishnaiah.vv wrote:Hi Joan,joan wrote:The Pis with the 40 pin header and the compute module export one I2C/SPI slave peripheral on the expansion header.
The I2C/SPI slave peripheral is not supported in the kernel. I know at least one poster was trying to use it from Linux userland. I haven't seen any evidence of success. There are bare metal examples of code.
than means, the I2C/SPI slave couldn't be achieved/implemented on RPi2(40 pin header) with Linux support?