TPU3 Digital In - Configure Time Processor Unit (TPU3) channel for digital input

Library

Target Support Package FM5/ MPC555 Driver Library/ Time Processor Unit (TPU3)

Description

The TPU3 Digital In block reads the logical state of the selected pin (channel) on the TPU3 submodules of the MPC555 or MPC56x. You can use this block in the same way as the MIOS Digital In block. You might need to use this block instead of the MIOS Digital In block, for example, if TPU is available but not MIOS. The Channel priority field specifies a number in the range 0..15, corresponding to 16 independent timer channels on each of the modules of the TPU3. The output of the block represents the logic state of the pin referenced in the module and channels fields. When the signal on a given pin is a logical 1, the block output signal will be equal to 1; otherwise the block output element will equal zero.

The TPU has 16 channels on each module A and B (MPC565 and 566 also have module C). You can use each of these channels independently, so for an MPC555 you could use up to 32 of these blocks, specifying different channels, at once.

Refer to Section 17, "Time Processor Unit 3," in the MPC555 User's Manual for further information, and the TPU3 Digital I/O Application Programming Note (search for "TPUPN18/D").

For an example showing how to use this block see the mpc555rt_io demo.

Dialog Box

TPU module

Select TPU module A, B or C; each has 16 channels. Note that the MPC555 only has modules A and B. MPC565 and MPC566 also have module C. An error will be thrown if you select C and your target processor does not support this.

TPU channel number

Choose 0-15.

Channel priority

Choose Low, Medium or High.

The host CPU makes a channel active by assigning it one of the three priorities. You choose the order in which channels are serviced by setting the channel number and assigned priority. The order in which channels are serviced is determined by assigned priority first, followed by channel number (lowest number first).

Sample time

The default is always 0.1 for input driver blocks, but you will need to change this to suit the frequency of your input signals.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS