aben20807 / microprocessor_principles_and_applications

1061_微算機原理與應用(含實驗) MICROPROCESSOR PRINCIPLES AND APPLICATIONS(母課程)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Microprocessor Principles and Applications class record

review

  • C codes about using linked list and stack.

HW01

  • Use sine table to compute degree.
  • Detailed process see here.

Hands_on_1

  • morse code for midterm exam.

final project

Lab1

  • Simple addition.

Lab2

  • Four fundamental addressing modes:
    • Literal: use MOV to operate registers.
    • Direct: use MOVLB to select bank.
    • Indirect: use FSR to point value.
    • Relative: use PCL to jump address.

Lab3

  • Lab3-1:
    • Use AND, OR, XOR to implement NAND, NOR.
    • Implement NOT: XOR with 0xFF.
  • Lab3-2:
    • Add from 1, 2, ... until overflow.
    • Because of signed integer, overflow occurred when the leftmost bit = 1.
    • Use RLCF, RRCF to retate with carry.

Lab4

  • main.asm: Bubble sort with calling subroutine.
  • lab4mac.asm: Check sorted result correctness. SWAP macro.
  • Notice that cannot skip whole macro, let macro be in a subroutine.

Lab5

  • Lab5_1:
    • Call and use assembly codes in C program.
    • add function in .asm.
  • Lab5_2:
    • Use Lab5_2_lib.h to implement add, sub to number.

Lab6

  • Use RA4 to detect button to control PORTD led blinking.

Lab7

  • Use high priority ISR to handle interrupt when clicking button.

Lab8

  • Use timer to control LED.
  • Let port B be input button, and port D to output LED.

Lab9

  • Use PWM to control servo moter

Lab10

  • Connect three 300ohms resistors in series.
  • Use ADC (analog-to-digital converter) to measure voltage between resistors.

Lab11

  • Use UART to let terminal to control two LEDs on and off.
  • $ Control1: LED1 on, $ Control2: LED1 off
  • $ Control3: LED2 on, $ Control4: LED2 off

About

1061_微算機原理與應用(含實驗) MICROPROCESSOR PRINCIPLES AND APPLICATIONS(母課程)

License:GNU General Public License v3.0


Languages

Language:Makefile 44.9%Language:Assembly 35.2%Language:C 19.9%