msp430 PWM period calculation

Publisher:VS821001Latest update time:2018-06-28 Source: eefocusKeywords:msp430 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
example:
  P4DIR |= BIT1+BIT2+BIT3;                  // P4.1 - P4.3 output
  P4SEL |= BIT1+BIT2+BIT3;                  // P4.1 - P4.3 TBx options
  
  TBCCR0 = 512-1;                           // PWM Period
  TBCCTL1 = OUTMOD_7;                       // CCR1 reset/set
  TBCCR1 = LightCDPM;                       // CCR1 PWM duty cycle
  TBCCTL2 = OUTMOD_7;

In the up-counting mode, CCR0 is used for period timing, CCR1 is used for PWM duty cycle adjustment, TA1 -> PWM output:
512 (i.e. CCR0 value) X timer count clock = PWM period
128 (if it is CCR1 value) X timer count clock = PWM duty cycle
The actual PWM period is 512 clock cycles. Assuming that your timer B uses 8M clock, the actual PWM period = 512/8M = 64us


Keywords:msp430 Reference address:msp430 PWM period calculation

Previous article:MCU reads 4*4 matrix keyboard
Next article:【MSP430】Capture mode to measure signal duty cycle

Recommended ReadingLatest update time:2024-11-24 20:46

Design of serial communication between MSP430 microcontroller and PC based on VB6.0
  Serial communication has become the most widely used communication method for data exchange between computers and other devices. This paper mainly introduces how to use the serial communication module of MSP430 microcontroller and the serial communication control MSComm provided by VB6.0 to realize serial communicat
[Microcontroller]
Design of serial communication between MSP430 microcontroller and PC based on VB6.0
MSP430 reset circuit module
MSP430 MCU system reset circuit    From the above MSP430 system reset circuit function module diagram, we can see two reset signals, one is the power-on reset signal POR (Power On Reset) and the other is the power-on clear signal PUC (Power Up Clear).   The POR signal is the reset signal of the device. This signal
[Microcontroller]
Summary of Common Encryption in MSP430
 1 Why and how to encrypt? When your product is launched on the market, your competitors will start to target it. If the hardware of your product is easily imitated and the MSP430 microcontroller you use is not encrypted, then your hard-earned success can easily become your competitor's product. Although the JTAG debu
[Microcontroller]
MSP430 serial port receiving and sending interrupt program
MSP430 serial port receiving and sending interrupt program F149 #include msp430x14x.h unsigned char RecBuf ; //Receive data bufferunsigned char *SDat;        //Point to the data to be sentunsigned char Rindex;          //Receive data countunsigned char Tindex;          //Send data countunsigned
[Microcontroller]
Design of programmable filter based on MSP430 and MAX262
In electronic systems, filters are an indispensable and important link in data acquisition and signal processing, such as noise filtering before signal acquisition, "ladder-shaped" filtering of D/A conversion output, etc. The general active filter is composed of operational amplifiers and RC components, but the paramet
[Microcontroller]
Design of programmable filter based on MSP430 and MAX262
Design of Impedance Measurement System Based on MSP430F149
introduction Medical impedance measurement is a detection technology that uses the electrical properties and changes of biological tissues and organs to extract biomedical information related to the physiological and pathological conditions of organisms. It usually uses driving electrodes to send a small al
[Test Measurement]
Design of Impedance Measurement System Based on MSP430F149
MCU-based non-invasive visual pulse oximeter circuit
A pulse oximeter is a medical device used to monitor a patient's blood oxygen level. The device measures blood oxygen and heart rate and generates an alarm when it drops below a predetermined threshold. This type of monitoring is extremely useful for newborns and during surgical procedures. The MSP430FG437 microcontro
[Microcontroller]
MCU-based non-invasive visual pulse oximeter circuit
IAP Function Design of MSP43F149 Series MCU
TI's MSP430 series microcontrollers are products with high practical value and are widely used in many fields. In particular, their ultra-low power consumption is unmatched by any other microcontrollers. IAP (InApplication Programming) is the process of burning part of the user's Flash during the operation of the us
[Microcontroller]
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号