The SWM181CBT6-50 development board is a remarkable tool in the field of embedded systems. It is equipped with the SWM181CBT6 chip, which offers a range of features and capabilities that make it suitable for various applications. This development board has gained popularity due to its cost - effectiveness and powerful performance.
One of the most attractive aspects of the SWM181CBT6 - 50 development board is its cost. The SWM181CBT6 chip can be purchased for as low as 5 dollars per unit, and the entire smallest system board from HelTec can be bought for 9.9 dollars with free shipping. This is significantly cheaper than other comparable chips like the STC89C52RC. Such low cost makes it an ideal choice for hobbyists, students, and small - scale projects where budget is a major concern.
The SWM181CBT6 chip on the development board has a variety of powerful hardware features. It is based on a 32 - bit ARM® Cortex™ - M0 core, which provides a good balance between performance and power consumption. The chip has a 24 - bit system timer and can operate at a maximum frequency of 48MHz. It also supports hardware single - cycle multiplication, which speeds up arithmetic operations.
The integrated nested vector interrupt controller (NVIC) offers up to 32 interrupts with 4 levels of configurable priority. This allows for efficient handling of different events and tasks in an embedded system. The chip can be programmed through the SWD interface, which is a simple and widely used programming method.
In terms of memory, it has 16KB of SRAM and different options for FLASH memory, including 64KB, 120KB, or 248KB, and user - customization is supported. This provides flexibility for different application requirements. The built - in LDO allows the chip to operate within a power supply voltage range of 2.3V (2.7V) to 3.6V, making it adaptable to different power sources.
The SWM181CBT6 - 50 development board has multiple serial interfaces. It has 4 UARTs, each with an independent 8 - byte FIFO, and can support a maximum master clock division of 16. This is useful for communication with other devices such as sensors, displays, or other microcontrollers. There are also 2 SPIs with 8 - byte independent FIFOs, supporting both SPI and SSI protocols and master/slave modes. This enables high - speed data transfer in applications like data acquisition or communication with external storage devices.
The 2 I2C interfaces support 8 - bit and 10 - bit address modes and both master and slave modes. This is commonly used for connecting to low - speed peripherals such as EEPROMs or sensors. Additionally, there is 1 CAN interface that supports both 2.0A (11 - bit identifier) and 2.0B (29 - bit identifier) protocols, which is crucial for automotive or industrial communication applications.
The PWM control module on the SWM181CBT6 is quite powerful. It has an 8 - channel 16 - bit PWM generator. The PWM signals can be configured to trigger interrupts under different conditions, such as high - level end or cycle start. It also supports various output modes like normal, complementary, and center - symmetric modes, along with dead - zone control. The interaction with the ADC is handled by hardware, which simplifies the design of applications that require analog - to - digital conversion and PWM control, such as motor speed control.
The timer module consists of 4 32 - bit general - purpose timers that can also be used as counters. One of the timers supports the HALL interface, which is useful in applications related to motor control and speed measurement, especially for brushless DC motors.
A practical application of the SWM181CBT6 - 50 development board is in the design of a smart car. In this application, the development board serves as the main controller. The first - version smart car can achieve several functions. It has left and right headlights to simulate the lighting states during driving, and a passive buzzer to mimic the car horn.
The PWM motor speed control function allows the car to adjust its speed according to different requirements. The car is also equipped with functions for tracking and ultrasonic obstacle avoidance and distance measurement. The battery power can be measured and displayed on an OLED screen, which also shows the ultrasonic distance measurement results.
In terms of the hardware circuit of the smart car, the power supply circuit has three voltage levels: 3.3V, 5V, and 7.4V. A 7.4V lithium - ion battery or two 18650 batteries are used as the power source, which is converted to 5V through an ASM117 - 5.0 regulator. The 5V power is used to supply the SWM181 smallest system board and the ultrasonic distance - measuring module, while the 3.3V power, converted from 5V on the smallest system board, is used for the controller and the obstacle - avoidance module. The 7.4V power is used to supply the headlights and the motors.
The tracking module uses the internal voltage comparator of the SWM181 and an infrared pair - tube. The infrared pair - tube, such as the ITR9909, can detect the difference in infrared reflection on different colors. When the car is on a white floor, the infrared light is reflected back, and the receiving tube sends a high - level signal to the microcontroller through the comparator. When the car is near a black line, the infrared light is absorbed, and the comparator outputs a low - level signal.
When using the SWM181CBT6 - 50 development board in Keil, proper memory configuration is essential. Since the SWM181CBT6 has 16KB of SRAM and 240KB of Flash, the Keil configuration can be modified to make full use of these resources. By referring to the memory mapping table in the data manual, the IROM can be set to 0X0000 0000 - 0X0003 C000, and the IRAM can be set to 0X 2000 0000 - 0x0000 4000.
In the startup_xxx.s file, several important operations are carried out. First, a stack is allocated, and the stack top is obtained using the label __initial_sp. Second, a heap is allocated, although in some cases, the heap size may be set to 0, which means the malloc() function in the C library cannot be used for memory allocation. Third, the exception vectors are specified, such as the RESET segment, which defines the stack top and the reset handler.
In conclusion, the SWM181CBT6 - 50 development board offers a cost - effective and feature - rich solution for a wide range of embedded system applications. Its hardware features, serial interfaces, PWM and timer modules, and suitability for practical applications like smart cars make it a valuable tool for developers in the field.