DSPRelated.com
Forums

Using PWM fault inputs as General Digital Inputs?

Started by Yochum, William September 23, 2002
Hi,

This is a 56F80x issue, and it's a rather speculative question for the
group.

Does anyone have any comments on the feasibility of re-using the PWM fault
inputs as extra General Purpose Digital Inputs? Has anyone ever tried this?

It seems like it might provide an additional source of "free" input pins for
applications that use a lot of GPIO.

Any comments are welcome.

Thanks,
Bill Yochum



Yes, we use them quite often as General Purpose Digital Inputs. We set the PWM
Disable Mapping Registers (PWMDISMAP1-2) to all zero (so the PWM ignores the
Fault0-3 inputs), and read from the PWM Port Register (PMPORT). This is
explained in Sections 11.7.9 and 11.7.12 in the DSP56F80x User's Manual.
Example code is shown below.

// Digital input data from PWMA current status and fault inputs:
// Bit 6 = ISA2
// Bit 5 = ISA1
// Bit 4 = ISA0
// Bit 3 = FAULTA3
// Bit 2 = FAULTA2
// Bit 1 = FAULTA1
// Bit 0 = FAULTA0
UWord16 PwmA_dig_inputs;

// Disable all fault mapping for PWMA
ArchIO.PwmA.DisableMapping1Reg = 0;
ArchIO.PwmA.DisableMapping2Reg = 0;

// Read the PWMA digital inputs from the PMPORT register
PwmA_dig_inputs = ArchIO.PwmA.PortReg; Regards,

Art Johnson
Senior Systems Analyst
PMC Prime Mover Controls Inc.
3600 Gilmore Way
Burnaby, B.C., Canada
V5G 4R8
Phone: 604 433-4644
FAX: 604 433-5570
Email:
http://www.pmc-controls.com

-----Original Message-----
From: Yochum, William [mailto:]
Sent: Monday, September 23, 2002 9:03 AM
To:
Subject: [motoroladsp] Using PWM fault inputs as General Digital Inputs? Hi,

This is a 56F80x issue, and it's a rather speculative question for the
group.

Does anyone have any comments on the feasibility of re-using the PWM fault
inputs as extra General Purpose Digital Inputs? Has anyone ever tried this?

It seems like it might provide an additional source of "free" input pins for
applications that use a lot of GPIO.

Any comments are welcome.

Thanks,
Bill Yochum
_____________________________________
Note: If you do a simple "reply" with your email client, only the author of this
message will receive your answer. You need to do a "reply all" if you want your
answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join:

To Post:

To Leave:

Archives: http://www.yahoogroups.com/group/motoroladsp

More Groups: http://www.dsprelated.com/groups.php3 ">http://docs.yahoo.com/info/terms/