PDA

View Full Version : EUSART vs. MSSP



keithv
- 13th February 2018, 17:58
I'm beginning a project and I can foresee it's going to need more I/Os than will be available on any one PIC. I've never used EUSART or MSSP before. I was wondering what the primary difference is between the two and why you would want to use one over the other. Pros and cons of the two? What are some examples of their best suited practical applications. I'm only at the brainstorming stage of this project, but I was thinking the secondary PIC(s) would only need to access the EEPROM of the primary PIC, so would MSSP probably be the best solution for that?

Dave
- 13th February 2018, 18:26
The Best and most concise explanation is in the particular data sheet for the processor you are planning on using. Visit MICROCHIP.com

tumbleweed
- 13th February 2018, 18:56
How many more IO's?

If a larger pic doesn't fit the bill there are SPI/I2C 16-bit IO expanders like the MCP23017 that are infinitely easier to use than having to deal with the hassles of multiple pics and the interface between them. Plus they're cheap as dirt.

Up to 8 expanders can be connected onto a single bus, so that's 8x 16 = 128 addt'l IO pins.

Larger ones are available, but not from microchip.

keithv
- 14th February 2018, 00:27
How many more IO's?

If a larger pic doesn't fit the bill there are SPI/I2C 16-bit IO expanders like the MCP23017 that are infinitely easier to use than having to deal with the hassles of multiple pics and the interface between them. Plus they're cheap as dirt.

Up to 8 expanders can be connected onto a single bus, so that's 8x 16 = 128 addt'l IO pins.

Larger ones are available, but not from microchip.

That's awesome! I didn't know such a thing existed. That will most likely be the best solution. Thanks. I'd still like to know more about the differences between MSSP and EUSART though. I'm just a noob teaching myself this stuff. I've read the datasheet, but they both kinda sound like they do roughly the same thing.

HenrikOlsson
- 14th February 2018, 07:58
I'd still like to know more about the differences between MSSP and EUSART though
EUSART = Enhanced Universal Asynchronous Receiver Transceiver
MSSP = Master Synchronous Serial Port

Asynchronous means there is no dedicated clock line/signal, while synchronous means there IS a clock line/signal. RS232 is an asynchronous communication standard while for example SPI and I2C are synchronous.

/Henrik.

keithv
- 14th February 2018, 19:27
EUSART = Enhanced Universal Asynchronous Receiver Transceiver
MSSP = Master Synchronous Serial Port

Asynchronous means there is no dedicated clock line/signal, while synchronous means there IS a clock line/signal. RS232 is an asynchronous communication standard while for example SPI and I2C are synchronous.

/Henrik.

Can you give me a practical example of where it would be beneficial to have a dedicated clock line and also to not have a dedicated clock line?

mpgmike
- 14th February 2018, 19:30
If you have 2 PIC processors clocked at the same Fosc talking to each other, Asynchronous saves the clock pin. However, if you are talking to a peripheral with no oscillator (internal or external), it needs a way to know when to look at the data pin (or port) to take a picture & extract the data. Here the clock pin is necessary. The clock pin also keeps timing issues clean when communicating between 2 devices that don't share the same Fosc. The faster the communication, the more critical timing becomes.

tumbleweed
- 14th February 2018, 20:06
Synchronous devices typically latch the data on the clock edges, while async devices usually sense a change in the data,
wait a bit, and then begin sampling the signal one or more times to determine the logic state.

If you have long lines with mismatched impedance where the signals ring a lot, or a lot of delay/skew between the signals
then you can get false or mis-timed clocks and the data is corrupted. Since sync depends on a clock edge it also tends to be more susceptible to noise.

The delay in an async scheme allows time for the signal to settle giving you a better chance of reading the data correctly.

Charlie
- 15th February 2018, 14:00
In practical terms, the device you want to talk to usually determines. If you are talking to a computer it will likely be RS-232 serial port you need the EUSART. If you are designing both ends, use whatever you like.

keithv
- 15th February 2018, 17:22
That helps a lot. Thanks guys!