Kingdom Man
New Member
Hello, I dont know if I am posting in the right place or even asking the right questions, but here it is anyway. I am just starting to play around with learning how to program the PIC Microchip possessors, I a extremely small bit of code that I am trying to add a function to: what I want the code to do is turn one of my A Port pins to a input and then drive one of my Port C outputs high when the input is high. I hope this makes sense, as I am just learning here...
Here is some code I have been messing with, if anyone could help me with generating a new set of instructions for what i am wanting it to do, I am hoping that through looking at what you have done I can learn something!
#include <p16F690.inc>
__config (_INTRC_OSC_NOCLKOUT & _WDT_OFF & _PWRTE_OFF & _MCLRE_OFF & _CP_OFF & _BOR_OFF & _IESO_OFF & _FCMEN_OFF)
org 0
Start:
BSF STATUS,RP0 ;select Register Page 1
clrf TRISC ;make make port C outputs
BCF STATUS,RP0 ;back to Register Page 0
movlw 1 ;turn on LED
movwf PORTC ;on port C
Goto $ ;wait
End
Here is some code I have been messing with, if anyone could help me with generating a new set of instructions for what i am wanting it to do, I am hoping that through looking at what you have done I can learn something!
#include <p16F690.inc>
__config (_INTRC_OSC_NOCLKOUT & _WDT_OFF & _PWRTE_OFF & _MCLRE_OFF & _CP_OFF & _BOR_OFF & _IESO_OFF & _FCMEN_OFF)
org 0
Start:
BSF STATUS,RP0 ;select Register Page 1
clrf TRISC ;make make port C outputs
BCF STATUS,RP0 ;back to Register Page 0
movlw 1 ;turn on LED
movwf PORTC ;on port C
Goto $ ;wait
End