EMCH 367 Fundamentals of MicrocontrollersLabs

LABS

The labs focus on hands-on experience with the microcontroller unit (MCU) and ancillary hardware. Programming for the labs can be effectively achieved by using the code, programs, and subroutines developed during the homework assignments.

Lab 1 / Lab 2 / Lab 3 / Lab 4 / Lab 5
Hmwk1 / X
Hmwk2 / X
Hmwk3 – Ex10 / X
Hmwk3 – Ex_Delay / X
Hmwk4 / X
Hmwk5 / X
Hmwk6 / X
Hmwk7 / X
Hmwk8 / X

The labs are given next

Lab Handout

NO food and NO drinks !!!

Door code: 41325

Color code of wires on breadboard:

MiniIDE instructions

  1. Open miniIDE by double clicking the miniIDE icon on the desktop;
  2. Connect the EVB to the host computer by 1) clicking the icon and 2) pressing the reset button with the pencil. If a welcome message is shown on the screen, the EVB is connected, if not, call help to your TA.
  3. Open an .ASM code file in your floppy disk. If needed, modify the codes and save. Hint: put star * mark at the beginning of the last two lines (after the command SWI) to comment these two lines. i.e.

SWI

*ORG$FFFE; reset vector

*FDBSTART; set to start of program

  1. Compile the program by clicking the icon;
  2. Type “LOAD T” in the terminal (bottom) window and press “ENTER” key;

Then click the download icon . (Now the compiled program is downloaded into the microcontroller’s RAM.)

  1. Use command RM to check the registers, and reset them if needed. Make sure the PC (Program Counter ) points to the starting address of your programs, i.e. PC is C000).
  2. Type in “T” to run the program step by step.
  3. Or, type in “GO C000” in the terminal window to run the program automatically.

How to use the ‘RM’ command:

RM <enter>

PC – xxxxY – xxxxX – xxxxA – xxxx

PC – D000

Y – 0000

  • Use the “space” key to get to the next register
  • Use the “enter” key to get out of the setup

How to use the ‘MM’ command:

MM (MEMORY MODIFY) command will allow you to change the value at specific memory locations. Type in the memory address after the MM command.

Here is an example:

MM 0000

How to use the ‘MD’ command:

MM (MEMORY DISPLAY) command will allow you to view the value at specific memory locations. Type in the memory address after the MM command.

Here is an example:

MD 0000

Some of the frequently used BUFFALO commands are listed alphabetically in the Table below.

COMMAND / DESCRIPTION
HELP / Display monitor commands
ASM [<addr>] / Assembler/disassembler
BF <address1> <address2> <data> / Block fill memory with data
BR [-][<addr>] / Set up breakpoint
CALL [<address>] / Execute subroutine
GO [<address>] / Execute program
MD [<address1> [<address2>]] / Memory Display
MM [<address>] / Memory Modify
MOVE <address1> <address2> [<destination>] / Move memory to new location
OFFSET [-]<arg> / Offset for download
RM [p, y, x, a, b, c, s] / Register Modify
T [<n>] / Trace $1~$ff instructions
RD / Register Display

miniIDE Program Interface

menu
toolbar
Editor Window
( Your .asm file here )
Output Window
( Your compile information, errors, etc. )
Terminal Window
BUFFALO 2.5
( type your BUFFALO command here )

Attention:

  • Have your .asm files ready before you come to the LAB
  • You need to print out the lab report before you come to the LAB. You will finish it when you are doing the LAB and hand in the report right after the lab.
  • You need to keep this handout at hand as reference for Labs.
  • CLEAN UP your mess, put everything back in order and turn off the oscilloscope before you leave.

(This page is left intentionally blank)

Dr. Victor GiurgiutiuPage 110/26/2018

EMCH 367 Fundamentals of MicrocontrollersLabs

Dr. Victor GiurgiutiuPage 110/26/2018