Web Platform Schematics, SPI in particular

A small embedded server. Get one for $40, including worldwide shipping.

Web Platform Schematics, SPI in particular

Postby dts » Tue Apr 05, 2011 1:01 pm

Hi people!
I am new in this forum, so please excuse me my ignorance.
I was looking for some prototype for Ethernet connectivity and came across Web Platform, it has all my favorite chips! So i started to look into details.
Is there a particular reason why 3 SPI devices SD_card, 25LC1024 eeprom and ENC28J60 connected to different PIC pins? 33FJ128GP204 has only 2 SPI modules, so at least one of them must be switched between peripherals all the time. Can somebody explain why?
In my experience a lot of SPI devices could be all connected to one SPI bus. Just each device needs separate select line. Much easier to handle.
I also noticed somebody suggesting connection on FT232RL DSR(?) pin to PIC MCLR. Microchip excellent bootloader for PIC18 based on AN1310 has RTS pin connected to PIC MCLR through diode and 470 ohm resistor. Very convenient.
And if there is not enough of PIC pins, MCP23S17 is a good extension device.
dts
dts
Newbie
Newbie
 
Posts: 1
Joined: Tue Apr 05, 2011 12:12 pm

Re: Web Platform Schematics, SPI in particular

Postby ian » Wed Apr 06, 2011 2:06 am

Hi dts,

Welcome to the forum, and thanks for your questions.

Is there a particular reason why 3 SPI devices SD_card, 25LC1024 eeprom and ENC28J60 connected to different PIC pins? 33FJ128GP204 has only 2 SPI modules, so at least one of them must be switched between peripherals all the time. Can somebody explain why?
In my experience a lot of SPI devices could be all connected to one SPI bus. Just each device needs separate select line. Much easier to handle.


In general, only 2 of the SPI devices (EEPROM or SD card, and Ethernet) are used at one time so there isn't too much switching in practice. The Ethernet and SD card/EEPROM are on different SPI modules so the storage can be read and moved to the ethernet buffer without swapping between devices each time. Also, the dsPIC33 SPI can run quite fast, and I wanted to avoid making any start configurations with the traces.
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: Web Platform Schematics, SPI in particular

Postby bogdanfirst » Wed Aug 24, 2011 8:34 am

Is there any example of connecting another SPI device? I'm looking to connect an RFM12B radio module. I will have to share a SPI interface and i should handle interrupt request that stops normal execution to get data from it as there isn't much of a buffer for receiving.

Any advice?
bogdanfirst
Newbie
Newbie
 
Posts: 3
Joined: Wed Aug 24, 2011 8:29 am

Re: Web Platform Schematics, SPI in particular

Postby ian » Sun Aug 28, 2011 1:36 am

I'm sorry, I don't know of any examples of that. You'll need to prevent the interrupt from swapping the SPI away from the EEPROM or SD card when the radio receives data. Do you plan to use the SD or EEPROM? I guess you could test the Chip Select pin before servicing the EEPROM /SD or radio, and run a cleanup operation if one is already active. It will take some fancy work to avoid collisions.
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: Web Platform Schematics, SPI in particular

Postby bogdanfirst » Wed Sep 14, 2011 6:21 am

(sorry, somehow forgot to check the topic).
You are right, it would take some complicated code, that's why i will add another micro to handle all the radio part and communicate with the web platform on the other USART interface. It should be faster and i'm interested in getting things done the easiest way.
bogdanfirst
Newbie
Newbie
 
Posts: 3
Joined: Wed Aug 24, 2011 8:29 am


Return to Web platform