MSP430x11x1
MIXED SIGNAL MICROCONTROLLER
SLAS241C ± SEPTEMBER 1999 ± REVISED JUNE 2000
digital I/O (continued) |
|
|
The seven registers are: |
|
|
• Input register | 8 bits at port P1/P2 | contains information at the pins |
• Output register | 8 bits at port P1/P2 | contains output information |
• Direction register | 8 bits at port P1/P2 | controls direction |
• Interrupt edge select | 8 bits at port P1/P2 | input signal change necessary for interrupt |
• Interrupt flags | 8 bits at port P1/P2 | indicates if interrupt(s) are pending |
• Interrupt enable | 8 bits at port P1/P2 | contains interrupt enable bits |
• Selection (Port or Mod.) 8 bits at port P1/P2 | determines if pin(s) have port or module function |
All these registers contain eight bits. Two interrupt vectors are implemented: one commonly used for any interrupt event on ports P1.0 to P1.7, and one commonly used for any interrupt event on ports P2.0 to P2.7.
NOTE:
Six bits of port P2, P2.0 to P2.5, are available on external pins ± but all control and data bits for port P2 are implemented.
watchdog timer
The primary function of the watchdog timer (WDT) module is to perform a controlled system restart after a software problem has occurred. If the selected time interval expires, a system reset is generated. If this watchdog function is not needed in an application, the module can work as an interval timer, which generates an interrupt after the selected time interval.
The watchdog timer counter (WDTCNT) is a
Timer_A (Three capture/compare registers)
The Timer_A module on 11x1 devices offers one sixteen bit counter and three capture/compare registers. The timer clock source can be selected to come from two external sources TACLK (SSEL=0) or INCLK (SSEL=3), or from two internal sources, the ACLK (SSEL=1) or SMCLK (SSEL=2). The clock source can be divided by one, two, four, or eight. The timer can be fully controlled (in word mode) since it can be halted, read, and written. It can be stopped, run continuously, counted up or up/down, using one compare block to determine the period. The three capture/compare blocks are configured by the application to run in capture or compare mode.
The capture mode is primarily used to measure external or internal events using any combination of positive, negative, or both edges of the signal. Capture mode can be started and stopped by software. Three different external events TA0, TA1, and TA2 can be selected. At capture/compare register CCR2 the ACLK is the capture signal if CCI2B is selected. Software capture is chosen if CCISx=2 or CCISx=3 (see Figure 4).
The compare mode is primarily used to generate timings for the software or application hardware, or to generate
20 | POST OFFICE BOX 655303 •DALLAS, TEXAS 75265 |