Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
we can assist and guide u..but on which part..??Shock said:i need some assistance on guiding me to build the interface and the coding.
help is appreciate.
list p=16f873
include "p16f873.inc"
org 0x00
goto START
;Configuration section
START bsf STATUS,5
movlw 0x06
movwf ADCON1
movlw b'00000000'
movwf TRISA ;Set PORTA as output port
movlw b'00000001'
movwf TRISB ;Set PORTB as input port
movlw b'00000000'
movwf TRISC ;Set PORTC as output port
movlw b'00000111'
OPTION
bcf STATUS,5
clrf PORTC ;Clear PORTC before program start
clrf PORTA ;Clear PORTA before program start
;Program starts
BEGIN btfss PORTB,0 ;Test PORTB (infrared receiver input)
goto ANTICLK ;Got obstruction in infrared signal,
;motor move anticlockwise
goto CLOCK ;No obstruction in infrared signal, motor move
;clockwise
ANTICLK movlw b'00000101' ;Bit 2 to enable L293B chip, bits 0 and 1
;to move motor anticlockwise direction
movwf PORTA
movlw b'00010001'
movwf PORTC ;LEDs signify motor movement
clrf TMR0
movlw b'00100010'
movwf PORTC
clrf TMR0
movlw b'01000100'
movwf PORTC
clrf TMR0
movlw b'10001000'
movwf PORTC
clrf TMR0
goto BEGIN ;Recheck infrared signal for obstructions
CLOCK movlw b'00000110' ;Bit 2 to enable L293B chip, bits 0 and 1 to
;move motor clockwise direction
movwf PORTA
movlw b'10001000'
movwf PORTC ;LEDs signify motor movement
clrf TMR0
movlw b'01000100'
movwf PORTC
clrf TMR0
movlw b'00100010'
movwf PORTC
clrf TMR0
movlw b'00010001'
movwf PORTC
clrf TMR0
goto BEGIN ;Recheck infrared signal for obstructions
end