Digin and digout test, Analog tests, User pwms – Pioneer 2 / PeopleBot User Manual

Page 34: Digin, Digout t, Analog t, Ests

Advertising
background image

Joydrive and Self Tests

DIGIN and DIGOUT Test

A subsequent self-test lets you examine the values of the eight digital input (ID0

7) and

output (OD0-7) ports associated with User I/O on your ActivMedia robot’s microcontroller.

The state of each port is mapped into a series of eight digits displayed on the LCD. Each
digit, 0 or 1, representing the ON or OFF state of a port, numbered right-to-left from 0 to 7.
For instance, in the example below, digital input (DIGIN) ports 1 and 5 are ON; the rest are
OFF

:

DIGIN: 00100010

DIGOUT: 01010101

The DIGOUT ports automatically and rhythmically toggle ON and OFF.

The basic microcontroller has no attachments to the I/O ports. Because their normal
state is floating, the DIGIN readings will vary. The DIGIN self-test becomes useful, of
course, when you have equipment attached to one or more of the digital input ports.

See Appendix A for the location of the digital input and output ports.

ANALOG Tests

P2OS versions 1.2 and later let you alternatively use four of the digital input ports as

analog-to-digital (A/D) input ports. And there is one dedicated A/D port on the User I/O

connector. The ANALOG self-test measures the voltage (0-5 VDC) applied to each of
the A/D ports and display its digitized value as a single byte in hexadecimal on the LCD:

ANALOG #1: A9

13.2*

Press the white MOTORS button to select the next analog port, 2-5. Port #5 is the
dedicated and default A/D port. Like DIGIN, the measured value is unreliable unless you
connect something to the port.

See Appendix A for the location of the A/D ports on the microcontroller.

User PWMs

P2OS versions 1.2 and later let you alternatively use four of the digital output ports as

pulse-width-modulating sources to drive servo motors, for example. The User PWM self-
test puts a one millisecond pulse onto each of these four PWM ports. Monitor them with

an oscilloscope.

See Appendix A for the location of the PWM ports on the microcontroller.

28

Advertising