Journal Entries
Tarhonda Justin
Wednesday, January 23, 2002 (Lecture)
Today, before the lecture, we quickly viewed
some upgrades for our web page for the first time as a team. We only
had about 5 or 10 minutes, but it was fun and exciting to see all of the
different free things you can download to add some color to a page.
The lecture for the day consisted of an in-depth
study of how the RCX microprocessor works. The Power Point Presentation
for the RCX
Lecture contains pictorial information on the internal workings of
the microprocessor as well as study notes.
The RCX Brick
The lecture began with informational facts about the Lego Brick:
-
16 million cycles/sec
-
16,000 bytes ROM (this stores basic system software and hardware BIOS)
-
32,000 bytes RAM (this stores firmware and programs)
-
8 bit processor
-
8--10 bit analog to digital converter (210-1 = 1023, the digital
value that is displayed on the LCD screen)
-
3 input ports labeled "1", "2", and "3" (these ports activate different
types of sensors)
-
3 output ports labeled "A", "B", and "C" (these ports run motors)
The RCX communicates with the infra red tower through an infra red transmitter/receiver
on its front. This allows for program downloads and system checks.
Firmware
The RCX also has an external part to its operating system called firmware.
This software is stored in RAM and can be continually upgraded for programming
purposes. This operating system allows the RCX to recognize program
languages an takes up the majority of RAM leaving 6,000 bytes for programs
by the user (approximately 1000 lines of instructions). This is small
in comparison to a personal computer but is large in comparison to the
RCX microprocessor.
LCD Display
The LCD displays:
-
the system clock
-
the value on input and output ports
-
the number of the program currently running
-
the indicator for the catalog sensor (this sensor has 1 minute divided
into 4 sections of 15 seconds each)
Power Levels
For a demonstration of the output port power levels, an oscilloscope
was used. This enabled us to see the value of voltage readouts at
different power setting of the RCX. However, even though the LCD
displays 8, the highest programmable power level is 7 (this is because
the levels start at 0 which is equal to 1).
Notes:
-
If a set of sensors and motors were connected in parallel (i.e. on the
same port) the same voltage is applied to everything.
-
Inductors keep the power going where as resisters make the current discharge.
-
Conductors take in the current
-
The design of the sensor port prevents the RCX from shorting.
-
The instructor enabled us to listen to a square wave, unfortunately it
shorts the microprocessor
-
Shorting causes a voltage to read 0
-
Motors create the largest power drain on the RCX
-
Polarity is determined by the way sensors are connected to the ports
-
The microprocessor reads the voltage drop to configure output
-
The microprocessor alternates quickly between task to make it appear that
multiple task run simultaneously
Passive loads
-
Touch sensor
-
Temperature sensor
These types of sensors have no resistance.
Active Loads
-
Light sensor
-
Rotation sensor
Input Port
Input port readings with no load have a voltage drop of 5 volts equal
to 1023 by the A/D converter.
-
5V=1023 display
-
2.5V=512 display
-
1.5V=307 display (equivalent to 1 AA battery)
Notes:
-
Open circuits prevent current flow (display reads 1023)
-
Closed circuits allow current flow (display reads 0)
-
Voltage loops equal 0
-
When a load resistor equals the internal resister, the voltage is split
between
Voltage Law: The sum of a voltage drop on a closed loop =
0
Ohm's Law: Voltage drop across a resistor = Resistance*Current
= RI (V=IR)
To determine resistance or current in the RCX: -5 + IR
+IRL = 0 or I= 5/(R + RL)
Therefore voltage across the load resistor of the RCX: VRCX = IRL
= 5RL/(10,000 + RL)
The LCD readout: LCD = 1023RL/(10,000 + RL)
Homework: Read chapter 4