Move literal to working register movwf trisa move to

Info icon This preview shows pages 2–3. Sign up to view the full content.

View Full Document Right Arrow Icon
;MOVE LITERAL TO WORKING REGISTER MOVWF TRISA ;MOVE TO TRISA MOVLW B'11111111' ;MOVE LITERAL TO WORKING REGISTER MOVWF TRISB ;MOVE TO TRISB MOVLW B'00001110' ;MOVE LITERAL TO WORKING REGISTER MOVWF PORTA ;SET PORTA TO 1 Loopbegin ;starts loop BTFSS PORTD, RD3 GOTO turnoff ;Go to Turnon
Image of page 2

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
GOTO turnon ;Go to Turnoff turnon MOVLW B'00001110' ;1's Turn the lights on MOVWF PORTA ;Send value one to PortA turnoff MOVLW B'00000000' ;Turn the lights off MOVWF PORTA ;Send value zero to PortA GOTO Loopbegin ;Make the loop continue End New Instructions: In this lab, I learned a lot of new instructions. Basically everything I did in this lab was new to me. The main thing I learned though was the code to turn on the LEDs in the Microcontroller using a set of instructions. Fig: Flowchart of the program code Difficulties: When performing this lab, I encountered some difficulties. First of all, I had some problems writing the code and I had to ask my instructor for help on how to get me through that stage. Secondly, I didn’t create a source file right after creating a new project and this affected the code as it not be executed at first. I had to go back and fix that error in order for the code to work right. Conclusion: The code writing and compilation were the most difficult to overcome, but with the help of the GSA , it became easier.
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern