76
7679H–CAN–08/08
AT90CAN32/64/128
9.3.3
Alternate Functions of Port B
The Port B pins with alternate functions are shown in
.
The alternate pin configuration is as follows:
• OC0A/OC1C, Bit 7
OC0A, Output Compare Match A output. The PB7 pin can serve as an external output for the
Timer/Counter0 Output Compare A. The pin has to be configured as an output (DDB7 set “one”)
to serve this function. The OC0A pin is also the output pin for the PWM mode timer function.
OC1C, Output Compare Match C output. The PB7 pin can serve as an external output for the
Timer/Counter1 Output Compare C. The pin has to be configured as an output (DDB7 set “one”)
to serve this function. The OC1C pin is also the output pin for the PWM mode timer function.
• OC1B, Bit 6
OC1B, Output Compare Match B output. The PB6 pin can serve as an external output for the
Timer/Counter1 Output Compare B. The pin has to be configured as an output (DDB6 set “one”)
to serve this function. The OC1B pin is also the output pin for the PWM mode timer function.
• OC1A, Bit 5
OC1A, Output Compare Match A output. The PB5 pin can serve as an external output for the
Timer/Counter1 Output Compare A. The pin has to be configured as an output (DDB5 set “one”)
to serve this function. The OC1A pin is also the output pin for the PWM mode timer function.
• OC2A, Bit 4
OC2A, Output Compare Match A output. The PB4 pin can serve as an external output for the
Timer/Counter2 Output Compare A. The pin has to be configured as an output (DDB4 set “one”)
to serve this function. The OC2A pin is also the output pin for the PWM mode timer function.
• MISO – Port B, Bit 3
MISO, Master Data input, Slave Data output pin for SPI channel. When the SPI is enabled as a
master, this pin is configured as an input regardless of the setting of DDB3. When the SPI is
enabled as a slave, the data direction of this pin is controlled by DDB3. When the pin is forced to
be an input, the pull-up can still be controlled by the PORTB3 bit.
• MOSI – Port B, Bit 2
Table 9-6.
Port B Pins Alternate Functions
Port Pin
Alternate Functions
PB7
OC0A/OC1C (Output Compare and PWM Output A for Timer/Counter0 or Output Compare
and PWM Output C for Timer/Counter1)
PB6
OC1B (Output Compare and PWM Output B for Timer/Counter1)
PB5
OC1A (Output Compare and PWM Output A for Timer/Counter1)
PB4
OC2A (Output Compare and PWM Output A for Timer/Counter2 )
PB3
MISO (SPI Bus Master Input/Slave Output)
PB2
MOSI (SPI Bus Master Output/Slave Input)
PB1
SCK (SPI Bus Serial Clock)
PB0
SS (SPI Slave Select input)