Proprietary 2.4GHz wireless audio design
Time:2022-08-19
Views:1845
Although engineers often consider the microcontroller (MCU) from the perspective of integrating the peripherals required for the application at hand, in many cases, functions need to be added outside the MCU. For example, you may need to place the sensor or actuator physically close to the external device and away from the MCU. Alternatively, you may find that the low-end MCU combined with some peripheral devices can provide a combination of cost and system space for a given application. In any case, the number of MCU peripherals based on interfaces such as I C and SPI (serial peripheral interface) is increasing. This paper will study some typical peripherals and how to use them with popular MCU.
MCU widely supports I? C and SPI. In some cases, you will have to choose one of them because the MCU uses the same on-chip resources to support the IC or SPI. In addition, you will need some software to handle the serial bus protocol, but almost every MCU vendor has out of the box software support.
The IC has the advantage of using fewer signal lines and fewer MCU pins. Most implementations have a bidirectional data line and a clock line to support half duplex communication. In general, the MCU acts as a master device that can connect to multiple slave devices, although some implementations do support the flexibility of having multiple master devices on the bus. The master device uses the address bits to locate a specific slave device at the beginning of transmission, so that a dedicated slave device selection signal is not required.
SPI buses typically require at least three to four wires. SPI uses a separate date line for full duplex communication. In addition, it uses a dedicated slave selection signal line, so if your system has many SPI peripherals, you can use them as selection signals to easily exhaust the I / O ports on the MCU.
SPI usually has higher performance based on higher data transmission speed and full duplex communication. You will find that the SPI clock frequency is in the range of 20 to 40 MHz. Most I? C implementations are all in the range of 10 to 100 kbit / s, although some implementations use MCUs that run faster.
Motivation and characteristics
Now let‘s discuss some of the reasons why you might want to use peripherals connected to MCU through serial interface and the types of functions available. The data converter provides the main examples of the types of peripherals you might use. One reason you might consider using an external converter is that you may need higher accuracy than the converter integrated on the MCU of your choice.
Consider some converters of linglilt. The company provides I? C A / D converter, I? SPI A / D converter, and SPI D / a converter. In addition, all of these have higher accuracy than converters integrated on a typical MCU. For example, consider the relatively new rl78 MCU series of Reza electronics, the company‘s product in 16 bit MCU. To date, most of the available family members offer 8-bit A / D converters, while some offer 10 bit converters. In contrast, the accuracy range of the discrete lingalite A / D converter is 8 to 24 bits, while the accuracy range of the D / a converter is 8 to 18 bits. Even in an 8-bit or 16 bit system, you can easily have a single sensor that requires higher accuracy.
Consider a specific product example, ltc245116 bit a / D converter. Based on I? The device of C is shown in Fig. 1. The converter relies on delta sigma modulator as its core, which can perform 30 or 60 conversions per second. The 16 bit converter provides a full-scale error of 4 significant bits and establishes a multiplexing operation within one sample conversion time. In addition, the device is very small, 2 x 3 mm in size, and is packaged in an 8-pin SOT-23 package.
Fig. 1: linear technology‘s 8-pin ltc2451 A / D converter provides 16 bit accuracy and is connected to the I? C serial interconnect is connected to MCU.
Space occupied by small system
The external peripheral device may also provide a method for realizing the space occupied by the system. This seems counterintuitive, because we often see integrated peripherals as the way to miniaturization. However, continuing to discuss the data converter, let‘s discuss an example of a / D converter pairing of MCU and microchip.
Microchip provides a long string of I? C A / D converter and D / a converter and SPI based versions of both. Taking a specific example as an example, mcp3021 10 bit a / D converter is based on I? C and use successive approximation to transform the topology. The micro device uses SOT-23 package and only has five pins, but it provides higher accuracy than many low-end MCU converters.
You can also choose 6-pin and 8-pin 8-bit MCU from microchip and other suppliers. For example, the microchip pic10 MCU family includes many MCUs in a 6-pin SOT-23 package. The combination of a micro MCU and the same micro data converter may be smaller and cheaper than the MCU that integrates the converter that meets your application requirements.
Peripheral flexibility
What other types of peripherals can you add to an MCU based design through the serial interface? The list is long. A simple example is the I / O port expander. Many low-end MCU are limited by pins. In addition, even if you have an MCU with a large number of I / O, you may find it necessary to physically place some I / O pins away from the MCU -- for example, close to the sensor.
NXP Semiconductor provides pca9502 I / O port expander, which can be connected with SPI or I? C works with the host. The IC provides 8 I / O lines. In addition, it is very compact, with a size of 4.1 x 4.1 mm, and is packaged in sot616. NXP also provides sc16is740 / 50 / 60 UART, allowing you to add a 5-mbit / s serial interface to your design. The sc16is750 and sc16is760 variants also include an 8-bit I / O extender.
Nevertheless, more useful peripherals may be those with specific application functions. For example, microchip offers a wide range of I? C digital potentiometer. You can use this product in combination with thermistors in temperature sensing applications. Fig. 2 depicts an example in which the microchip mpc4018 potentiometer is used to calibrate the thermistor and consider the nonlinear operation of the thermistor.
Figure 2: Microchip‘s serial digital potentiometer can be used for a variety of applications, such as calibrating nonlinear thermistors in the circuit shown in the figure.
For more robust temperature centric applications, microchip also provides I? C temperature sensor IC. For example, the mcp9808 digital temperature sensor provides an accuracy of ± 0.5 ° C in the range of – 20 ° C to 100 ° C. In addition, the IC uses a variety of 2 x 3-mm packages.
The range of serial peripherals extends to user interfaces or human machine interface (HMI) applications. For example, microchip provides AR1000 touch screen controller (Figure 3) with SPI and I? C compatible. The serial interface links the MCU to the controller. The AR1000 can connect four -, five -, and eight wire touch screen sensors from multiple vendors (Figure 3). The IC directly provides digital coordinates to the MCU through the serial interface.
Figure 3: microchip AR1000 IC is linked to a touch screen sensor for HMI applications.
As you can see, serial interconnection provides considerable flexibility in MCU based designs. In some cases, SPI and I? C may be a purely useful way to implement functions that you cannot integrate on an MCU. But don‘t limit your consideration of the serial bus to such instances. Consider how external peripherals may affect the footprint, power consumption and cost of the system. In addition, to ensure that you do not sacrifice fidelity due to long signal operation between on-chip peripherals and actual interfaces, local peripherals can add value in terms of fidelity. You may find that distributed peripherals have advantages such as small footprint and more accurate system specifications.
Disclaimer: This article is transferred from other platforms and does not represent the views and positions of this site. If there is infringement or objection, please contact us to del |