User manual
RP6 ROBOT SYSTEM - 2. The RP6 in detail
The controller is communicating to the world outside via 32 I/O Pins ("Input/Output
Pins"), organized in "Ports", each composed of 8 I/O Pins. This way the MEGA32
provides 4 "Ports": PORTA to PORTD. The controller is able to read the logical status
of these ports and process the information in software. Of course, the processor will
equally use the ports to output logical signals in order to control small loads up to 20
mA currents (e.g. LEDs).
Additionally the controller provides a number of integrated hardware modules for spe-
cial tasks. Implementing these tasks in software would normally be either very diffi-
cult or even impossible. One of these special tasks is timing. Three Timers for count-
ing clock periods are available. The timer modules are completely independent from
program flow. In fact, the microcontroller may even process other jobs while waiting
for a programmed counter level.
RP6 is using one of the timers to generate PWM signals (PWM="Pulse Width Modula-
tion") for speed-control of the motors and as soon as the timer has received appropri-
ate input parameters it will manage this task in background. We will discuss more de-
tails of the PWM signal generation in the chapter “Drive System”.
For example some other modules of the MEGA32 are:
● A serial interface (UART) for PC-communication with the RP6 USB Interface. Using
this interface you might also connect another microcontroller with an UART, as long
as the USB Interface is not connected.
● The "TWI"-module (="Two Wire Interface") providing the I²C Bus for expansion
modules.
● An Analog-to-Digital Converter (ADC) providing 8 input-channels for measuring
voltages with 10bit resolution. RP6 is using the ADC for monitoring the battery
voltage level, motor current-sensors and light intensity with two light-dependant
resistors.
● Three external interrupt inputs for generating interrupt signals, which will interrupt
the program flow in the controller and force the program to jump to a special "Inter-
rupt Service Routine". The microcontroller will then process this routine immeadi-
ately and return back to the normal program. We will be using this programming
feature for the odometry sensors. We will discuss this sensor in detail later on.
The integrated hardware modules do not have their own individual pins, but may be
used alternatively instead of standard I/O Pins. Normally you may freely choose these
special function mapping for the I/O Pins, but the RP6 almost completely provides a
standard configuration (as it is hard-wired to all components) for pins and modifying
the standard configuration will hardly be useful.
The MEGA32 provides a lot of other things, which cannot be de-
scribed in detail in this manual. You get more information on this in
the datasheet of the manufacturer (which can be found on the RP6
CD-ROM and on our Website).
- 18 -










