Hi. I'm learning how to program in assembly to PICs and I'm stuck quite a while in a problem trying to figure out how to read an input value. I've been googling a lot and it seems that my code it's fine but as I'm beginning to learn I would like to know if any of you guys could tell me if its really ok.
Thank you very much.
#include <P16F688.inc> ORG 0x00 goto main main: banksel TRISC movlw B'00000100' movwf TRISC loop: banksel PORTC btfsc PORTC, RC2 call blinkRed btfss PORTC, RC2 call blinkGreen goto loop blinkRed: banksel PORTC bsf PORTC, 1 bcf PORTC, 0 ;movlw B'00000010' ;movwf PORTC return blinkGreen: banksel PORTC bcf PORTC, 1 bsf PORTC, 0 ;movlw B'00000001' ;movwf PORTC return end