Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
And one more thing I don't see how it could be the code. I posted the cube working on youtube it was a 16f628a and I even posted the hex on hereUPDATE 1/2/2008 - Lumileds Luxeon "Rebel" LXML-PB01-0023 is a top brightness rank blue one with worst case performance of 23.5 lumens at 350 mA and worst case forward voltage drop of 3.99 volts. This is at thermal pad temperature (as opposed to chip temperature) of 25 degrees C. This works out to 16.8 lumens/watt worst case minimum. According to the "DS56" datasheet, typical overall luminous efficacy at thermal pad temperature of 25 degrres C is 20.17 lumens/watt at 700 mA (48 lumens, 3.4 volt voltage drop) and extrapolated 26.4 lumens/watt at 350 mA (3.15 volts typical voltage drop, graph-interpreted output 1.65 times as much at 700 mA as at 350 ma on the "DS56" datasheet).
Each bit on PORTA and RB4 each source exactly 1 led. Each layer of the cube has a common ground via a NPN transistor which can handle about 700 mA if I do not have it messed up (in head). This setup is good for driving the LEDS with up to 25ma. The limiting factor is how much current the PIC can drive.Your right it should have no problem lighting blue leds. One at a time. I did the math. LOL
But can it sink 9 at one time the code blinks a whole roll in one part of it.
Welfash take a look at this it should help you. Just add the part from
the blue led circuit where I put the resistors. I left them out sorry.
LIST p=16F628a ;tell assembler what chip we are using
include "P16F628a.inc" ;include the defaults for the chip
__config 0x3D18 ;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 CMCON ;turn comparators off (make it like a 16F84)
bsf STATUS, RP0 ;select bank 1
movlw b'00000000' ;set PortB all outputs
movwf TRISB
movwf TRISA ;set PortA all outputs
bcf STATUS, RP0 ;select bank 0
main:
banksel PORTA
bsf PORTA,5 ;change this for each roll 6 and then 7
goto blinkleds
blinkleds:
banksel PORTB
bsf PORTB,0
call delay
bcf PORTB,0
call delay
bsf PORTB,1
call delay
bcf PORTB,1
call delay
bsf PORTB,2
call delay
bcf PORTB,2
call delay
bsf PORTB,3
call delay
bcf PORTB,3
call delay
bsf PORTB,4
call delay
bcf PORTB,4
call delay
bsf PORTB,5
call delay
bcf PORTB,5
call delay
bsf PORTB,6
call delay
bcf PORTB,6
call delay
bsf PORTB,7
call delay
bcf PORTB,7
call delay
banksel PORTA
bsf PORTA,4
call delay
bcf PORTA,4
call delay
goto blinkleds
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