CISC3361 Lab#4 Test LCD circuits and flashing LED (due:3/04)


Modify the provided program "lcd_test.asm" to:

1) Test the LCD circuits and create a flashing LED: Display your robots "number" and your "Name", Mine would display "20 Armstrong".

Here is the "circuit diagram" for our LCD, this is just for reference. Later, it will become more important.

*** I have added a black, jumper wire to disable/enable the LCD (Make sure to connect it to ground).

2) Create a flashing LED: Create a loop that sets B4 on, waits 1 second, sets it off and then waits 1 second before it repeats the loop. You should use your LED logic probe as your LED (red goes to +5 and bare-wire to Ground). Remove the sleep command and use a "goto loop2" to do your LED flash loop.
*** Add this code just under the "begin:" lable.

; Add this code just under the "begin label"...
;
  movlw   0x00 ; load w with 0000 0000 - all outputs
  MOVWF TRISB 

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.

The following will help guide you through the process:

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. Displays your robot's number and your_name.

2. Has a loop that sets B4 on, waits 1 second, sets it off and then waits 1 second before it repeats the loop. You should use your LED logic probe as your LED (red goes to +5 and bare-wire to Ground).



Proper Robot function:_____________________________________________