|
Test the Front Bumper circuit on your Proto_board, per the following diagram:
Modify the provided program "sensa1c.asm" to turn-left, turn-right, and backup. The following will help guide you through the process: 1. Use a text editor to view these routines, they should be the same as we used in our last lab. "Here" is the port assignment table, it will become more important as we continue to develop our robot. 2. Use a text editor (notepad++, etc.) to create your assembly program source file. This file should have an extension of "asm" for assembly and contain the assembly program (i.e., test2b.asm ). Edit and save the file - remember to name it "test2b.asm". *** In this lab you are provided with the assembly program... 3. Use the MPASM assmbler to assemble the program, the assembler will create, a "hex" file as it's output. "Here is a local copy of MPASM (2.6Meg)." This file will be called "test1b.hex". The masm assembler reads in your assembly program "test2b.asm" and then assembles it into the hex file "test1b.hex". Take a look at the screen shot of the MASP assembler, ready to assemble:
After you have the program assembled into a hex file, you need to get the file onto your board. For this we will need the "PDFSUSB" program. Navigate to C://MCHPFSUSB/Pc/Pdfsusb\PDFSUSB.exe, right-click your mouse as you drag it onto the desk-top, create a short-cut, to make it easier to use it in the future. Connect your robot, by way of the USB cable, to your computer. If it doesn't detect the robot's USB device, make sure your robot's power is turned on (blinking light) hold-down the [pgm] button and press the [reset] button. Now double-click on the icon and load your hex file as shown below:
Finally, program the robot as shown below:
Have the instructor sign off on your robot's proper function. It should: 1. Pause for 5 seconds. 2. Move forward Util the front bumper hits something. 3. When the bumper hits something, it should backup and turn left. 4. Goto step 2 (step 2, 3 and 4 are part of a repeating loop). Proper Robot function:_____________________________________________ |