Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Registers are all cleared before this part
- ####################
- # Set up mem locs #
- ####################
- li $s0, 0xBF886100 #tri-state mem_loc
- li $s1, 0xBF8860F0 #set mem_loc for ODCE
- li $s2, 0xBF886110 #mem_loc for pmod pins
- li $s3, 0xBF886010 #mem_loc for button head
- li $s4, 0xBF806200 #load adress of UARTB
- sw $t0, 0x00($s4) #clear UARTB
- sw $t0, 0x10($s4) #clear state
- sw $t0, 0x20($s4) #clear Tx
- sw $t0, 0x30($s4) #clear Rx
- ########################
- #INITAL'Z UART PROC#
- ########################
- ori $t0, $zero, 0x8B00 #load set bits for UARTB into t0
- sw $t0, 0x00($s4) #set bits in UARTB
- ori $t0, $zero, 0x0C #load BRG bits for baud rate of 2400
- sw $t0, 0x40($s4) #set BRG bits
- ori $t0, $zero, 0x1440 #set enable bits for status register (enable RX interupt)
- sw $t0, 0x10($s4) #clear and set status register of uart
- ####################
- # setup processies #
- ####################
- and $t0, $t0, $zero
- sw $t0, 0x00($s0) #clear TRISTATE buffer
- sw $t0, 0x00($s1) #clear ODCE
- sw $t0, 0x00($s2) #clear all the pins in the PMOD pins
- li $a0, 0x01 #load value to turn on led 1
- li $a1, 0x80 #value to count to before roating
- li $a2, 0x00000300 #mailbox street adress
- sw $zero, 0x00($a2) # clear mbox <== program won't execute this, it just freezes here
- nop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement