Ok maybe I am doing something wrong, I tried to use a transistor with no increase in brightness.
I also hooked up a ULN2003 with no luck on that one either. I raised the led voltage to +12v and
didn't see much improve ment. Is it possible that I am switching the led too fast or not leaving
it on long enough?
Pic code: With internal RC osc. at 4Mhz
;fanblink1.asm
;
LIST p=16F628
include "P16F628.inc"
__CONFIG _CP_OFF &_BODEN_OFF &_PWRTE_OFF &_WDT_OFF &_LVP_OFF &_MCLRE_OFF &_INTRC_OSC_NOCLKOUT
;Setup anything that needs to be setup
#DEFINE pulse PORTA,0
cblock 0x20
temp
endc
org 0x0000
;Turn of comparators
movlw 0x07
movwf CMCON
bsf STATUS, RP0
movlw b'00000000' ;Set PortB to outputs
movwf TRISB
movlw b'00000001' ;Set PA0 input
movwf TRISA
bcf STATUS, RP0
;Start Main
movlw b'00000000'
movwf PORTB
movwf temp
incf temp
loop:
btfsc PORTA,0 ;Is pulse input = 1?
goto test_temp ;Yes output 1
goto wait_zero ;No output 0
test_temp:
btfsc temp,0 ;Is pulse and temp = 1?
goto loop ;temp = 1
movlw b'11111111'
movwf PORTB ;temp = 0 activate output
;THere are actually 320 nop here I was to lazy to write a loop
nop
movlw b'00000000'
movwf PORTB
incf temp
goto loop
wait_zero:
btfsc temp,0 ;Is pulse and temp = 0?
goto fix_temp ;Temp = 1
goto loop ;
fix_temp:
decf temp
goto loop
end
;end main