18F4550 UART and SPI


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2006
    Location
    Ottawa, Canada
    Posts
    11

    Question 18F4550 UART and SPI

    Unfortunately the UART Rx and SPI SDO functions on the 18F4550 share the same pin. I can't think of a simple solution which retains both ports without going to a different PIC. Has anyone come across a similar problem &/or have a possible solution?

    Thanks,
    Marc

  2. #2
    Join Date
    Oct 2004
    Posts
    440

    Default

    Possibly reset and reconfigure for other use.

    Norm

  3. #3
    Join Date
    May 2006
    Location
    Del Rio, TX, USA
    Posts
    343

    Default

    Use the PBP software solution for one the functions. Both work well, especially with a fast clock rate (which is likely since you are proabably using the 4550's usb, and if you not, other alternative PICs are a better choice).

    For what it's worth, when faced with a similar choice, I used the software SPI and hardware Serial. This allowed me to create an interrupt driven serial buffer for RX. I can recieve data packets "in the background" and then process the data in my main loop as needed. I also "hacked" the PBP SHIFTOUT macro to remove a bunch of 'needless' (in my case) delays (nop and goto $ + 2 commands), increasing the data output rate.

    HTH,
    Steve

  4. #4
    Join Date
    Jan 2006
    Location
    Ottawa, Canada
    Posts
    11

    Default

    Thanks for the excellent feedback Steve!

    I didn't think about using a PBP software solution. I'm using the 4550's USB & trying to get things to work with an ENC28J60. Unfortunately, when I received my Ethernet PICtail daughter card it didn't contain the latest Rev B5 silicon, which supports SCK from DC-20MHz. I will likely upgrade otherwise SCK needs to be >8MHz, as per errata.

    Regards,
    Marc

Similar Threads

  1. Hardware SPI with MAX3111E
    By KHsu in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 8th August 2007, 01:42
  2. Servo control / UART / SPI help needed
    By Blackhawk in forum mel PIC BASIC
    Replies: 10
    Last Post: - 10th November 2006, 03:40
  3. External UART IC
    By Terry in forum General
    Replies: 4
    Last Post: - 22nd December 2005, 18:01

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts