ashwini jayaraman
Member level 2
- Joined
- Jan 17, 2013
- Messages
- 49
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,286
- Activity points
- 1,601
Hello members,
I tried to write a switch to led pgm using embedded C ..got the o/p..but couldnt implement the same concept in ALP..here is my program..couldnt guess any logical error so far..there is no syntax error also while I tried building it..
#include<p16f887.inc>
list p=16f887
ORG 0x00
GOTO MAIN
ORG 0x12
MAIN:
banksel ANSEL
banksel ANSELH
banksel ADCON0
banksel ADCON1
banksel ADRESH
banksel ADRESL
banksel TRISD
banksel PORTD
CLRF ANSEL
CLRF ANSELH
CLRF ADCON0
CLRF ADCON1
CLRF ADRESH
CLRF ADRESL
CLRF TRISD
movlw 0xFF
banksel TRISB
movwf TRISB
banksel PORTB
movf PORTB,0
banksel PORTD
movwf PORTD
END
I tried to write a switch to led pgm using embedded C ..got the o/p..but couldnt implement the same concept in ALP..here is my program..couldnt guess any logical error so far..there is no syntax error also while I tried building it..
#include<p16f887.inc>
list p=16f887
ORG 0x00
GOTO MAIN
ORG 0x12
MAIN:
banksel ANSEL
banksel ANSELH
banksel ADCON0
banksel ADCON1
banksel ADRESH
banksel ADRESL
banksel TRISD
banksel PORTD
CLRF ANSEL
CLRF ANSELH
CLRF ADCON0
CLRF ADCON1
CLRF ADRESH
CLRF ADRESL
CLRF TRISD
movlw 0xFF
banksel TRISB
movwf TRISB
banksel PORTB
movf PORTB,0
banksel PORTD
movwf PORTD
END