Tag Archives: Advanced microcontrollers


XMega Analog Comparator

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.

Block Diagram

 

Read more

ATXMega Primer

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.
Read more

STM32 Serial Communication

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:

BGA100 LQFP100 LQFP48 LQFP64 Pin Name USART/UART
D9 67 29 41 PA8 USART1_CK
C10 70 32 44 PA11 USART1_CTS
B10 71 33 45 PA12 USART1_RTS
C9 68 30 42 PA9 USART1_TX
D10 69 31 43 PA10 USART1_RX
G3 29 14 20 PA4 USART2_CK
G2 23 10 14 PA0 USART2_CTS
H2 24 11 15 PA1 USART2_RTS
J2 25 12 16 PA2 USART2_TX
K2 26 13 17 PA3 USART2_RX
K8 51 25 33 PB12 USART3_CK
J8 52 26 34 PB13 USART3_CTS
H8 53 27 35 PB14 USART3_RTS
J7 47 21 29 PB10 USART3_TX
K7 48 22 30 PB11 USART3_RX
B8 79 52 PC11 UART4_RX
B9 78 51 PC10 UART4_TX
B7 83 54 PD2 UART5_RX
C8 80 53 PC12 UART5_TX

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.

Read more

New 8-bit PIC microcontrollers feature advanced analog and digital integration

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.