Announcement

Collapse
No announcement yet.

Choice of Communication Protocol

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Choice of Communication Protocol

    I'm a bit new to communications between processors. I recently spent the time to get USART (HSERIN/HSEROUT) functional. It seems this is a great communications protocol for 2 processors to talk to each other. I'm developing a controller that will incorporate several processors, each dedicated to specific functions. I want them all to be able to talk to a Host (PIC18F25K50) that can then talk to a laptop via USB.

    I looked at SPI and I2C. SPI seems hardware intensive, whereas each processor would require a Slave Select (SS) pin. I2C only needs 2 pins (SCK/SDA), but seem software intensive.

    Has anyone wired several processors together? Which protocol did you choose, and why?

  • #2
    I use HSERIN/HSEROUT. It's much easier than the alternatives and can run very fast when connected chip-to-chip on a PCB.

    I designate one chip as Master, then it executes transactions with all the others and is the only chip that has access to the USB chip. The chips with PPS look ideal for the master because you can reassign the USART pins on the fly. If I was designing the system today, I would use a K40 for the master.
    Charles Leo
    ME Labs, Inc.
    http://melabs.com

    Comment


    • #3
      I spent time working on a USART platform for this project. I created CS pins for each peripheral. The Client MCUs would tie the CS to an external interrupt (INT0 for example). When CS went low, an Interrupt Handler would turn on the USART and activate the RCINT. After dealing with the transmission, the Client would then turn USART off. I got it to where it at least looks feasible, though I hadn't bench tested it. Looking at SPI & I2C was my attempt to check out the alternatives before committing.

      Comment

      Working...
      X