Hi everyone !
I'm new to embedded systems domaine and I have this question; if we don't use any system bus in a radar project that is based on PIC microcontroller for example, and we just do the wiring of the components, is that okay ? or will cause some loss data ? Otherwise, is the use of a system bus such as I2C is necessary for embedded system project ?
Based on the devices you connect to your microcontroller, you either need a serial interface or you don't.
You typically use SPI or I2C to communicate (configure, control, transfer data) with an IC (eg. a flash memory device) that supports or requires that interface. If none of the external devices in your system support or require a serial interface to use them, there is really no reason for you to include one.
Even if you don't require a serial interface, you might consider bringing serial bus signals out to test points so they are accessible. Also include pads for any required pullup resistors. This way if you find you need to add a device that requires a serial interface, you can blue-wire your device connections and evaluate before changing your board design.
So it totally depends on the external devices of my system !
Thank you so much for your explanation matthewbarr.
Not sure, why you mentioned "radar project" at all. The concept is simple microcontroller take inputs from sensors and provide outputs to actuators/display. Now, each sensor/actuator/display follow a communication protocol which might be either analog or digital. Analog devices will be interfaced either built-in or external ADC/DAC.
Low speed protocols which include UART (asynchronous full-duplex serial), i2c (synchronous half-duplex serial) and SPI (synchronous full-duplex serial) are used to communicate with the devices. Now, you will have to check that the TTL is compatible between devices (i.e. both the uC and device must use the same logic level, e.g. 5V or 3.3V). You will have to use level shifters if the TTL is not the same.
Now your questions are not clear. Loss of data happen when the transfer or sample rates are lower than the data generation rate (i.e. the amount of data being generated per unit of time). The selection of the communication protocol will have to take the data generation rate into consideration.
Hi Pedro ! Thank you for your explanation,
Sorry if I didn't clarify enough my question, I'm new with all these concepts.
I mentioned the "project radar" because in some tutorials they don't talk about bus system at all, they just do the wiring thing and everything works good. My question was, in this case, which communication protocol is used ? And you answered that I think, it's analog or digital communication, Am I right ?
Howdy, it seems you're trying to be specific without any details. It's overall more general - specific is totally case by case. In agreement with other posts, here's my summary.
Any connected device has some function - input, output or both. How it's controlled and does data transfer (if applicable) will be either analog or digital signals.
If analog, what voltage range and current will you have to "read" or drive.
If digital, are there simple signal lines and/or lines for data that use a protocol.
The mix of devices dictates the control and transfer software you'll have to write. Many microcontrollers have "blocks" to do common support - I2C, SPI, UART etc, and they're great. But I'll suggest to really learn a protocol, write your own. It's laborious and frustrating, but you'll Know it when done and will serve you well when wrangling a block that just doesn't behave the way you expect. My $.02 Good Hunting <<<)))