Advertisement
Guest User

Untitled

a guest
Apr 18th, 2014
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. #Registers are all cleared before this part
  2. ####################
  3. # Set up mem locs #
  4. ####################
  5.  
  6. li $s0, 0xBF886100 #tri-state mem_loc
  7. li $s1, 0xBF8860F0 #set mem_loc for ODCE
  8. li $s2, 0xBF886110 #mem_loc for pmod pins
  9. li $s3, 0xBF886010 #mem_loc for button head
  10. li $s4, 0xBF806200 #load adress of UARTB
  11. sw $t0, 0x00($s4) #clear UARTB
  12. sw $t0, 0x10($s4) #clear state
  13. sw $t0, 0x20($s4) #clear Tx
  14. sw $t0, 0x30($s4) #clear Rx
  15. ########################
  16. #INITAL'Z UART PROC#
  17. ########################
  18. ori $t0, $zero, 0x8B00 #load set bits for UARTB into t0
  19. sw $t0, 0x00($s4) #set bits in UARTB
  20. ori $t0, $zero, 0x0C #load BRG bits for baud rate of 2400
  21. sw $t0, 0x40($s4) #set BRG bits
  22. ori $t0, $zero, 0x1440 #set enable bits for status register (enable RX interupt)
  23. sw $t0, 0x10($s4) #clear and set status register of uart
  24. ####################
  25. # setup processies #
  26. ####################
  27. and $t0, $t0, $zero
  28. sw $t0, 0x00($s0) #clear TRISTATE buffer
  29. sw $t0, 0x00($s1) #clear ODCE
  30. sw $t0, 0x00($s2) #clear all the pins in the PMOD pins
  31. li $a0, 0x01 #load value to turn on led 1
  32. li $a1, 0x80 #value to count to before roating
  33. li $a2, 0x00000300 #mailbox street adress
  34. sw $zero, 0x00($a2) # clear mbox <== program won't execute this, it just freezes here
  35. nop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement