Oh OK I see. Ill try that setup the next tick off I get a chance. Heres the complete program: lean R=DEC INCLUDE p16f684.inc __CONFIG _FCMEN_OFF & adenosine monophosphate; _IESO_OFF & adenine; _BOD_OFF & _CPD_OFF & _MCLRE_OFF & _PWRTE_ON & _WDT_OFF & _INTOSCIO ; Variables CBLOCK 0x20 Dlay, i, INNER, outmost, OUTER2 ENDC PAGE ; Main promissory note org 0 nop ; For ICD Debug CLRF INNER CLRF OUTER ;*******Start of stimulus prerequisite for PIC******* STATUS equ 03h ; book of facts of the STATUS sight TRISA equ 85h ;Address of the tristate register for port A first step equ 05h ;Address of Port A ;****Set up the port**** movlw b111 movwf CMCON0 bsf STATUS,5 ; cudgel to wedge 1 movlw 01h ;Set the Port A pins: movwf TRISA ; human activity 1to startput, bit 0 to input.
bcf STATUS,5 ;Switch back to brink 0 Delayloop4: Delayloop5: decfsz INNER, 1 goto Delayloop5 decfsz OUTER, 1 goto Delayloop4 Start: btfss PORTA, 0 ;skip next line if bit 0 is set in PORTA goto Start ;*******end of input requirement******* movlw 0 movwf OUTER movwf OUTER2 movlw 1 << 2 ; Start with molybdenum 2 active agent movwf PORTC movlw 7 ; yield off Comparators movwf CMCON0 bsf STATUS, RP0 ; Execute out of lodge 1 clrf ANSEL ^ 0x080 ; every(prenominal) Bits are Digital movlw 1 << 2 ; Start with Bit 2 Active movwf PORTC movlw 7 ; Turn off Comparators movwf CMCON0 bsf STATUS, RP0 ; Execute out of bound 1 clrf ANSEL ^ 0x080 ; All Bits are Digital movlw b000011 ; RC5:RC2 are Outputs movwf TRISC ^ 0x080 bcf STA TUS, RP0 ; Return murder to Bank 0 clrf ! i movlw 100 ;Number of steps in cw mission movwf INNER ccwLoop: rallying cry ccwstep decfsz INNER, 1 goto ccwLoop Delayloop3: ;This component delays the transition between the two directions by 50 seconds. Delayloop: Delayloop2: decfsz INNER, 1 goto Delayloop2 decfsz OUTER, 1 goto Delayloop decfsz OUTER2,1 goto Delayloop3 movlw 100 ;Number of steps in cw direction movwf INNER cwLoop: call cwstep decfsz INNER, 1 goto cwLoop...If you hope to get a full essay, order it on our website: OrderCustomPaper.com
If you want to get a full essay, visit our page: write my paper
No comments:
Post a Comment