kemalkemal
Member level 1
- Joined
- Jan 27, 2013
- Messages
- 38
- Helped
- 1
- Reputation
- 2
- Reaction score
- 1
- Trophy points
- 1,288
- Activity points
- 1,672
Hi all,
After one week that i've decided to learn relocatable code with assembler and after i found out solutions to problems i encounter here is my solutionless problem
i wrote just a simple code to load port b with b'01010101' like this.
;calling file
reference file
I build this without error , make the hex file with mpasmwin. But when i load hex into pic , i dont see 01010101 on port b of my development board.
ANy idea? Thanks.
After one week that i've decided to learn relocatable code with assembler and after i found out solutions to problems i encounter here is my solutionless problem
i wrote just a simple code to load port b with b'01010101' like this.
;calling file
Code ASM - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 list p=16f877a #include <p16f877a.inc> __CONFIG _CP_OFF & _WDT_OFF & _BODEN_OFF & _PWRTE_ON & _RC_OSC & _WRT_OFF & _LVP_ON & _CPD_OFF extern prog RESET_VECTOR CODE 0x0000 nop ; pagesel start goto start INT_VECTOR CODE 0x0004 INTERRUPT retfie MAIN_PROG CODE start pagesel prog call prog END ;
reference file
Code ASM - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 list p=16f877a #include <p16f877a.inc> global port1,prog udata port1 res 1 ;********************************************************************** MAIN_PRO CODE prog banksel TRISB clrf TRISB banksel port1 movlw b'01010101' movwf port1 movf port1,w banksel PORTB movwf PORTB retlw 0 END ;
I build this without error , make the hex file with mpasmwin. But when i load hex into pic , i dont see 01010101 on port b of my development board.
ANy idea? Thanks.
Last edited by a moderator: