0
   

Can anyone help comment on these code? written by a friend and need to explain to someone else

 
 
deadey3
 
Reply Tue 29 Dec, 2015 02:06 am
#include p16F84a.inc
list p=pic16F84A
__config _RC_OSC & _WDT_OFF & _PWRTE_ON & _CP_OFF


count equ 0x21

org 00
goto start
org 0x04
goto interrupt


org 0x22
start:
bsf STATUS,RP0
movlw 0x01
movwf TRISB
bcf OPTION_REG,INTEDG
banksel INTCON
bcf INTCON,INTF
bsf INTCON,INTE
bsf INTCON,GIE
bcf STATUS,RP0
movlw 0xfe
movwf PORTB
SLEEP
goto $-1


interrupt:
initial_loop:
movlw 0x00
movwf count

loop:
incf count,1
btfsc count,3
goto initial_loop
btfss PORTB,0
goto loop
movf count,0
call table_lights
movwf PORTB
bcf INTCON,INTF
bsf INTCON,GIE
retfie

table_lights:
addwf PCL,1
retlw b'00000010'
retlw b'01000100'
retlw b'01010100'
retlw b'10101010'
retlw b'10111010'
retlw b'11101110'
retlw b'01000100'
retlw b'01010100'
retlw b'00000010'

end
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Question • Score: 0 • Views: 1,586 • Replies: 0
No top replies

 
 

Related Topics

Clone of Micosoft Office - Question by Advocate
Do You Turn Off Your Computer at Night? - Discussion by Phoenix32890
The "Death" of the Computer Mouse - Discussion by Phoenix32890
Windows 10... - Discussion by Region Philbis
Surface Pro 3: What do you think? - Question by neologist
Windows 8 tips thread - Discussion by Wilso
GOOGLE CHROME - Question by Setanta
.Net and Firefox... - Discussion by gungasnake
Hacking a computer and remote access - Discussion by trying2learn
 
  1. Forums
  2. » Can anyone help comment on these code? written by a friend and need to explain to someone else
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.17 seconds on 12/02/2024 at 10:44:23