Date: Wed, 26 May 93 22:40:32 EDT From: Chuck.McManis@Eng.Sun.COM (Chuck McManis) To: Multiple recipients of list Subject: Bringing up the miniboard Chapter XX Bringing up the Miniboard. 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. Step 1: Verify the Assembly. If you've followed all of the steps in the manual, you should verify the assembly \em{before} you plug in the 74hc04 and 68HC11 chips. This can be done as follows: a) With a magnifier or a hand held microscope (the Micronta 30x one is good for this) verify that all solder connections on the board are shiny and that there are no "bridges" between them. b) If you've installed the precision resistors make sure that the trace between the power monitoring pads is cut (see diagram in the manual) Step 2: Check for shorts. Attach the battery pack \em{with the switch in the off position} to the miniboard. 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. Step 3: Check the Serial port. ( With the power removed ) Many people seem to get the serial port miswired for one reason or another. The most common problem is that the Transmit and Receive lines are \em{reversed} on the 9 pin connector with respect to the 25 pin connector. Once you believe you have your connector wired properly, use an ohmmeter (or a lamp wired in series with a battery) to verify that the DB connector pin labeled "Transmit Data" (either pin two or three depending on your computer) is connected to the pad labeled TxD on the miniboard. You do this by turning the miniboard over, connecting either your ohmmeter or your lightbulb to the TxD pin on the DB25/DB9 connector, and then connecting the other lead of your ohmmeter or lightbulb to the pad labeld TxD on the miniboard. If you get continutity (0 ohms, light lit) then your doing great, if you don't, check to see if you get continutity to the RxD pin. Do this by leaving the connector on the DB25/DB9 alone and moving the lead that was touching the TxD pad to the pad labelled RxD. If this results in you getting a continuity indication (0 ohms or light lit) then you've wired up the RJ-11 to DB25/DB9 connector backwards. Once you have continutity between RxD and the DB connector and TxD and the connector. Check to make sure you don't have a short between them. This is a bit tricky because they are in fact tied together electrically using a 1K resistor. So you should check to see that the ohmmeter reads approximately 1000 ohms across RxD and TxD. Step 4. Install the integrated circuits (CPU + 74hco4) Install the integrated circuits making sure that the pins of the 74hc04 all go into the socket, and that the CPU is firmly seated in its socket. Step 5. Attach a computer to the serial port. Now attach your "host" computer to the miniboard. {\em Without} power to the miniboard, the GREEN led labeled RCV should glow green. If it doesn't verify that your host computer has its transmit and receive lines set up for "Data Communication Equipment". Step 6. Power up the miniboard. Set the Run/Download switch into the "Download" position and switch the power to the miniboard on. The RED LED labeled PWR should remain off. 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 on the 5V pin of the switch. Step 7. Download HexMon 40. On your host computer run the command dlm hxmon40.s19 Watching the LEDs, the PWR LED should remain off during the initial "bootstrap" download and then turn on Brightly when DLM switches to downloading the user program. Note that the "downloading the bootstrap" section will {\em always} 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 not running. There are several possible causes: 0) The miniboard isn't powered up. Check the power connections to the screw terminals and that the power switch is "on". 1) The crystal is not oscillating. If you didn't get the crystal with \em{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 {\em 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) 2) 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. 3) 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. 4) 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. Step 8. Checking out HexMON No put the run/download switch into the RUN position and press RESET. The PWR and RCV lights should be on. Run a terminal emulator on the host computer and check to see that the miniboard prints a ">" character every time you press reset. Now type: w00ff005d and the RED motor LEDs should all light. In the terminal emulator window you will see: >w00ff005dw> The miniboard echoed all characters and added "w>" to the end. Now 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> ^^^^^^^^^^^ \ this 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. Step 9. Checking out the parallel port. (PORT C) Construct a button sensor (push button with two wires) and plug it into the "end" of PORT C. Using hexmon type: r00001003 Hexmon will print back FF or from your terminal emulator 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 a open connection to the resistor pack. Now press the button and type r00001003 again (requires some dexterity) and the resulting display should be either: >r00001003rff>r00001003rfe> -or- >r00001003rff>r00001003r7f> (again I've included the previous results for completeness) Depending on which end of the connector you've attached to (bit 0 or bit 7) if the answer comes back anything other than 'fe' or '7f' like 'fc' or '3f' then it means you've got a short between the input you've plugging into and an adjacent line. 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. Step 10. Verifying the A/D channels. Checking out the A/D channels is done in the same way except that this time you need to wire up a potentiometer. (I've used 50K pots with good success). Wire up the pot using the center pin and one of the outer pins across the outer pins of the Miniboard connector. This will wire your pot to ground. For each channel you should type : r00000054 (channel 0) r00000055 (channel 1) ... r0000005b (channel 7) Note that if you are using the battery monitoring circuit you can just read channel 0 and verify that it isn't '00' or 'ff'. So to check out channel 1, you would type 'r00000055' to hexmon which might yield: >r00000055r03> -or- >r00000055raf> depending on where the pot was in its range. The error condition is that you get either '00' or 'ff' regardless of where the potentiometer is set. 'ff' means you have a short to 5V and '00' means you have a short to ground. 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 the position of the pot, verify that the adjacent channels do {\em not} change when you vary the pot. Step 11. Verifying the motor drivers. These are pretty straight forward. Wire up a "hobby" motor from Radio Shack or equivalent to a 3 prong "plug" as shown in figure 3. Plug it into the "Motor 0" port. Use the hexmon commands: w0088005d -and- w0080005d to verify the motor spins first one way then the other. Similarly use: w0044005d -and- w0040005d to test motor 1 w0022005d -and- w0020005d to test motor 2 w0011005d -and- w0010005d to test motor 3 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. Step 12. Verifying the timer port. Hmm, I don't have a very good test for these yet. However at this point if you've got everything else working then these are pretty likely to be ok. Step 13. Verifying the SPI port. This really needs another Miniboard to test and some specialized hardware. Thats it, you're done. Your miniboard is in peak operating condition!