Global Sources
EE Times-Asia
Stay in touch with EE Times Asia
EE Times-Asia > Embedded

Nothing left to be invented in embedded control (Part 3)

Posted: 09 Jun 2015 ?? ?Print Version ?Bookmark and Share

Keywords:microcontroller? MCU? Flash? PWM? CMOS?

"There is nothing new to be discovered in physics. All that is left is more and more refined measurements."Lord Kelvin, address to the British Association for the Advancement of Science C 1900 (disputed)

I am obviously paraphrasing this famous (although disputed) quote from Lord Kelvin, who was addressing the British Association for the Advancement of Science in the year 1900. One hundred and fourteen years later, it might seem like this quote could be applied to the world of embedded control. But this would be just sad, and, thankfully, it is far from the truth. There is plenty of innovation happening in embedded control, and it is occurring right now, in front of our eyesin the 8bit world!

In Part 1 and Part 2, we have seen how 8bit microcontroller cores are so small that relatively large CMOS process geometries can be effectively used to operate at higher voltages, drive higher current loads (up to 100 mA on selected MCUs) and to provide large margins of noise immunity, hence robustness. We have also seen how a new breed of integrated MCU peripherals, called Core Independent Peripherals, are bringing fresh new ideas to the market. These peripherals relieve the core from heavy computational tasks and, especially when combined together like LEGO bricks, they allow the designer to assemble new, highly customised building blocks that provide unprecedented flexibility and result in significant cost savings and power reductions.

Mixing in analogue
In the previous two installments, we examined the first batch of core independent peripherals, including the Configurable Logic Cell (CLC), the Signal Measurement Timer (SMT), the Numerically Controlled Oscillator (NCO), the Angular Timer, the Complementary Output Generator (COG), the Zero Cross Detector (ZCD), the CRC Scanner and the Hardware Limit Timer (HLT). While this is not an exhaustive list, at first sight it might seem that all such peripherals are mainly focused on solving digital problems. And they do, but, as we will now see, core independent peripherals do participate just as actively in the mixed-signal space.

Each integrated Analogue Comparator module produces a digital output that can be inserted into the logic mix of the core independent peripherals, but there is more. As we have seen in the previous installments, each CLC (macro) block has up to four inputs that can further access up to 32 input signals, each, and one logic output. The output can be published externally on an I/O pin, if so configured. It can also produce an interrupt or, simply set an interrupt flag without any interruption necessarily taking place. But, there is a third option. Each CLC output (rising or falling edge) can be used as a trigger for the Analogue-to-Digital-Conversion (ADC) peripheral. This way, the combination of Analogue Comparators, ADCs and various core independent peripherals allows us to create new, customised mixed-signal solutions, thanks to the connecting power of the CLC.

Intelligent analogue solutions
What we are advocating here is not the redesign of basic analogue building blocks from scratch, but rather the combination of existing peripherals to form new, ?intelligent functional blocks that, according to the best core-independence philosophy, will liberate the MCU core from cycle-consuming tasks. This also reduces the power consumption, the required clock speed and, ultimately, the cost of the application.

As we did before, let's examine these claims with a practical example that will demonstrate the real potential behind this intuition.

Let's imagine an embedded-control application where a short input (analogue) pulse is received from a source in the form of a sensor (of sorts). Let's also imagine how the amplitude of such a pulse is of utter importance to us and needs to be measured accurately, in order to determine some vital parameters of our control system. The duration of the pulse might be known to us, but the exact time of its arrival will not. In other words, the pulses will be asynchronous with respect to other application timing references.

Figure 1: Measuring Peak.

A chain reaction
As usual, let's start by reviewing a more traditional approach to the problem. The first one that comes to mind would include an input amplification and a filtering stage. This would probably make use of an operational amplifier and a basic application circuit, followed by an analogue comparator. For maximum flexibility, we might want to have a programmable threshold, which allows us to imagine connecting a Digital-to-Analogue (DAC) converter with the "other" comparator input. Once the threshold is crossed, discriminating the arrival of the pulse from the underlying noise, an output pulse would be sent to the MCU; likely to produce an interrupt. The interrupt service routine could then start an ADC conversion, after an appropriate delay meant to centre the sampling time right at the peak. Such a delay could be generated by a timer or, depending on its duration, simply by a (blocking) counting loop. The result of the ADC conversion might be available shortly afterward, leaving us with the choice, once more, whether to enable the ADC module interrupt or simply await the result in a, hopefully, short (blocking) loop. See figure 2 for a depiction of this circuit and the sequence of events we imagined.

1???2???3?Next Page?Last Page

Article Comments - Nothing left to be invented in embed...
*? You can enter [0] more charecters.
*Verify code:


Visit Asia Webinars to learn about the latest in technology and get practical design tips.

Back to Top