Using USB and SPI at the same time with PIC18F4550

Status
Not open for further replies.

nooobboy4321

Junior Member level 1
Joined
May 22, 2012
Messages
18
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,447
Hi, I'm working with my project using PIC18F4550, my goal is to expand my I/O ports so I guess I need a Port Expander like MCP23S17 and connect my PIC18F4550 with USB and the PC. My first plan is to use the USART(RS232 Serial Communication to PC) but I see a little bit details of PIC18F4550's Datasheet and I notice that RC7 has RX(for USART) and SDO(for SPI) shared together. I'm thinking of using USB as a communication between PC instead of USART. So my question, is it possible to use both USB and SPI? Thank you.

It's like this :

[PC] <<USB>> [PIC] <<SPI>> [MCP]
 

Hi,

Yes, you should be able to use USB and SPI together as they do not share pins.

You could also run SPI and rs232 if you used a Software Usart with some other free i/o pins, don't know if your C library will have one though ? - might find one ready made on the web.
 
Thank you for the quick reply wp100, it saves my time and effort in looking some forums about my problem.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…