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.
Still not working....i am getting following voltages..

after the 10k - 1.54v(is this resistor required)
after the diode - 0.99v
after every 1k - 0.03v(i don't think so this is enough for to glow an LED)

Is my jdm is not programming properly or something wrong in my wiring... i am clueless...

How can i check my pic is programmed properly and it is working?

can u tell where and what voltages i will get if the programe is working properly...

Robotsmani :-(
 
Last edited:
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...

RA4 on the 16F628 is an open collector output. It can only sink current not source.
 
You no whats the whole deal here is no one read all the post just parts And i did this on 4 chips if they could read the code they would know where led 9 goes and I didn't tell any one to use 10 k on any leds there 150 ohms the 10k goes to mclr to vdd the 1k drive the 3 transistors now Bill is right you can't put a led on PORTA,4 it can only sink power I should of look back a what did when I made this work on a 16f628a But I can't I lost my harddrive
on the computer I use for this. You use PORTA,2 for led 9
Code:
Output2:
							; --- Top Layer ---
	clrf	PORTA			; clear port B
	movfw	Layer1			; move layer1 to W
	movwf	PORTB			; put W onto PortC

	btfsc	Layer4,7		; see if LED 9 should be on
[COLOR="Red"]	bsf		PORTA,2			; turn on LED 9[/COLOR]
here the right circuit For the 16f628a or 16f628
 
Last edited:
Oh...is there any difference in 16f628 and 16f628a. I am using 16f628A. is that the problem, then what is the change the circuit and program for 16f628A?

Thanks,
Robotsmani
 
Thanks be80be,

i have done the circuit like only. but my doubt is on my pic. how can i check my pic is working. because all the other wiring is correct (i checked). is the follwing voltages are correct?

after the 10k - 1.54v(is this resistor required)
after the diode - 0.99v
after every 1k - 0.03v(i don't think so this is enough for to glow an LED)
 
Cool it is working....my doubt is right. my pic is not working. i tried with winpic it is working except RA4 and RB2...Like the above reply do i need to reprogram it....

It is really great to look at the working LED...Thanks a bunch be80be

Robotsmani
 
I know It would just a matter of time LOL

Yes, mine too...
all LED working now after i move the 9th LED to RA2, thanks to you.
and now i'm about to learn to give some modification to the HEX,
i'm telling you be80be, i'm gonna spend your time with a lot of question,
it's your fault for being a master of it, LOL.
 
:D:D:D
this is my cube...
:D:D:D



i made a little change to the position...
well i guess it's not cube anymore...
 

Attachments

  • led cube.gif
    led cube.gif
    3.9 MB · Views: 572
great job that looks real cool

Thanks...
well...it won't happen without your help,

be80be,
i'd like to use switches at unused portA for some command
let's say...
i wanna call label 0008 with switch at RA0,
label 0009 with switch at RA1 and label 0010 with switch at RA3

how could i do that
could i just add this to the hex
BTFSS PORTA , 00
CALL Label_0008
BTFSS PORTA , 01
CALL Label_0009
BTFSS PORTA , 03
CALL Label_0010

or is there anything else to change/add?
thank you in advanced
 
You added it to asm and rebuild the hex that code doesn't do any thing but check them. And you need to debonuce the switch here look at this
Code:
LookingForDown:
     clrw                          ; assume it's not, so clear
     btfss     PORTA,3             ; wait for switch to go low
     incf      Counter,w           ; if it's low, bump the counter
     movwf     Counter             ; store either the 0 or incremented value
     goto      EndDebounce
     
LookingForUp:
     clrw                          ; assume it's not, so clear
     btfsc     PORTA,3             ; wait for switch to go low
     incf      Counter,w
     movwf     Counter
that's one way i'll post you a easy one when i get home
Here read this it's real good to show you how to use switches
https://www.electro-tech-online.com/custompdfs/2009/04/PIC_Mid_A_3.pdf
 
Last edited:
You added it to asm and rebuild the hex that code doesn't do any thing but check them. And you need to debonuce the switch here look at this
Code:
LookingForDown:
     clrw                          ; assume it's not, so clear
     btfss     PORTA,3             ; wait for switch to go low
     incf      Counter,w           ; if it's low, bump the counter
     movwf     Counter             ; store either the 0 or incremented value
     goto      EndDebounce
     
LookingForUp:
     clrw                          ; assume it's not, so clear
     btfsc     PORTA,3             ; wait for switch to go low
     incf      Counter,w
     movwf     Counter
that's one way i'll post you a easy one when i get home
Here read this it's real good to show you how to use switches
https://www.electro-tech-online.com/custompdfs/2009/04/PIC_Mid_A_3-1.pdf

i tried that but sadly i couldn't make the hex file right with mplab
the hex file just filled with 3FFF
i've search through google to find asm to hex converter but i couldn't find good one
could anyone show me a simple programmer schematic that i could use with mplab cause i don't have cc to buy real prgrammer on the net
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top