NEX Robotics
3. Input / Output Operations on the Robot
ATMEGA2560 microcontroller has ten 8 bit ports from PORT A to PORT F and PORT H to
PORT L (no PORT I) and PORT G has 6 bits. Input/output operations are the most essential,
basic and easy operations.
We need frequent I/O operations mainly to do following tasks:
Function
Robot Direction control
LCD display control
On Board Interrupt Switch
Buzzer control
Sharp & White line sensor control
Side Sharp Enable
IR Proximity Analog sensor
enable
Note:
* In the AVR microcontrollers while pin is used as input it can be pulled up internally by using
software enabled internal pull-up resistor. This internal pull-up as name indicates pulls up the
floating pin towards Vcc. This makes input pin less susceptible to noise.
** Power to the Sharp IR range sensor 2, 3, 4 and red LEDs of the white line sensor can be
turned on permanently by jumper 1 marked as J1 on the main board. In order to control
illumination by microcontroller, jumper J1 must be removed. For more details refer to the section
3.10, 3.11 and 3.12 of the Fire Bird V Hardware Manual.
*** Power to the Sharp IR range sensor 1, 5 can be turned on permanently by jumper 3 marked
as J3 on the main board. In order to control illumination by microcontroller jumper J3 must be
removed. For more details refer to the section 3.10, 3.11 and 3.12 of the Fire Bird V Hardware
Manual.
**** Fire Bird V has eight IR proximity Analog sensors out of which five are interfaced directly
to ATMEGA2560. Power to these eight IR proximity sensors can be turned on permanently by
jumper 2 marked as J2 on the main board. In order to control illumination by microcontroller
jumper J2 must be removed. For more details refer to the section 3.10, 3.11 and 3.12 of the Fire
Bird V Hardware Manual.
By disabling these sensors we can reduce current consumption by about 300mA and also allow
many robots work in the same field without interfering with each other's sensors by turning them
on and off in a predetermined schedule which can be synchronized via wireless communication
between these robots using XBee wireless module.
www.nex-robotics.com
Pins
Input / Output
PA3 to PA0
Output
PC0 to PC2
Input / Output
PC4 to PC7
PE7(INT7)
Input
PC3
Output
PG2
Output
PH2
Output
PH3
Output
Table 3.1
Fire Bird V Software Manual
Recommended
Initial State
Logic 0
Logic 0
Pulled up*
Logic 0
Logic 1 **
Logic 1***
Output ****
Logic 1
46
Need help?
Do you have a question about the Fire Bird V ATMEGA2560 and is the answer not in the manual?