Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] Raspberry pi SPI interface with my PIC

Status
Not open for further replies.

adeel.sid

Advanced Member level 4
Joined
Feb 15, 2008
Messages
108
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,298
Activity points
1,958
Dear all

My project is to receive sensor data at I2C of PIC and transfer it to raspberry pi via SPI

How can I interface my PIC and raspberry pi so that PIC starts receiving data as per command (SPI master---> raspberry pi, slave---> PIC)

Need your suggestion to interface my 16f877A PIC with raspberry pi for mentioned case

Regards
 

How can I interface my PIC and raspberry pi so that PIC starts receiving data as per command (SPI master---> raspberry pi, slave---> PIC)

I would suggest you to divide the complete operation in two parts...
1)Operate the PIC 16F877A in master mode and gather sensor data through I2C and store the data in a external EEPROM chip.
2)Configure the raspberry pi,to send the request to the slave device(PIC16F877A) for sending data,through SPI,at an interval long enough,so that the moment,the request for data is recieved,it is ready and downloaded in the external EEPROM.
I dont think real time data streaming can be possible in this device.....or can it?
What is refresh rate of the data,you intend to keep?
 
I prefer to do so w/o external EEPROM chip.
One idea in mind to implement I2C routine in software. in thus way, PIC dedicated pins could be used only for SPI

- - - Updated - - -

I would suggest you to use an already built library wiring Pi
My part focus on to get sensor data on I2C and sens it to SPI interface of raspberry pi
So I dont bother how it will be handled by Raspberry pi :)
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top