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.
Have a look at LED Cube Matrix Driver http://picprojects.org.uk/projects/lc/index.htm#Description site by Pete Griffiths.
Not only is Pete Griffiths brilliant in designing electronic circuits but he shows how to create a microcontroller program to display amazing effects on the cube.
In addition, his site is superbly laid out with diagrams and pictures and videos to help the constructor.
And all this is FREE to the constructor.
That’s why the internet beats any book or magazine hands down.
The internet reaches a world-wide audience, INSTANTLY.
And it's thanks to kssoin for finding this.
 
Last edited:
I'm sure they look a lot more impressive in person but I was never fond of how each LED can be blocked/refracted from other nearby LEDs and the framework. I've always wondered why 5mm LED's are typically used rather that surface mount LEDs aside from soldering ease. If the desire is to have a dot that glows simply use an SMD LED and coat it with semi-opaque wax or material that will diffuse the light to give you a nice glowing bead instead of the horrible directional effect typical of such LEDs. Even frosted lenses don't do enough to diffuse the light well.
 
Last edited:
what is the icsp for 16f628 be80be..I am confused

what is the icsp for this bebe,at first schematics you used port B for cathodes and later you used port A for cathodes,you didnt post icsp for later,could you plz tell what could the icsp pins for later schematic...
 
Hi yuva,
ICSP pins do not change when you re organise the outputs on a pic.I am very limited in my knowledge of PIC micros. Let more knowledgeable persons on this forum confirm this.
I have just managed to construct the LED cube.
The more exciting part is yet to start.
Regards.
kssoin
 
thanks kossin,you are right
I came to know that icsp pins do not change,
I have builded the 3x3x3led cube and used blue Leds port B and RA 3 for anodes and RA 6,7,5 for cathodes, 2N2222 transistors,diode IN914,capacitor 220micro farad,and the mentioned resistors..I HAVE CONNECTED THE CIRCUIT CORRECTLY AND I DUMPED THE HEX FILE PROVIDED BY "be80be" STILL i DONT GET THE OUTPUT,can anybody able to tell me whats wrong??
may be it is the hex file,can anybody provide me hex file plzz....???
 
Hii turker..,nice to have people like you,
could you plz provide me 3x3x3 led cube schematic,asm and hex files?
actually i had made one using 16f628..i donno whats wrong in it
 
somebody tell me how to create hex file from asm code using mplab

I think my cube is perfect in circuit and it is may be the hex file
 
Hi there im using a pic 16F627 and i cant get the code to compile, ive changed the top of the 16F690 to a 16F627. When i try and compile it with mpasm v5.01 i get many errors....any idea whats wrong?
 
The code that's been posted on here will work with a pic16f627
I have made 20 or more of them and ran out of 16f690 that why when the op ask I posted my
remade code for the 16f628 If you post your code i will fix it for you.
 
thanks kossin,you are right
I came to know that icsp pins do not change,
I have builded the 3x3x3led cube and used blue Leds port B and RA 3 for anodes and RA 6,7,5 for cathodes, 2N2222 transistors,diode IN914,capacitor 220micro farad,and the mentioned resistors..I HAVE CONNECTED THE CIRCUIT CORRECTLY AND I DUMPED THE HEX FILE PROVIDED BY "be80be" STILL i DONT GET THE OUTPUT,can anybody able to tell me whats wrong??
may be it is the hex file,can anybody provide me hex file plzz....???

I didn't post the ICSP all the time I figure you all would have that part figured
The hex works that I posted

This is a 16f628 and how the led's work
[embed]http://www.youtube.com/v/OsUJwhyjJJc&hl=en_US&fs=1&[/embed]
 
Last edited:
''be80be
The code that's been posted on here will work with a pic16f627
I have made 20 or more of them and ran out of 16f690 that why when the op ask I posted my
remade code for the 16f628 If you post your code i will fix it for you.''

thanks but i got the code fixed. My next problem is that when i turn it on none of the leds come on. I bypassed one of the transistors, still nothing. I tested the voltage, the chip gets 5v like it should, but the Positive pins going to the leds get no voltage:confused:
 
The transistors sink the 3 rolls and the 9 columns are sourced sound like your not sinking current
Here how I have made my cubes
The resistors for the three npn transistors are 1kohm
 

Attachments

  • cube..PNG
    cube..PNG
    10.5 KB · Views: 938
Last edited:
Hi Be do you have another hex design for the cube? I really don't have much time to create my own code due to very hectic schedules. If you could posts another cool sequence i would gladly reprogram my pic to try it :)
 
Anyways i made a PCB using Eagle complete with component guide and schematic during my spare time, enjoy :)
 

Attachments

  • 3x3x3 component placement guide.PNG
    3x3x3 component placement guide.PNG
    77.7 KB · Views: 1,306
  • Schematic with LED wiring guide.PNG
    Schematic with LED wiring guide.PNG
    91.4 KB · Views: 5,499
  • 3x3x316f628a.HEX
    10.9 KB · Views: 611
  • 3x3x3 led cube 1.pdf
    23.4 KB · Views: 1,168
Final Release and New Hex code

Oops sorry for the inconvenience, some last minor changes were made on the pcb to accommodate the new firmware released by Be80be named - new3x3x316f628a. The Bottom and Top layer should be connected in reverse and the connection from LED9 to R1 going to pin 1 (RA2) should be connected to pin 2 (RA3) instead. For those that already made the pcb above just cut the trace from pin 1 and use a jumper or a small wire to connect it to pin 2 and just reverse the layer connection (Top should be Bottom and vice versa). Use the new firmware new3x3x316f628a.HEX
 

Attachments

  • new3x3x316f628a.HEX
    10.9 KB · Views: 535
  • 3x3x3 component placement guide.PNG
    3x3x3 component placement guide.PNG
    77.5 KB · Views: 717
  • Schematic with LED wiring guide.PNG
    Schematic with LED wiring guide.PNG
    91.5 KB · Views: 4,727
Hi guys !


I've just finished the project above and i'm experiencing a strange behaviour: I'm actually trying to light led located at PORTA-7/PORTB-0 ONLY, but when i do this led PORTA-5/PORTB-0 lights too ! When i light led PORTA-5/PORTB-0 ONLY it works... Source code:

Code:
	list      p=16f628         	; list directive to define processor
	#include <p16F628.inc>     	; processor specific variable definitions

	__config 0x3D18				; configuration settings 

	cblock 	0x20
		count1 			;used in delay routine
		counta 			;used in delay routine 
		countb 			;used in delay routine
	endc

	org 0x0000
	
	movlw	0x07
	movwf	CMCON	
	
	bcf 	STATUS, RP1
	bsf		STATUS,RP0
	
	movlw	b'00000000'
	movwf	TRISB	
	movlw	b'00000000'
	movwf	TRISA

    bcf		STATUS, RP0

	clrf	PORTA
	clrf	PORTB

	call 	Loop
Loop:

	movlw	b'00100000'		; PORTA-5
	movwf	PORTA

	movlw	b'00000001'		; PORTB-0
	movwf	PORTB
	call 	Delay

	clrf 	PORTA
	clrf 	PORTB
	call 	Delay


	movlw	b'10000000'		; PORTA-7
	movwf	PORTA

	movlw	b'00000001'		; PORTB-0
	movwf	PORTB
	call 	Delay
	
	clrf 	PORTA
	clrf 	PORTB
	call 	Delay

	goto	Loop

Delay	movlw	d'250'			;delay 250 ms
	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

Thank you for your help !
 
Last edited:
You have a led backwards
 

Attachments

  • cube..PNG
    cube..PNG
    5.2 KB · Views: 754
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top