Bringing up the Miniboard.

Written by Chuck McManis

HTML Version and Local Mods by Joe Pfeiffer

Now that you've got the miniboard constructed you will need to bring it up. This is a relatively straight forward process, however by following certain steps you can eliminate difficulties later on. The steps you need to perform are:
  1. Verify the Assembly
  2. Check for shorts
  3. Install the integrated circuits
  4. Attach a computer to the serial port
  5. Power up the miniboard
  6. Download Hexmon40
  7. Check out Hexmon
  8. Check out the digital input port (PORT C)
  9. Verify the A/D channels.
  10. Verify the motor drivers

  1. Verify the Assembly
  2. If you've followed all of the steps in the manual, you should verify the assembly before you plug in the 74HC04 and 68HC11 chips. This can be done as follows:

    1. With a magnifier or a hand held microscope verify that all solder connections on the board are shiny and that there are no ``bridges'' between them.

  3. Check for shorts
    1. Attach the battery pack with the switch in the off position to the miniboard.

    2. Next take two pieces of lead from one of the components you've installed and press them into pin 7 and pin 14 of the 74hc04 socket. Connect a voltmeter with the ``+'' lead at pin 14 and the ``-'' lead at pin 7. Now apply power to the miniboard and observe the voltage on the voltmeter. If it is 5V, proceed to the next step.

      If it is not 5V then you have a short on the board somewhere. The most likely place for this is dual headers around the miniboard that are connected to 5V and Gnd. Other possibilities are the pins of the voltage regulator.

      To eliminate a solder bridge you can use a solder ``sucker'' or solder-wick type remover. Note that if you use a sucker type they can splash molten solder on other parts of the board. You can also hold the board over the tip of your soldering iron, then touch the solder bridge and the excess solder will flow off of the board and on to your iron.

  4. Install the integrated circuits
  5. Install the integrated circuits (CPU + 74HC04) making sure that the pins of the 74HC04 all go into the socket, and that the CPU is firmly seated in its socket.

  6. Attach a computer to the serial port
  7. Now attach a phone cord between the connector on the back of your host computer to the connector on your miniboard.

  8. Power up the miniboard
  9. Set the Run/Download switch into the ``Download'' position (away from the CPU) and switch the power to the miniboard on. The RED LED labeled PWR should remain off (or at least should be very dim).

    If the RED LED lights up, or the motor LEDS flicker, then you are probably not in download mode. This can be caused by a defective run/download switch or an open connection (eg a bad solder joint) on the switch.

  10. Download Hexmon40
  11. Use the GDL instructions to download /home/CS273/pub/hexmon40clean.s19 to the miniboard (you can drag-n-drop this filename into gdl).

    Watching the LEDs, the PWR LED should remain off during the initial Downloading Boot download and then turn on brightly when GDL switches to Syncing With HC11 and Downloading EEPROM.

    Note that the Downloading Boot section will always appear to work, even with the Miniboard powered off, because the RS-232 stuff hardware echoes characters.

    If the user code fails to load then the CPU is probably in the wrong mode or not running. There are several possible causes:

    1. The miniboard isn't powered up. Check the power connections to the screw terminals and that the power switch is ``on.''

    2. The miniboard is not in Download mode. Check the Download/Run switch.

    3. The miniboard is not connected to the host, or the cable is loose in the connector.

      (The above three possibilities cover 99% of all the cases we've ever actually seen)

    4. There is a solder bridge between some of the CPU pins. The important ones here are the R/W, AS, RESET, XIRQ, and IRQ pins.

    5. The RESET or IRQ push button is shorted. You can test this by putting your voltmeter on the RESET (or IRQ) pin and it should read 5V, when you press the button it should switch to 0V. If the exact opposite happens that is you push the button and the input goes to 5V then you've got ``normally closed'' switches and you need to replace them with the ``normally open'' type. (this will only happen if you didn't use the part #'s in the list.) More likely the input will be stuck at 0V meaning that you have a short to ground somewhere between the switch and the CPU.

    6. The crystal is not oscillating. If you didn't get the crystal with three pins then you need a capacitor bypass to ground. This can be achieved with two small ceramic disks (10 - 50pf) which have two legs joined together and then soldered to ground and the remaining legs soldered to each pin of the crystal. This is easiest to do from the bottom of the board.

      Testing for oscillation is difficult without an oscilloscope, however you can sometimes use the ``AC'' setting of a multimeter to detect a clock signal is present. (0V = no signal, ~2 V signal present)

    7. The CPU is defective. This is not very likely but if you have a spare CPU swap it out. Also recheck to see that the CPU is correctly oriented in the socket and that no foreign matter has wedged itself between the pins and the chip itself.

  12. Check out Hexmon
    1. Now put the run/download switch into the RUN position (toward the CPU) and press RESET . The PWR and RCV lights should be on.

    2. Bring up GDL's Communicate window and check to see that the miniboard prints a ``>'' character every time you press reset.

    3. Type w00ff005d and the RED motor LEDs should all light. In the Serial Comm window you should see >w00ff005dw>. The miniboard echoed all characters and added w> to the end.

    4. Type w00f0005d and all of the Green Motor LEDs should light up and the red ones will turn off. The emulator window will show >w00ff005dw>w00f0005dw> (the >w00ff005dw> is left over from the previous step).

    Congratulations, your miniboard is successfully running Hexmon and is well on its way to being completely checked out. You can find information on the Hexmon monitor program, and what the commands you're using mean, in the lab manual starting on page 76.

  13. Check out the digital input port (PORT C)
    1. Construct a button sensor (push button with two wires) or touch sensor (microswitch with two wires) and plug it into PORT C, bit 0. Pay careful attention to the orientation shown in the figure - one pin goes into each of two header strips where the two red dots are, the two pins don't go into a single header strip.

    2. Type r00001003. Hexmon should print back ff (in the Serial Comm window it will look like >r00001003rff>).

      If you don't get 'ff' and get something else then convert that number to binary and for every 'bit' that is not '1' you have a short to ground or an open connection to the resistor pack.

    3. Now, while pressing the button, type r00001003 again (this requires either some dexterity or a partner) and the resulting display should be r00001003rfe>.

      What's happening here is that each position along the header strip corresponds to one bit when the digital input is read. When you push the button on the least significant bit, the result is 11111110 in binary, so when Hexmon reports it in hexadecimal you see fe.

      If the answer comes back anything zero bits other than the least significant bit fe (like fc for instance) then it means you've got a short between the input you've plugging into and an adjacent line. If you still get ff, either you have an open connection on that input bit, or your test switch setup is faulty.

    4. Now move the button to the next space in the connector and repeat this step, each time verifying that one, and only one, bit goes to 0 when you press the button. The correct values are:
      Position Binary Hexadecimal
      0 11111110 fe
      1 11111101 fd
      2 11111011 fb
      3 11110111 f7
      4 11101111 ef
      5 11011111 df
      6 10111111 bf
      7 01111111 7f

  14. Verify the A/D channels.
  15. Checking out the A/D channels is done in the same way except that this time you need to wire up a light sensor.

    For each channel you should type
    Command Channel
    r00000054 0
    r00000055 1
    r00000056 2
    r00000057 3
    r00000058 4
    r00000059 5
    r0000005a 6
    r0000005b 7

    So to check out channel 1, you would type 'r00000055' to hexmon which might yield >r00000055r03> or >r00000055raf> or something, depending on the photocell you used and the amount of light falling on it. The error condition is that you get either 00 or ff. 00 means you have a short to ground or an open pullup and ff means you have a short to 5v. Some fixed value like 33 means you probably have a resistive short to ground (a cold blob of solder, a bit of lint, etc)

    Once you've verified that the channel changes when you change how much light falls on the sensor, verify that the adjacent channels do not change when you vary the light.

  16. Verify the motor drivers
  17. These are pretty straight forward. Wire up one of the Lego motors to a 3 prong plug as shown in the lab manual. Plug it into the Motor 1 port.

    Use the hexmon commands w0011005d and w0010005d to verify the motor spins first one way then the other. Similarly use:
    Direction 1 Direction 0 Motor
    w0022005d w0020005d 2
    w0044005d w0040005d 3
    w0088005d w0080005d 4

    In this test you are looking for the motor either to not spin one direction or the other (indicating a short in the connector pins) or very slow in one direction or the other (indicating a cold solder joint on one of the pins) or multiple motor LEDs lighting (indicating a short between enable pins.

Thats it, you're done. Your miniboard is in peak operating condition!