Project INEL 4206 Fall 2018 Project Description Ultimate - - PowerPoint PPT Presentation

project
SMART_READER_LITE
LIVE PREVIEW

Project INEL 4206 Fall 2018 Project Description Ultimate - - PowerPoint PPT Presentation

Project INEL 4206 Fall 2018 Project Description Ultimate objective: build an arithmetic operations server that receives an ASCII string (through a serial port) that describes the desired operations. The server performs the math calculations and


slide-1
SLIDE 1

Project

INEL 4206 Fall 2018

slide-2
SLIDE 2

Project Description

Ultimate objective: build an arithmetic operations server that receives an ASCII string (through a serial port) that describes the desired operations. The server performs the math calculations and return the result in another string. Project: put together an early prototype of this server an MSP430 micro-controller using assembly language.

  • Because receiving the string through a serial port is beyond the

scope of the course, it will be stored in RAM.

  • Your program will identify the operations and perform the

calculation.

  • The string will contain two operands and an operation, can be:

+, -, * or /.

slide-3
SLIDE 3

Example of strings

+500, +200, + +123, +121, *

  • 123, 121, *
  • 1523, -231, +
  • 1523, -231, -
  • 234, +23, /
slide-4
SLIDE 4

Tasks

  • Extract the operands.
  • Convert the numbers into binary, taking

note of the number’s sign.

  • Identify the operation
  • Perform the operation
  • Convert the numbers from binary to ASCII
  • Save the result into a second string
slide-5
SLIDE 5

Requirements

  • Assume that the result will fit into a 16-bit register.
  • Only the integer part of the division is required.
  • 1. Work in teams of up to 3 students
  • 2. Must use assembly language
  • 3. Demonstrate working prototype
  • 4. Submit well written project Report.
  • 5. Code should be implemented efficiently, using a

reasonable number of instructions for each task.

  • 6. Deadline for submission: November 15, 2018.
slide-6
SLIDE 6

Report

A preliminary report outline follows. New sections may be added to satisfy ABET requirements.

  • 1. Title page
  • 2. Project description: describe the problem in your
  • wn words
  • 3. Program description: describe your program in

detail using text, flow-charts, pseudo-code

  • 4. Tests and results
  • 5. List of references
  • 6. Appendix: source code
slide-7
SLIDE 7

Grading

Activity Weight Demonstration 50% Report 25% Overall Quality 25%

slide-8
SLIDE 8
slide-9
SLIDE 9

Example: Replace character

#include "msp430.h" ; #define controlled include file NAME main ; module name PUBLIC main ; make the main label vissible ; outside this module ORG 0FFFEh DC16 init ; set reset vector to 'init' label ORG 0200h mystr DB "This is a test"

  • ldch DB 'i'

newch DB 'I'

9

slide-10
SLIDE 10

RSEG CSTACK ; pre-declaration of segment RSEG CODE ; place program in 'CODE' segment init: MOV #SFE(CSTACK), SP ; set up stack main: NOP ; main program MOV.W #WDTPW+WDTHOLD,&WDTCTL ; Stop watchdog timer mov #mystr, R12 mov.b oldch, R13 mov.b newch, R14 call #chrep JMP $ ; jump to current location '$' NOP

10

slide-11
SLIDE 11

; On string pointed by R12, replace character in R13 with ; that on R14 chrep: mov R12, R15 ; R12 = number of instances found mov #0, R12 ; initialize again: cmp.b #0, 0(R15) jeq done cmp.b @R15,R13 jeq rep jmp nextch rep: mov.b R14, 0(R15) inc r12 nextch: inc R15 jmp again done: ret

11