- C codes about using linked list and stack.
- Use sine table to compute degree.
- Detailed process see here.
- morse code for midterm exam.
- Simple addition.
- 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-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.
- 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_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.
- Use RA4 to detect button to control PORTD led blinking.
- Use high priority ISR to handle interrupt when clicking button.
- Use timer to control LED.
- Let port B be input button, and port D to output LED.
- Use PWM to control servo moter
- Connect three 300ohms resistors in series.
- Use ADC (analog-to-digital converter) to measure voltage between resistors.
- Use UART to let terminal to control two LEDs on and off.
$ Control1
: LED1 on,$ Control2
: LED1 off$ Control3
: LED2 on,$ Control4
: LED2 off