thanks for your reply but i couldnot get any example specifically for pic 16f72.theres lots on 16f84.
please could you let me know on which site i can find the examples of 16f72.
neelam
LIST p=16F72 ;tell assembler what chip we are using
include "P16F72.inc" ;include the defaults for the chip
__config 0x3D1A ;sets the configuration settings (oscillator type etc.)
cblock 0x20 ;start of general purpose registers
count1 ;used in delay routine
counta ;used in delay routine
countb ;used in delay routine
endc
org 0x0000 ;org sets the origin, 0x0000 for the 16F628,
;this is where the program starts running
movlw 0x07
movwf STATUS ;turn comparators off (make it like a 16F84)
bsf STATUS, RP0 ;select bank 1
movlw b'00000000' ;set PortB all outputs
movwf TRISB
bcf STATUS, RP0 ;select bank 0
clrf PORTB ;set all outputs low
Loop
movlw b'10000000'
movwf PORTB
call Delay ;this waits for a while!
movlw b'11000000'
movwf PORTB
call Delay ;this waits for a while!
movlw b'11100000'
movwf PORTB
call Delay ;this waits for a while!
movlw b'11110000'
movwf PORTB
call Delay ;this waits for a while!
movlw b'11111000'
movwf PORTB
call Delay ;this waits for a while!
movlw b'11111100'
movwf PORTB
call Delay ;this waits for a while!
movlw b'11111110'
movwf PORTB
call Delay ;this waits for a while!
movlw b'11111111'
movwf PORTB
call Delay ;this waits for a while!
goto Loop ;go back and do it again
Delay movlw d'250' ;delay 250 ms (4 MHz clock)
movwf count1
d1 movlw 0xC7
movwf counta
movlw 0x01
movwf countb
Delay_0
decfsz counta, f
goto $+2
decfsz countb, f
goto Delay_0
decfsz count1 ,f
goto d1
retlw 0x00
end
FOR FURTHER PROBLEM CONTACT ME AT 011-65174839 I HAVE LOTS OF PROJECTS BASED ON 16F72