noddls
Newbie level 3
MOVLW on PIC16f627A
Hi there,
This is my first post! Im new to microcontrollers. I was able to download a file and modify the way i want it using PIC16F84A. I got excited so I decided to buy another 16f84 for a new program but there's no stock of this PIC to where I used to buy it, so i ended up uying PIC16F627A (that's the only available). I know that PIC16f627 has more functions than PIC16F84 so i decided to test first if i could directly port the working program i made for PIC16F4A.
At first I cant make an output to PORTA, then i read the DATAsheet and found that comparator should first be disabled. so I did it.
I am using the MPLAB for simulation, and strange as it seem that i am not able to load to the my designated register the value of W. Is there anything I am missing? Here is the code
clrf PORTA
movlw 07h ;++++INITIALIZING PORTA++
movwf CMCON ;PORTA AS A REGULAR OUTPUT
; bcf STATUS, RP1
BSF STATUS, RP0
movlw 1Fh ;PLACE IN W
movwf TRISA ;initializiation ends here
movlw b'00000001'
movwf H10
movlw b'00000010'
movwf H1
clrw
on the simulation image i am already at clrw and nothing is loaded to my H1 and H10 variables.
Please help, is there any initialization I should do?
Thanks, i appreaciate any response.
Hi there,
This is my first post! Im new to microcontrollers. I was able to download a file and modify the way i want it using PIC16F84A. I got excited so I decided to buy another 16f84 for a new program but there's no stock of this PIC to where I used to buy it, so i ended up uying PIC16F627A (that's the only available). I know that PIC16f627 has more functions than PIC16F84 so i decided to test first if i could directly port the working program i made for PIC16F4A.
At first I cant make an output to PORTA, then i read the DATAsheet and found that comparator should first be disabled. so I did it.
I am using the MPLAB for simulation, and strange as it seem that i am not able to load to the my designated register the value of W. Is there anything I am missing? Here is the code
clrf PORTA
movlw 07h ;++++INITIALIZING PORTA++
movwf CMCON ;PORTA AS A REGULAR OUTPUT
; bcf STATUS, RP1
BSF STATUS, RP0
movlw 1Fh ;PLACE IN W
movwf TRISA ;initializiation ends here
movlw b'00000001'
movwf H10
movlw b'00000010'
movwf H1
clrw
on the simulation image i am already at clrw and nothing is loaded to my H1 and H10 variables.
Please help, is there any initialization I should do?
Thanks, i appreaciate any response.