HomeArticlesProjectsBlogContact
Articles
PIC LAB-1 Test 4 Page 18
Colin Mitchell
Colin Mitchell
Make sure to subscribe to our newsletter and be the first to know the news.
<!--  TODO FIXME: add OnHover HoverImage Component here -->
   <!-- .drag{position:relative;cursor:hand} -->   <!-- // preload images: if (document.images) { image1on = new Image(); image1on.src = "images/Test5Ans1.gif"; image1off = new Image(); image1off.src = "images/MouseoverForAnswer.gif"; image2on = new Image(); image2on.src = "images/Test5Ans2.gif"; image2off = new Image(); image2off.src = "images/MouseoverForAnswer.gif"; image3on = new Image(); image3on.src = "images/Test5Ans3.gif"; image3off = new Image(); image3off.src = "images/MouseoverForAnswer-Tall.gif"; image4on = new Image(); image4on.src = "images/Test5Ans4.gif"; image4off = new Image(); image4off.src = "images/MouseoverForAnswer.gif"; image5on = new Image(); image5on.src = "images/Test5Ans5.gif"; image5off = new Image(); image5off.src = "images/MouseoverForAnswer.gif"; image6on = new Image(); image6on.src = "images/Test5Ans6.gif"; image6off = new Image(); image6off.src = "images/MouseoverForAnswer.gif"; image7on = new Image(); image7on.src = "images/Test5Ans7.gif"; image7off = new Image(); image7off.src = "images/MouseoverForAnswer.gif"; image8on = new Image(); image8on.src = "images/Test5Ans8.gif"; image8off = new Image(); image8off.src = "images/MouseoverForAnswer-Tall.gif"; image9on = new Image(); image9on.src = "images/Test5Ans9.gif"; image9off = new Image(); image9off.src = "images/MouseoverForAnswer-Tall.gif"; image10on = new Image(); image10on.src = "images/Test5Ans10.gif"; image10off = new Image(); image10off.src = "images/MouseoverForAnswer-Tall.gif"; image11on = new Image(); image11on.src = "images/Test5Ans11.gif"; image11off = new Image(); image11off.src = "images/MouseoverForAnswer-Tall.gif"; image12on = new Image(); image12on.src = "images/Test5Ans12.gif"; image12off = new Image(); image12off.src = "images/MouseoverForAnswer-Tall-2.gif"; image13on = new Image(); image13on.src = "images/Test5Ans13.gif"; image13off = new Image(); image13off.src = "images/MouseoverForAnswer.gif"; image14on = new Image(); image14on.src = "images/Test5Ans14.gif"; image14off = new Image(); image14off.src = "images/MouseoverForAnswer-Tall.gif"; image15on = new Image(); image15on.src = "images/Test5Ans15.gif"; image15off = new Image(); image15off.src = "images/MouseoverForAnswer-Tall-2.gif"; image16on = new Image(); image16on.src = "images/Test5Ans16.gif"; image16off = new Image(); image16off.src = "images/MouseoverForAnswer.gif"; image17on = new Image(); image17on.src = "images/Test5Ans17.gif"; image17off = new Image(); image17off.src = "images/MouseoverForAnswer.gif"; image18on = new Image(); image18on.src = "images/Test5Ans18.gif"; image18off = new Image(); image18off.src = "images/MouseoverForAnswer.gif"; image19on = new Image(); image19on.src = "images/Test5Ans19.gif"; image19off = new Image(); image19off.src = "images/MouseoverForAnswer.gif"; image20on = new Image(); image20on.src = "images/Test5Ans20.gif"; image20off = new Image(); image20off.src = "images/MouseoverForAnswer.gif"; image21on = new Image(); image21on.src = "images/Test5Ans21.gif"; image21off = new Image(); image21off.src = "images/MouseoverForAnswer.gif"; image22on = new Image(); image22on.src = "images/Test5Ans22.gif"; image22off = new Image(); image22off.src = "images/MouseoverForAnswer.gif"; image23on = new Image(); image23on.src = "images/Test5Ans23.gif"; image23off = new Image(); image23off.src = "images/MouseoverForAnswer.gif"; image24on = new Image(); image24on.src = "images/Test5Ans24.gif"; image24off = new Image(); image24off.src = "images/MouseoverForAnswer-Tall.gif"; image25on = new Image(); image25on.src = "images/Test5Ans25.gif"; image25off = new Image(); image25off.src = "images/MouseoverForAnswer-Tall.gif"; } function changeImages() { if (document.images) { for (var i=0; i<changeImages.arguments.length; i+=2) { document\[changeImages.arguments\[i\]\].src = eval(changeImages.arguments\[i+1\] + ".src"); } } } // -->  <!-- var dragapproved=false var z,x,y function move(){ if (event.button==1&&dragapproved){ z.style.pixelLeft=temp1+event.clientX-x z.style.pixelTop=temp2+event.clientY-y return false } } function drag(){ if (!document.all) return if (event.srcElement.className=="drag"){ dragapproved=true z=event.srcElement temp1=z.style.pixelLeft temp2=z.style.pixelTop x=event.clientX y=event.clientY document.onmousemove=move } } document.onmousedown=drag document.onmouseup=new Function("dragapproved=false") //-->

Answer the following questions … JavaScript is required!
More questions on programming …

The best way to learn a topic is with questions. We have proven this. It’s similar to reverse learning or reverse engineering and is called Mitchellism. The author has coined this word through a wave of success. You can learn five times faster though mistakes than slowly plodding through the front door.
These questions and answers produce more thought than lines and pages of text.
Try them out …

  1. Drag the correct instructions and place them in the program:

;Load 6C into W
;Output to PortB

MOVWF 6Ch MOVLW 6Ch MOVWF 05 MOVWF 06 MOVF 05 MOVF 06

Mouseover for answer

  1. Drag the correct instructions and place them in the program:

;DECrement file 1A
;GOTO Count if not Zero

DECFSZ 1A,0 DECF 1A,1 GOTO Count2 GOTO Count DECFSZ 1A,1

Mouseover for answer

  1. Drag the correct instructions and place them in the program:

;Load W with 1A
;Copy W to file 1A
;Decrement file 1A
;Copy file 1A to W

MOVF 1A,1 MOVLW 1A,1 MOVWF 1A DECF 1A,0
MOVF 1A,0 DECF 1A,1 MOVLW 1A MOVWF 1A,1

Mouseover for answer

  1. Drag the correct instruction to the program:

GOTO Rise
GOTO Fall

;Test bit 10h in file10h
;GOTO Rise if SET
;GOTO Fall if CLEAR

BTFSS 10h,3 BTFSS 10h,4 BTFSC 10h,10h BTFSC 10h,3 BTFSC 10h,4

Mouseover for answer

  1. Name the input/output bits for Port B:

Mouseover for answer

  1. Name the fault in this routine:

Delay

NOP
DECFSZ 1A
GOTO Delay
RETURN

Mouseover for answer

  1. Write the instruction to move 44h from W to file 1A?

Mouseover for answer

  1. Drag the correct instructions to the program:

;Test switch
;GOTO Switch if pushed
;Increment file 0C
;Copy 0C to W

BTFSS 1A,3 BTFSS 6,4 MOVF 0C,0 BTFSC 6,0 GOTO Switch
INCF 0Ch,1 MOVF 0C,1 INCF 0Ch,0

Mouseover for answer

  1. Write the instructions to make bit 3 of TRIS 06 an INPUT

Mouseover for answer

  1. Write the instructions to make bit 3 of Port B HIGH

Mouseover for answer

  1. Describe the main difference between: GOTO Tester and CALL Tester.

Mouseover for answer

  1. Drag the correct instructions to the program:

;Detect end of Table
;XOR with file 06
;Test zero bit
;RETURN
;Increment file 12h

MOVLW 0FFh RETURN XORWF 06,0 BTFSC 6,0 BTFSC 03,2
INCF 12h,0 MOVF 12h,1 INCF 12h,1

Mouseover for answer

  1. Describe, in words, the following instruction: DECFSZ 1A,1

Mouseover for answer

  1. Write the two instructions to carry out the following: Put 8E into file 1C

Mouseover for answer

  1. Drag the correct instructions to the program:

;Put 5 into W
;XOR file 0F with W
;Test zero bit
;GOTO Comp
;RETURN

MOVWL 05 RETURN BTFSS 03,2 MOVLW 05 BTFSS 03,0
GOTO Comp XORWF 0F,0

Mouseover for answer

  1. Name the lines of input/output Port A:

Mouseover for answer

  1. What value will be contained in file 1A after the instruction: BSF 1A,4

Mouseover for answer

  1. File 1B holds the value 0000 1100. After the following instruction: BSF 1B,6 the file will contain:

Mouseover for answer

  1. Name the fault in this routine:

BTFSS 05,0
CLRF 1F
GOTO String
BSF 05,0
INCF 1F,1

;Test button”A” (Button is active HIGH)
;Clear file 1F
;Goto String
;Set bit 0
Increment file 1F

Mouseover for answer

  1. The TRISB file is loaded with 0011 1011. Name the output line(s) created by this value.

Mouseover for answer

  1. Name the lowest in/out line for Port B:

Mouseover for answer

  1. Write in words the instruction: BCF 06,0

Mouseover for answer

  1. Name the highest in/out line for a PIC16F84:

Mouseover for answer

  1. Write the ”bit set file” instruction for the 8 output lines of Port B for a PIC16F84:

Mouseover for answer

  1. What does ”bit manipulation” mean?

Mouseover for answer


Colin Mitchell

Colin Mitchell

Expertise

electronics
writing
PIC-Chips

Social Media

instagramtwitterwebsite

Related Posts

TODO
Transistor Test
© 2021, All Rights Reserved.

Quick Links

Advertise with usAbout UsContact Us

Social Media