Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

3x3x3 LED Cube - can i use16f628 instead 16f690

Status
Not open for further replies.
I have no idea bout part number
what should i do to drive them at 12 volts
so i could keep the blue
but first i guess i'll change them to yellow
if it's really the blue LEDs are the problem
 
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.
 

Attachments

  • blue led.PNG
    blue led.PNG
    5.9 KB · Views: 926
  • 16f628led cube.PNG
    16f628led cube.PNG
    11.1 KB · Views: 3,233
Last edited:
If the circuits are constructed correctly all the LEDs will light at the same intensity regardless of color.

I would not change anything unless I knew what was wrong.

Write test code that slowly cycles through each layer one LED at a time. The watch it run to see each LED lights in the correct order and intensity. The check to see if you have them wrong in the maxtrix.

I have not worked with hight power LEDs but the last time I checked about the highest Vf for an led was about 2.2V. A few show 5 or more but they have internal resistors or other current limiting. Why are we talking about 12V ?
 
Last edited:
I say he hooked something up wrong. But any way this will light them for sure.
And I bet he didn't put no resistors on the led port pins. What I posted works real
good. I made 10 of them for some kids. I ran out of 16f690 that's why I changed to
16f628a.
 
Last edited:
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.
UPDATE 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).
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 here
 
Last edited:
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.
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.

If you want to go higher then that you need transistors on PORTA and RB4, and maybe higher current transistors to sink the layers.
 
Last edited:
Well what i posted can give him about 77mA a led if he adds the transistors the way I have it. All he has to do is to replace the R 1. Like I posted in the Blue led.png
 
Ah I did not notice the 2nd schematic was for PORTA. My bad.

Even if he has leds that can handle that sort of current I would expect to have them light to some degree with 25ma. And that is easily tested. I do not work with that sort of LED so I do not know for sure.

Figure out what is wrong then fix it.
 
welflash take 1 of them blue led and hook it to 3volts with an 100ohm resistor
and tell me if lights.
 
Last edited:
welflash try this on your cube
Code:
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
 
Last edited:
I tried the same with blue LED in a breaboard. Nothing works. :-( When i touch the 1k resistor the last two LED is glowing continuously.

How can i check my PIC is programmed correctly. Can i check the voltages at every pin of my PIC. what are the voltages of every pins.

Actual 16f690 3x3x3 is very bright...how they have done that?

Thanks,
Robots
 
Last edited:
you have it wired up wrong you have the columns on the wrong port there 8 pins on porta and 8 pins on portb of the 16f628 the columns go to portb the rolls go to porta hook the 3 rolls to pin 5 6 and 7 hook the columns to all of portB and the 9 goes to ra4 and load the hex I posted and you'll be good to go.
 
Last edited:
I tried that n use the last LED.HEX but nothing happen :confused:
too bad i didn't have pickit2 or icd2 programmer so i could try the asm file
i only got jdm programmer with winpic800 that only work with HEX.
 
Last edited:
They all use Hex files you build the .asm in to a hex with mplab can you take a good pic of what you made and post it try this 1 I no it works I make 10 cubes with it.
 

Attachments

  • 3x3x316f628a.zip
    2.5 KB · Views: 729
Last edited:
i don't understand...
that hex...i can't write it...
winpic says ERROR -> Verifying address 0x002007
Verified : 0x2118 Read : 0x21FF

I'll take a picture later after i got some sleep
it's 5 am here n i'm very tired
thank you :)
 
What the...!!!
it works !!!

i tried once more before i go to bed
but this time i write it with icprog
Walla! it's working man
except for RA4 column, there's something wrong
i'll deal with it soon as i woke up

Thanks man...you're the best...
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top