Previously we dealt with the XMega Analog-to-Digital Converter (ADC) block. We know that we can use the ADC to measure voltages and take decisions based on voltage values/levels but sometimes it is enough to detect voltage levels and not to measure the exact voltage values. In such occasions where we just need to check voltage levels relative to a reference or threshold value, we need an Analog Comparator (AC). An analog comparator can be used to compare two voltage levels and based on that it can be used to generate a logic output (0 or 1) to indicate which of the two levels is higher or lower than the other. That’s all and there isn’t much about analog comparators. The XMega family of micros come loaded with high performance dual analog comparator modules. However so far we saw that between the traditional 8-bit micros and the XMega micros, the major difference apart from programming is the overall nifty enhancements in all common hardware blocks. When it comes to the analog comparators of the XMega micros, the same is true. In this issue we will explore the XMega analog comparator block.
The XMega series is a powerful addition to the existing arsenal of Atmel’s AVR-core micros. As much as I have personally studied about it so far and felt, the XMega series incorporates many features of conventional 32-bit ARM micros like alternate I/O pin mapping functionalities, sophisticated clock options and data buses, multiple communication platforms that have several uses, variety of capture-PWM options, 12-bit ADCs and DACs, DMA controller, USB hardware, etc. with the good old AVR core. Thus you get one hell of an 8/16 bit MCU that can fulfil your wildest micro desires. In terms of unit cost, resources and user flexibilities this family of micro can beat any present day micro in most of the scenarios. Unlike other manufacturers who design chips as to fit specific applications, there’s no limit for XMega series. It is one controller with unlimited possibilities that can fit into any application. Indeed it is a true Atmel slogan now:
“My microcontroller can beat the hell out of your microcontroller.”
There are several things that are should be known. XMega is still a relatively new breed of micro. There’s literally nothing similar to it in the market no matter which manufacturer you can name. As I said Atmel added literally everything that can be imagined. Initial XMega devices had several hardware flaws and were unstable. They had problems related to power and operational stability. However these shortcomings are no longer there as they were. Atmel dramatically improved this new line of devices and are yet doing a lot of R&D on it. The older successful AVR Mega series micros are not as same as XMegas and so what can be applied to Mega AVR can’t be applied for the XMegas. There are significant differences both in terms of hardware and software but still there are similarities.
STM32 micros just like any other micro provide hardware for serial communication. As we all know serial communication is a very important tool for debugging, connecting with external hardware like RFID, GPS, GSM modems, etc. and for performing other communication-related tasks. STM32s have several hardware serial (USART) ports. The number of ports available in a STM32 micro is dependent on device family type and the device itself. Typically there are at least 5 serial ports. Apart from the basic serial communication needs, STM32’s USART hardware also have support for LIN, one-wire, smart card protocols, SPI and IrDA. We can even utilize STM32’s DMA controller with USART hardware to achieve high speed automated data communication. Thus these hardware are truly universal synchronous-asynchronous receiver-transmitters.
In any standard serial communication, we need three wires – TX, RX and GND. TX pin is an output pin and transmits data serially to another device’s RX pin. RX pin is an input pin and is responsible for receiving data from another device’s TX pin. The two devices connected in this way must have same ground (GND). There are other pins like CTS and RTS which are used for hardware flow control. Additionally there’s also another pin called CK. It is transmitter’s clock output and used usually in SPI and other modes.
Depending on package, USART pins are arranged in the following pattern:
Personally I’m interested in LQFP packages, particularly 48 and 64 packages as they are mostly used in the most common STM32 development boards. I suggest locating USART/UART pins before working with them.
There is a good news for PIC fans. Microchip Technology, Inc. has recently announced the expansion of its 8-bit enhanced Mid-range core microcontroller (MCU) family to include advanced analog and digital integration, such as 12-bit A/D converter, 8-bit DAC, Op-Amps with Rail-to-Rail input/output, and high-performance Rail-to-Rail comparators.
Key peripherals in the new 8-bit PIC MCUs
CHANDLER, Ariz., March 26, 2012 [NASDAQ: MCHP] — Microchip Technology Inc., a leading provider of microcontroller, analog and Flash-IP solutions, today announced from DESIGN West in San Jose the expansion of its 8-bit PIC16F(LF)178X enhanced Mid-range core microcontroller (MCU) family to include advanced analog and integrated communication peripherals, such as on-chip 12-bit Analog-to-Digital Converters (ADCs), 8-bit Digital-to-Analog Converters (DACs), operational amplifiers, and high-speed comparators, along with EUSART (including LIN), I2C™ and SPI interface peripherals. The MCUs also feature the industry’s best level of advanced PWM control and accuracy via the new Programmable Switch-Mode Controllers (PSMCs). This combination of features enables higher efficiency and performance, along with cost and space reductions in applications such as closed-loop control in power supplies, and lighting. The “LF” versions of the MCUs feature eXtreme Low Power Technology, for active and sleep currents of just 32 µA/MHz and 50 nA, respectively, helping to extend battery life and reduce standby current consumption. Low power consumption and advanced analog and digital integration make the general-purpose PIC16F(LF)178X MCUs ideal for LED lighting, battery management, digital power supply, motor control and other applications.
More details of the story can be found here.