Port Integration Module

Download Report

Transcript Port Integration Module

Port Integration Module

HCS12 Technical Training Module 6 – Port Integration, Slide 1 MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc. 2001.

HCS12 - Port Integration Module On the HCS12 each port has a set of control registers (in the PIM) arranged in a similar structure where each individual I/O pin can be configured for:

• Input/output selection (Ports T,S,M,P,H,J ) • Drive strength reduction • Enable and polarity of pull resistors • Interrupt enable and status flags A standard port has the following minimum features: • Input/output selection by bit.

• 5V output drive with two selectable drive strengths • 5V digital or interrupt inputs • Input with selectable pull-up or pull-down device

Optional features: • Open drain for wired-or connections(Ports S,M) • Interrupt inputs with glitch filtering (Ports P,H,J ) Interrupt polarity Port A, B, E and K are part of the core, not part of PIM.

Port Input Registers can be used to detect overload or short circuit conditions on output pins.

HCS12 Technical Training Module 6 – Port Integration, Slide 2 MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc. 2001.

HCS12 - Port Integration Module

HCS12 Technical Training Module 6 – Port Integration, Slide 3 MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc. 2001.

HCS12 Input / Output

Logic Thresholds:

High: 0.65 X Vdd = 3,25V Low : 0.35 X Vdd = 1,75V

Drive current:

Output High: Full Drive: 12.5mA at Vdd -.8V

Partial Drive: 1.25mA at Vdd -.8V

Output Low: Full Drive: -12.5mA at .8V

Partial Drive: -1.25mA at .8V

Pullup/Pulldown resistors:

Pull Enable Registers enable or disable Polarity Select Registers control pullup or pulldown Approx. 100 uA

Wired-or mode:

Ports S and M have wired-or mode (open drain) capability HCS12 Technical Training Module 6 – Port Integration, Slide 4 MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc. 2001.

HCS12 I/O Pins

• • • • • •

Output Fault Detection:

• Ability to read pin state of outputs via Input Registers

Reduced drive mode:

• Controlled by Reduced Drive Registers useful for EMC on SPI lines, PWM, etc.

Unused pins on PWB design:

• Configure as output and leave open, • Leave as input and enable pullup/pulldown, • Leave as input and tie to gnd. Write data register to 0.

Special considerations for 80 pin package:

• Same die as in 112 pin package.

• Floating pads on die must be input with pulldown or output with driven to 0.

• Also reference - EB386: “ Family Compatibility Considerations”

Transient protection:

• Limit short duration injection currents to +/- 25 mA

Steady State injection currents:

• Up to 2.5 mA per pin, 25 mA per pkg.

HCS12 Technical Training Module 6 – Port Integration, Slide 5 MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc. 2001.

HCS12 PIM - Rerouting Module Routing Register: The purpose of the Module Routing Register is to provide maximum flexibility for future derivatives of the HCS12 with a lower number of modules and lower pin count packages.

HCS12 Technical Training Module 6 – Port Integration, Slide 6 MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc. 2001.

Port T Registers

PPT - Port T I/O Reg.

Address Offset $0000 A read returns latched value when configured for output or value at the input pin when when configured as input.

DDRT - Port T Direction Reg.

PTIT- Port T Input Register RDRT - Port T Reduced Drive Reg.

$0002 DDRTx = 0 Pin is Input = 1 Pin is Output $0001 Contains current pin status This register may be used to detect overload or short circuit condition on the output pin $0003 RDRT x = 0 Pin output full drive = 1 Pin output 1/3 drive PERT - Port T Pull Device Enable Reg.

$0004 PERTx 0 = Pull-up/down disabled 1 = Pull-up/down enabled PPST - Port T Polarity Select Reg.

$0005 PPSTx 0 = Port T pin x has pull-up 1 = Port T pin x has pull-down

HCS12 Technical Training Module 6 – Port Integration, Slide 7 MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc. 2001.

Port S Registers

PPS - Port S I/O Reg.

Address Offset $0008 A read returns latched value when configured for output or value at the input pin when when configured as input.

DDRS - Port S Direction Reg.

$000A DDRS x = 0 Pin is Input = 1 Pin is Output PTIS- Port S Input Reg.

$0009 Contains current pin status RDRS - Port S Reduced Drive Reg.

$000B RDRS x = 0 Pin output full drive = 1 Pin output 1/3 drive PERS - Port S Pull Device Enable Reg.

$000C PERS x 0 = Pull-up/down disabled 1 = Pull-up/down enabled PPSS - Port S Polarity Select Reg.

$000D PPSS x 0 = Port S pin x has pull-up 1 = Port S pin x has pull-down WOMS - Port S Wired-Or Reg.

$000E PPSS x 0 = Push-pull output 1 = Open-drain output

HCS12 Technical Training Module 6 – Port Integration, Slide 8 MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc. 2001.

Port M Registers

PPS - Port M I/O Reg.

DDRM - Port M Direction Reg.

PTIM- Port M Input Reg.

Address Offset $0010 A read returns latched value when configured for output or value at the input pin when when configured as input.

Note: If both CAN0 and BDLC are enabled, CAN functionality takes precedence

$0012 DDRM x = 0 Pin is Input = 1 Pin is Output $0011 Contains current pin status RDRM - Port M Reduced Drive Reg.

$0013 RDRM x = 0 Pin output full drive = 1 Pin output 1/3 drive PERM - Port M Pull Device Enable Reg.

$0014 PERM x 0 = Pull-up/down disabled 1 = Pull-up/down enabled PPSM - Port M Polarity Select Reg.

$0015 PPSM x 0 = Port S pin x has pull-up 1 = Port S pin x has pull-down WOMM - Port M Wired-Or Reg.

$0016 PPSM x 0 = Push-pull output 1 = Open-drain output

HCS12 Technical Training Module 6 – Port Integration, Slide 9 MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc. 2001.

Port P Registers

PTP - Port P I/O Reg.

DDRP - Port P Direction Reg.

PTIP- Port P Input Reg.

Address Offset $0018 A read returns latched value when configured for output or value at the input pin when when configured as input.

Note: If both PWM and SPI are enabled, PWM functionality takes precedence

$001A DDRP x = 0 Pin is Input = 1 Pin is Output $0019 Contains current pin status RDRP - Port P Reduced Drive Reg.

$001B RDRP x = 0 Pin output full drive = 1 Pin output 1/3 drive PERP - Port P Pull Device Enable Reg.

$001C PERP x 0 = Pull-up/down disabled 1 = Pull-up/down enabled PPSP - Port P Polarity Select Reg.

PIEP - Port P Interrupt Enable Reg.

$001D PPSP x 0 = Falling edge on pin x sets corresponding PIFP Flag.

(Pull-up device connected) 1 = Rising edge on pin x sets corresponding PIFP flag.

(Pull-down device connected ) $001E PIEP x 0= Interrupt disabled 1 = Interrupt Enabled $001F PIFP x Interrupt Flag Write ‘1’ to clear PIFP - Port P Interrupt Flag Reg.

HCS12 Technical Training Module 6 – Port Integration, Slide 10 MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc. 2001.

Port H Registers

PTH - Port H I/O Reg.

DDRH - Port H Direction Reg.

PTIH- Port H Input Reg.

Address Offset $0020 A read returns latched value when configured for output or value at the input pin when when configured as input.

$0022 DDRH x = 0 Pin is Input = 1 Pin is Output $0021 Contains current pin status RDRH - Port H Reduced Drive Reg.

$0023 RDRH x = 0 Pin output full drive = 1 Pin output 1/3 drive PERH - Port H Pull Device Enable Reg.

$0024 PERP x 0 = Pull-up/down disabled 1 = Pull-up/down enabled PPSH - Port H Polarity Select Reg.

PIEH - Port H Interrupt Enable Reg.

$0025 PPSH x 0 = Falling edge on pin x sets corresponding PIFH Flag.

(Pull-up device connected) 1 = Rising edge on pin x sets corresponding PIFH flag.

(Pull-down device connected ) $0026 PIEH x 0= Interrupt disabled 1 = Interrupt Enabled PIFH - Port H Interrupt Flag Reg.

$0027 PIFH x Interrupt Flag Write ‘1’ to clear

HCS12 Technical Training Module 6 – Port Integration, Slide 11 MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc. 2001.

PTJ - Port J I/O Reg.

DDRJ - Port J Direction Reg.

PTIJ- Port J Input Reg.

Port J Registers

Address Offset $0028 A read returns latched value when configured for output or value at the input pin when when configured as input.

Note: If both CAN4 and IIC are enabled, CAN Functionality takes precedence

$002A DDRJ x = 0 Pin is Input = 1 Pin is Output $0029 Contains current pin status RDRJ - Port J Reduced Drive Reg.

$002B RDRJ x = 0 Pin output full drive = 1 Pin output 1/3 drive PERJ - Port J Pull Device Enable Reg.

$002C PERJ x 0 = Pull-up/down disabled 1 = Pull-up/down enabled PPSJ - Port J Polarity Select Reg.

PIEJ - Port J Interrupt Enable Reg.

$002D PPSJ x 0 = Falling edge on pin x sets corresponding PIFH Flag.

(Pull-up device connected) 1 = Rising edge on pin x sets corresponding PIFH flag.

(Pull-down device connected ) $002E PIEJ x 0= Interrupt disabled 1 = Interrupt Enabled PIFJ - Port J Interrupt Flag Reg.

$002F PIFJ x Interrupt Flag Write ‘1’ to clear

HCS12 Technical Training Module 6 – Port Integration, Slide 12 MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc. 2001.

HCS12 PIM - Rerouting

HCS12 Technical Training Module 6 – Port Integration, Slide 13 MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc. 2001.