ON 20021225@8:08:44 PM at page: http://www.piclist.com/techref/member/YR-optusnet-E21/index.htm YR-optusnet-E21 Yoga Raj added 'Questions Pages: /techref/index.htm Personal Computer Technical Reference' ON 20021225@8:11:17 PM at page: http://www.piclist.com/techref/member/YR-optusnet-E21/index.htm YR-optusnet-E21 Yoga Raj added 'Questions Pages: /techref/index.htm Personal Computer Technical Reference' ON 20021227@3:03:03 PM at page: http://www.piclist.com/techref/member/YR-optusnet-E21/index.htm YR-optusnet-E21 Yoga Raj added 'Questions: Hello, I plan to make a flashing led project with the 18f452. When I step through the program with MP lab, there is no change in port b or c1/c2 values even though wgre is writting to it. Where is the bug ? Thanks , Yoga ; This is my first attempt ; in building a flashing LED using the 18f452 processor LIST P=18F452 radix dec include ;************************************************************************************************************ ; Equates ; ;************************************************************************************************************ ; Program equates c1 equ 0x100 c2 equ 0x101 ; User equates.... C equ 0 Z equ 2 ;************************************************************************************************************ ; Define #define LED0 PORTB,0 ;************************************************************************************************************ ; The program begin here org 0x00 ; Reset goto START ;************************************************************************************************************ ; INTERRUPT (no interrupt was planned) org 0x08 nop retfie ;************************************************************************************************************* ; Subroutines DELAY movlw 0x02 DEL clrwdt movwf c2 LOOP1 movlw 0x02 movwf c1 LOOP2 decfsz c1,1 goto LOOP2 decfsz c2,1 goto LOOP1 return ;************************************************************************************************************* ; Main Program is here START ; the begining of the program clrf INTCON ; disable all interupts clrf PORTB ; initialise portb clrf LATB ; initialise all the output pins movlw 0x00 ; w is b'00000000' movf TRISB,1 ; set all port b as output nop nop LED bsf LED0 ; set the led on ; call DELAY bcf LED0 ; set the led off ; call DELAY goto LED ; loop forever END'