CC430 MCU digital IO port learning

Publisher:BlossomJoyLatest update time:2015-12-24 Source: eefocusKeywords:CC430 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

   When I first came into contact with CC430 microcontroller, I felt a little confused, but it was a good thing CC430 MCU digital IO port learning. However, when you read the program carefully, some code styles are refreshing to me, a newborn calf. I have never seen them before. It's no wonder, after all, I still have a lot to learn CC430 MCU digital IO port learning. CC430 is a microcontroller with wireless transceiver function based on MSP430 as the core. It is designed for sensor networks, making it involved in the vast space of the Internet of Things. With in-depth learning, I found that if you have learned MSP430 programming before, then using CC430 is also a piece of cake. The programming style is completely similar (if you have not used MSP430, you can't say it is similar CC430 MCU digital IO port learning).

   People always like to pick the softest persimmons. For personal style, learning this microcontroller starts from the digital IO port CC430 MCU digital IO port learning. Some people may think that we should first analyze it from the CPU architecture. This aspect is indeed very important, but for a pragmatist CC430 MCU digital IO port learning, the chip is analyzed from the perspective of application. Of course, this analysis is not comprehensive enough, but after reading it, there is absolutely no problem in using it. Otherwise, I'd better publish a book. Based on the importance of CPU architecture, you should be familiar with this chip and then come back to analyze it. At that time, you will have more experience CC430 MCU digital IO port learning. Wow, why did I say so much nonsense? I'm almost a chatterbox CC430 MCU digital IO port learning.

 

The prologue slowly opens...CC430 MCU digital IO port learning

 

The main functions of the IO port: 1. Ordinary IO port and special function IO port (AD conversion port)            PxSEL

               2. IO port direction (input or output)                      PxDIR

               3. Input and output status (high or low)                    PxIN   or   PxOUT

                4. Use of pull-up resistor during input (pull-up or pull-down or disable)   PxREN

               5. IO port interrupt function (only P1 and P2 ports)                PxIFG, PxIE, PxIES, PxIV

 

PxSEL = 0 Normal IO port function

     = 1 Peripheral module function----IO port interrupt function is disabled at this time

 

PxIN   = 0 Normal IO port input is low level

     = 1 Normal IO port input is high level

 

PxOUT  = 0 The output of the common IO port is low level

     = 1 The output of the common IO port is high level

 

PxDIR, PxREN, PxOUT follow me

PxDIR          PxREN          PxOUT          IO Configuration

                                     Input

                                       Input and pull down

                                       Input and pull-up

                                       Output

Description: When IO is set to input state, PxOUT is assigned a new task to set the pull-up and pull-down process

 

 

Interrupt description: PxIFG and PxIE meet each other often, they are old friends, so I won’t introduce them.

         

         P1IV register, when reading the interrupt, it is up to this brother to select which interrupt vector.

         PxIES register, interrupt mode (rising edge or falling edge)

                      Bit is 0: When the rising edge occurs, the PxIFGx interrupt flag is set.

                      Bit is 1: When the falling edge occurs, the PxIFGx interrupt flag is set.

 

 

That’s all I have to say about IO CC430 MCU digital IO port learning. If you have any questions or errors, please leave your comments and we can discuss together.

Keywords:CC430 Reference address:CC430 MCU digital IO port learning

Previous article:Insights based on the AD conversion function of the CC2430 chip
Next article:ADC learning of CC430 microcontroller

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号