16f84a assembler sleep mode problem!!

The topic on number crunching

16f84a assembler sleep mode problem!!

Postby chahath » Mon Jan 07, 2019 4:09 pm

How to sleep and weke up device
please help my
ORG 0x000
goto main
ORG 0x004 Nox Showbox Mobdro


retfie

main

bsf STATUS,RP0
movlw 0xFF
movwf TRISB
movlw 0x1C
movwf TRISA
;movlw 0x7F ;0111 1111
;movwf OPTION_REG
bcf STATUS,RP0
bsf INTCON,GIE
clrf PORTA
clrf PORTB
start

bsf PORTA,1
movlw 244
call delay
movlw 244
call delay
;bcf PORTA,1
movlw 244
call delay
movlw 244
call delay
;bsf PORTA,1
movlw 244
call delay
movlw 244
call delay
;bcf PORTA,1
movlw 244
call delay
movlw 244
call delay
;bsf PORTA,1
movlw 244
call delay
movlw 244
call delay
bcf PORTA,1
bsf INTCON,RBIE
sleep

bsf PORTA,0
movlw 244
call delay
movlw 244
call delay
bcf PORTA,0
movlw 244
call delay
movlw 244
call delay
bsf PORTA,0
movlw 244
call delay
movlw 244
call delay
bcf PORTA,0
movlw 244
call delay
movlw 244
call delay
goto start



delay movwf dc2
clrf dc1
dly1 nop
decfsz dc1,f
goto dly1
dly2 nop
decfsz dc1,f
goto dly2
decfsz dc2,f
goto dly1
return
chahath
 
Posts: 22
Joined: Fri Jan 04, 2019 12:00 pm

Return to Microcontrollers & Embedded

Who is online

Users browsing this forum: No registered users and 1 guest