Can some one help me solve this as i am banging my head ,its just a simple 1hz led flasher on pin RA0,
i have built the asm file, programmed it and put the pic in the circuit board, all that happens is all the pins are at 2v op,with 2.6v ac signal , except the supply pins at 5volts .
Is there some thing in the programme i have done wrong or are my pics faulty??
;This is to flash an led on pin ra0 at 1hz
LIST p=16F88 ;tell assembler what chip we are using
#include <P16F88.inc> ;include the defaults for the chip
;set up config register
__CONFIG _CONFIG1, _CP_OFF & _CCP1_RB0 & _DEBUG_OFF & _WRT_PROTECT_OFF & _CPD_OFF & _LVP_OFF & _BODEN_OFF & _MCLR_OFF & _PWRTE_ON & _WDT_OFF & _INTRC_IO
__CONFIG _CONFIG2, _IESO_OFF & _FCMEN_OFF
org 0x0000 ;org sets the origin, 0x0000 for the 16F88,
;this is where the program starts running
goto Loop
cblock 0x20
d1
d2
d3
endc
bsf STATUS, RP0 ;select bank 1
movlw b'01110110' ;set osc to 8mhz
movwf OSCCON
movlw b'11000110' ;set up prescaler to 128 on Tmr0
movwf OPTION_REG
movlw b'00000000' ;set PortA all outputs
movwf TRISA
movlw b'11111111'
movwf TRISB ;set PortB all inputs
bcf STATUS, RP0 ;select bank 0
clrf PORTA ;clear portA
clrf PORTB
Loop
bsf PORTA,0
;set bit 0 on
call Delay
;
bcf PORTA,0
call Delay ;set bit0 off
goto Loop ;go back and do it again
Delay
;delay of 500msec at 8mhz clock
;999997 cycles
movlw 0x08
movwf d1
movlw 0x2F
movwf d2
movlw 0x03
movwf d3
Delay_0
decfsz d1, f
goto $+2
decfsz d2, f
goto $+2
decfsz d3, f
goto Delay_0
;3 cycles
goto $+1
nop
return
end
i have built the asm file, programmed it and put the pic in the circuit board, all that happens is all the pins are at 2v op,with 2.6v ac signal , except the supply pins at 5volts .
Is there some thing in the programme i have done wrong or are my pics faulty??
;This is to flash an led on pin ra0 at 1hz
LIST p=16F88 ;tell assembler what chip we are using
#include <P16F88.inc> ;include the defaults for the chip
;set up config register
__CONFIG _CONFIG1, _CP_OFF & _CCP1_RB0 & _DEBUG_OFF & _WRT_PROTECT_OFF & _CPD_OFF & _LVP_OFF & _BODEN_OFF & _MCLR_OFF & _PWRTE_ON & _WDT_OFF & _INTRC_IO
__CONFIG _CONFIG2, _IESO_OFF & _FCMEN_OFF
org 0x0000 ;org sets the origin, 0x0000 for the 16F88,
;this is where the program starts running
goto Loop
cblock 0x20
d1
d2
d3
endc
bsf STATUS, RP0 ;select bank 1
movlw b'01110110' ;set osc to 8mhz
movwf OSCCON
movlw b'11000110' ;set up prescaler to 128 on Tmr0
movwf OPTION_REG
movlw b'00000000' ;set PortA all outputs
movwf TRISA
movlw b'11111111'
movwf TRISB ;set PortB all inputs
bcf STATUS, RP0 ;select bank 0
clrf PORTA ;clear portA
clrf PORTB
Loop
bsf PORTA,0
;set bit 0 on
call Delay
;
bcf PORTA,0
call Delay ;set bit0 off
goto Loop ;go back and do it again
Delay
;delay of 500msec at 8mhz clock
;999997 cycles
movlw 0x08
movwf d1
movlw 0x2F
movwf d2
movlw 0x03
movwf d3
Delay_0
decfsz d1, f
goto $+2
decfsz d2, f
goto $+2
decfsz d3, f
goto Delay_0
;3 cycles
goto $+1
nop
return
end