NEX Robotics
D. To disable pull-ups of all the ports we need to set Bit 2 of SFIOR to logic one.
Special Function I/O register – SFIOR
Pin
Read/ Write
Initial Val
Bit 2-PUD: Pull-Up Disable
When this bit is written to one, the pull-ups in all the I/O ports are disabled even if the DDRxn
and PORTxn Registers are configured to enable the pull-ups ({DDRxn, PORTxn} = 0b01).
E. Toggling the Pin
Writing a logic one to PINxn toggles the value of PORTxn, independent on the value of DDRxn.
Note that the SBI instruction can be used to toggle one single bit in a port. Where 'x' is the port
name and 'n' is the bit number.
3.2 ATMEGA2560 microcontroller pin configuration
PIN
Pin name
NO
1
(OC0B)PG5
2
RXD0/PCINT8/PE0
3
TXD0/PE1
4
XCK0/AIN0/PE2
5
OC3A/AIN1/PE3
6
OC3B/INT4/PE4
7
OC3C/INT5/PE5
8
T3/INT6/PE6
9
CLK0/ICP3/INT7/ PE7
10
VCC
11
GND
12
RXD2/PH0
13
TXD2/PH1
14
XCK2/PH2
15
OC4A / PH3
16
OC4B / PH4
www.nex-robotics.com
TSM
-
R/W
R
0
0
Slave Select (SS) of the SPI expansion port on the main
board (refer to figure 3.5)
UART 0 receive for XBee wireless module (if installed)
UART 0 transmit for XBee wireless module (if installed)
GPIO* (Available on expansion slot of the microcontroller
socket)
PWM output for C2 motor drive
External Interrupt for the left motor's position encoder
External Interrupt for the right motor's position encoder
External Interrupt for the C2 motor's position encoder
External Interrupt for Interrupt switch on the
microcontroller board, External Interrupt for the C1 motor's
position encoder, Connection to TSOP1738 if pad is
shorted ********
5V
Ground
UART 2 receives for USB Communication.
For more details refer to section 3.19.7
UART 2 transmit for USB Communication.
For more details refer to section 3.19.7
Sharp IR ranges sensor 1and 5 enable / disable.
Turns off these sensors when output is logic 1 *******
IR proximity sensors 1 to 8 enable / disable.
Turns off these sensors when output is logic 1 *******
GPIO* (Available on expansion slot of the microcontroller
-
-
ACME
R
R
R/W
0
0
0
Table 3.4
USED FOR
Fire Bird V Software Manual
PUD
PSR0
R/W
R/W
0
0
PSR321
R/W
0
Status
--
Default
Default
Output
Input
Input
Input
Input
Default
Default
Output
Output
--
49
Need help?
Do you have a question about the Fire Bird V ATMEGA2560 and is the answer not in the manual?