terewbel.blogg.se

Pushing the drive on slate vcc
Pushing the drive on slate vcc










pushing the drive on slate vcc

Placing a pin in peripheral mode does not set the direction of the pin, which might be required depending on the peripheral. P1.1 is controlled bit 1 in several registers including P1SEL, P1DIR, P1OUT and P1IN working all together to define the functionality of the pin. The second number in the port number (Y in PX.Y) tells you which bit controls it. For example, PxSEL looks as follows: SEL P1.7 Note that each register bit controls only one pin in the port.

  • PxIN – If the pin is set to operate as GPIO Input, this pin indicates whether the voltage at the pin is High(0) or Low(0).
  • pushing the drive on slate vcc

  • PxOUT – If the pin is set to operate as GPIO Output, this pin selects High (1) or Low (0) output.
  • PxDIR – If the pin is set to operate as GPIO, the bits in this register select whether a pin is a high impedance input (0) or an output(1).
  • PxSEL2 is not always available and is used to augment the number of multiplex options if the pin has various specialized functions.
  • PxSEL and PxSEL2 – These registers selects whether the pin operates in GPIO mode or is used for a specialized function as described in the pinout.
  • The following is a list of registers always available for ports: The MSP430F2553 has a total of 2 ports, Port 1 and Port 2.Įach port is assigned several 8-bit registers that control the function of the pins and provides information on their current status. The number of Ports and pins is device specific and can be obtained in the device datasheet. Notice that some pins are GPIO only, with no specialized function. Pins capable of GPIO functionality and control are indicated with the naming PX.Y, where X represents the port number to which the pin belongs and Y represents Pins belonging to port one are denoted by P1.Y, while pins forming Port 2 are named P2.Y where Y is a specific pin number.

    pushing the drive on slate vcc

    You might even end up changing the microcontroller if the one you currently use doesn’t provide the right mix of GPIO and peripheral pins.

    pushing the drive on slate vcc

    Pins are not born equal, and in some instances you will save yourself a lot of headache if you consider carefully what you need and what is available. Because of the limited number of I/O pins and application requirements, you must carefully consider the use of each pin of the design. You might not realize it, but you have just stumbled upon one of the first thing every embedded designer must do. As GPIO pins, each pin is independently controlled and can be made an input and an output, high or low. Most pins of the MSP430 operate as GPIO pins, with a possibility of functioning as a specialized pin in the right configuration. This means that each pin has a number of functions that it can perform, but only one of them at a time. Because microcontrollers have a limited number of pins and at the same time a large number of peripherals, the manufacturer has to multiplex the pins among the internal modules. Looking at the pins in the diagram we notice that each pin has a long name, with several designations separated by a slash. Lets take a look at the pinout diagram of the G2553 device as provided by TI on page 3 of the MSP430G2553 datasheet: Looking physically at any microcontroller you can readily see rows of pins that allow the microcontroller to control and communicate with outside devices. GPIO stands for General Purpose Input Output and refers to the fact that the pins can support both output and input functionalities.












    Pushing the drive on slate vcc