Coilgun Power

Microcontroller/Coilgun Ideas and Support
 
Main HomeMain Home  HomeHome  FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  RegisterRegister  Log in  

Share | 
 

 Single color 4x4x4 led cube

Go down 
Go to page : Previous  1, 2
AuthorMessage
DaveyPocket



Posts : 74
Join date : 2008-04-01

PostSubject: good.   Fri Apr 11, 2008 10:33 pm

looks good to me,I have a question though. It's a problem I'm having with PIC programmer. Whenever I go to compile the data onto the chip, it keeps giving me the error of "Cannot receive device ID" or something like that. It just started happening randomly, everything is the way it's supposed to be, like it was. It started happening yesterday. I can't program the PIC when in this state.
Back to top Go down
View user profile
Admin
Admin
avatar

Posts : 115
Join date : 2008-03-26
Location : USA, California

PostSubject: Re: Single color 4x4x4 led cube   Fri Apr 11, 2008 10:39 pm

What programmer are you using? A real one (PICkit2) or some home-made one (or from eBay)? I used to get a lot of those errors from my old eBay programmer. I got a PICkit2 and I only get them with PK2 a program for Linux that is in alpha testing so it hardly works. With Windows it seems to work fine. I never had a problem with AVR though. I program them with my Gumstix. You can buy a cheap ISP just make sure you don't disable the reset pin because you won't be able to reprogram it unless you have a HV programmer witch cost more.

Justin
Back to top Go down
View user profile http://coilgunpower.com
DaveyPocket



Posts : 74
Join date : 2008-04-01

PostSubject: meh   Fri Apr 11, 2008 11:33 pm

Yea, funny thing, I disabled the reset pin, xD.
It's a homemade programmer, works well. Is there an alternative way to reprogram the chip with buying this HV programmer? I've seen schematics online to build one, I just would like to know if there was another way.
Back to top Go down
View user profile
Admin
Admin
avatar

Posts : 115
Join date : 2008-03-26
Location : USA, California

PostSubject: Re: Single color 4x4x4 led cube   Fri Apr 11, 2008 11:53 pm

Disabling the reset pin only applies to AVR I think. Did you already make an AVR programmer? I prefer to buy a programmer and not make one as they are usually more reliable and offer more features. The PICkit2 is constantly being updated to be able to program more and more PIC.
Justin
Back to top Go down
View user profile http://coilgunpower.com
DaveyPocket



Posts : 74
Join date : 2008-04-01

PostSubject: Ok.   Fri Apr 11, 2008 11:57 pm

Here's what I have, a homemade PIC programmer, PIC 16f627, a BS2, a PIC 16C621A, and that's basically about it. I don't have anything else thats useful at the time. I have nothing AVR related.
Back to top Go down
View user profile
Admin
Admin
avatar

Posts : 115
Join date : 2008-03-26
Location : USA, California

PostSubject: Samples   Sat Apr 12, 2008 3:28 am

If you want small quantities of PIC to play with Microchip will give samples to students. You can get them at their site. I get a lot of stuff that way. Very Happy
Justin
Back to top Go down
View user profile http://coilgunpower.com
DaveyPocket



Posts : 74
Join date : 2008-04-01

PostSubject: Yea.   Sat Apr 12, 2008 12:20 pm

Good idea, I also think I just killed my PIC. It works on the experiment board I made, but not on the cube(flashes LED's on board, no flash on cube). This should give me time to fully experiment with multiple PIC, instead of killing the only one I have.
Back to top Go down
View user profile
Admin
Admin
avatar

Posts : 115
Join date : 2008-03-26
Location : USA, California

PostSubject: Re: Single color 4x4x4 led cube   Sat Apr 12, 2008 2:24 pm

If it still works on one board but not the other it is probably your board not the PIC. You may have more noise on the board, or the reset pin is held in reset.
Justin
Back to top Go down
View user profile http://coilgunpower.com
DaveyPocket



Posts : 74
Join date : 2008-04-01

PostSubject: Your right.   Mon Apr 14, 2008 12:21 am

Yea, it's the reset pin, but I still can't re program it. Now, starting out with AVR or PIC, if I get the EasyAVR or EasyPIC development baords using MikroBASIC, does it really matter which one I start of using? The boards have all the same features and use the same programming languages. But if I didn't use these boards, I heard Arduino is a cheap and good experiment board, has a C compiler that's free. But right now, all I'm trying to do is stay away from assembler. I'm trying to find a good experiment board that supports mostly every PIC(or if it's and AVR board) and has a BASIC or C compiler that works well. I've read that MikroE's development boards support almost every PIC.
confused
Back to top Go down
View user profile
Admin
Admin
avatar

Posts : 115
Join date : 2008-03-26
Location : USA, California

PostSubject: Re: Single color 4x4x4 led cube   Mon Apr 14, 2008 2:58 am

I never used the Arduino board but also hear it is good. I would definitely go with AVR. I use gcc for my AVR compiler. Free and works great, might only be for linux though. I don't use an experiment board for AVRs I just get a DIP version and stick it on a bread board and use an ISP programmer to program it. Or you could buy a robostix. I use mine with a gumstix verdex xl6p, but they work great stand alone and the ATmega128 is a very capable AVR.
Justin
Back to top Go down
View user profile http://coilgunpower.com
DaveyPocket



Posts : 74
Join date : 2008-04-01

PostSubject: Re: Single color 4x4x4 led cube   Mon Apr 14, 2008 5:57 pm

Yes, I'm thinking about getting an ICSP device, like PICkit2, heard that works great. But MikroE also makes a device similar to PICkit2, it's called PICflash2. It basically has the same functionality as the PICkit2, but it uses the MikroC, MikroBASIC, and MikroPASCAL compilers when programming. So would this be something to recommend?
Back to top Go down
View user profile
Admin
Admin
avatar

Posts : 115
Join date : 2008-03-26
Location : USA, California

PostSubject: Re: Single color 4x4x4 led cube   Mon Apr 14, 2008 10:50 pm

If you are going to get an ICSP for PIC then I would get the PICkit2. It can debug, comes with a free (student version) C compiler, supports almost all the PIC, now can be used as a digital logic analyzer, and only costs $35 from Mouser.

The MikroC compiler is OK. I use it (and own a copy) for the dsPIC compiler. I should of not of waisted that much on the compiler when Microchip will give the student version for free. I would go the free route if I had a choice now but I already bought the LV24-33 and compiler. Don't get me wrong it is nice for the dsPIC (the one I use is only SMA), but I would rather go the free way. I actually like the AVR better and I did not spend a penny for anything (well, I had to buy the AVR). I used the Gumstix (UISP) and the free compiler. Very Happy

Edit: You should also note that if you want to use the Mikro compilers you can use them with the PICkit2. All you need is the HEX they generate and vice versa with the Microchip compilers.

Justin
Back to top Go down
View user profile http://coilgunpower.com
DaveyPocket



Posts : 74
Join date : 2008-04-01

PostSubject: Really.   Tue Apr 15, 2008 7:53 pm

I was not aware of that. That sounds like a good idea. I don't know C, and I don't plan on learning it until summer when I have time. So the compiler is free to all students, and supports mostly every PIC? If so, I will go that way, but my main goal was to find a cheap and good BASIC compiler. The only ones i know of are PICBASIC and MikroBASIC, but those are exactly the same price, so what's the point. I've had some experience in C++ modifying some old PC games. And the main thing I'm still trying to figure out, why I can't reprogram my PIC 16F627, the reset pin works, but the program doesn't detect the PIC, only the programmer.
Back to top Go down
View user profile
Admin
Admin
avatar

Posts : 115
Join date : 2008-03-26
Location : USA, California

PostSubject: Re: Single color 4x4x4 led cube   Tue Apr 15, 2008 10:21 pm

Microchip does not have a C compiler for the 16F PICs. Only 18F or higher. For 16F assembly is usually the best way to go and they have a free assembler.

C is easier to learn then C++, in my option. I tried learning C++ but started getting confused with C as they are so similar. C is great because you can use it for computers or PIC. C is much better then basic. Learn it if you can. It is not very complicated and you should have a decent understanding in a few weeks.

I still would like to strongly recommend AVR over PIC. WinAVR is a free C++ and C compiler for AVR.

Justin
Back to top Go down
View user profile http://coilgunpower.com
DaveyPocket



Posts : 74
Join date : 2008-04-01

PostSubject: Great.   Tue Apr 15, 2008 10:53 pm

That's great, but too bad no 16f's are supported.

I still need help fixing my 16F627, the reset pin works, but the programmer doesn't recognize the chip, I tried various things, but they don't seem to be helping. Is there some simple way to clear the memory on the PIC? I'm not sure what to do and I don't want to kill the chip.
Back to top Go down
View user profile
Admin
Admin
avatar

Posts : 115
Join date : 2008-03-26
Location : USA, California

PostSubject: Re: Single color 4x4x4 led cube   Tue Apr 15, 2008 11:09 pm

My guess is it is your programmer. My old programmer would be recognized by my computer but would not find the PIC. Usually there is a blank chip option that erases the fuses and the ROM. I don't know what to tell you. It may be dead. I would just get some samples Wink and a PICkit2 (if you are set on PIC).
Justin
Back to top Go down
View user profile http://coilgunpower.com
DaveyPocket



Posts : 74
Join date : 2008-04-01

PostSubject: Your right.   Tue Apr 15, 2008 11:29 pm

I know my PIC might not be dead, because it still works(tried it on a bread board, all I/O pins, except for the one input which I can't try because I haven't programmed it, work). I believe it is my programmer, every time I hit, read device or read data, the power LED starts to dim slowly, then the voltage regulators start to get hot. So this could be a sign. I will get some samples and the PICkit soon. I'm going to stick with PIC and the PICkit2, I might try out AVR sometime. Now, have you ever heard of parrallax SX-key microcontrollers? I have this little XGamestation breadboard kit I got from some relative, and it uses a 28 pin SX key chip. It is clocked at 80 MHz, and the video is very good, even though its gray scale.
Back to top Go down
View user profile
Admin
Admin
avatar

Posts : 115
Join date : 2008-03-26
Location : USA, California

PostSubject: Re: Single color 4x4x4 led cube   Wed Apr 16, 2008 12:07 am

I tend to stay away from Parallax. They are usually pricey but the SX chips look good, lacking peripherals, but has good speed. Parallax things are generally for beginners and they aim toward user-friendly products witch can limit you in the end (think BS2, simple to program, very slow and does not allow access to peripherals like the ADC).

You may like to see the 3D graphics I did on an ATmega32 and an OLED. I was working on adding more polygons and colors when I accidentally connected +5v to the OLED Mad. I need to see if it was just the board or the actual OLED that was toasted. The lines are from the camera.



Justin
Back to top Go down
View user profile http://coilgunpower.com
DaveyPocket



Posts : 74
Join date : 2008-04-01

PostSubject: Re: Single color 4x4x4 led cube   Wed Apr 16, 2008 12:57 am

Awesome. What is the Max voltage on OLED screens, and what kind of OLED device was that, a serial OLED(one with a programmed controller on it, all you need to do is input some stuff) or just a standard one? I would like to do something similar but on an LCD on my old busted camera(the gears on the lens zooming are jammed and it won't turn on). The LCD is full color and is 2.5 inches. Now if I were to do this, would you prefer using AVR or PIC? I believe AVR would be the way to go since it has high speeds.
But anyway, I agree with you about parrallax prices, those SX-chips are powerful, but expensive. And same with the device to connect to the SX chips, $50 for USB to SX chip, not worth buying. The programming language I'm not sure about, but it seems confusing when I looked at samples.
So I'm still deciding, AVR or PIC for general experiments and my cube. I'm putting my thoughts mainly on AVR because of speed and the fact that you are able to use all I/O ports. What programmer do you use to program your AVR's??? I would like to know.
Back to top Go down
View user profile
Admin
Admin
avatar

Posts : 115
Join date : 2008-03-26
Location : USA, California

PostSubject: Re: Single color 4x4x4 led cube   Wed Apr 16, 2008 1:35 am

I program my AVR though the Gumstix using UISP. It acts the same as the ATAVRISP2. The OLED is the one sold by sparkfun. It uses 3.3v for the controller but the actual OLED needs 12v. The breakout board takes the 3.3v and boosts it to 12v so you only have to use 3.3v. The problem is that the ATmega32 runs at 5v so I used many diodes and resistors (one for each data pin) to change the level, see this page. The diode resistor method is easy but only allows for writes no reads. Witch is not a problem in most cases.

The OLED has a controller but uses a parallel or serial interface. I used parallel for speed. It has a draw line routine built in witch is used extensively to draw solid triangles. That however is a complete different topic.

I now always prefer to use AVR. PIC are ok, but AVR are more efficient, cost about the same, have better I/O pin layouts, and work great with Linux Very Happy (that was the actual turning point from PIC to AVR).

Using a LCD without a data sheet to go by will be very difficult. Unless you can find what model the LCD is you probably won't get it to work.

For a post that does not relate to the 4x4x4 single color cube please create a topic.

Thanks,
Justin
Back to top Go down
View user profile http://coilgunpower.com
DaveyPocket



Posts : 74
Join date : 2008-04-01

PostSubject: On your cube.   Sat Apr 26, 2008 1:27 am

Got a question, on your 4x4x4 cube you made, you added the flip-flop circuits to help the cube. I'm confused on what way it helped it. What do the flip flops do that is different than just directly connecting it to the PIC? I know it helps with voltage, but how is are the chips set up to activate and deactivate the latches and stuff. scratch
Back to top Go down
View user profile
Admin
Admin
avatar

Posts : 115
Join date : 2008-03-26
Location : USA, California

PostSubject: Re: Single color 4x4x4 led cube   Sat Apr 26, 2008 2:04 am

The flip flops can sink/source more current, a lot more actually. That helps with the brightness.

Another big difference is that the I/O pins can be manipulated without the result showing. When the program is done changing the pins it simply sends a pulse on the trigger pin causing the flip flops to update. All the flip flops trigger pins are connected to the same I/O pin on the PIC.

If you run my 4x4x4 code with out the flip flops then it will not work properly. For example if one row should be blank and the next is full red then the one that should be blank will be slightly red. This is minimized (you can't even tell) in the new 3x3x3 code (not finished yet). It takes more instructions and you have to work with variables that will be latter updated into the real ports. (bporta will be sent to porta later, ect)

You could simply use transistors (actually recommended for the common pins) and fix this problem in code like the 3x3x3.

So in summary, you don't need flip flops but then help with brightness and the keeps the color from caring over during I/O manipulation.

Justin
Back to top Go down
View user profile http://coilgunpower.com
DaveyPocket



Posts : 74
Join date : 2008-04-01

PostSubject: I get it.   Sat Apr 26, 2008 6:27 pm

I understand now. That makes perfect sense. I had something similar with a brightness issue on my 3x3x3, when doing the horizontal effect, some LED's were on, but very dim. But I made some changes.

Before:
Code:

OUTH = %11111101:OUTL = %11000000
PAUSE 5                                         
OUTH = %11111010:OUTL = %00111000
PAUSE 5
OUTH = %11110110:OUTL = %00000111
PAUSE 5

After:
Code:

OUTL = %00000000:OUTH = %11111101:OUTL = %11000000
PAUSE 5                                       
OUTL = %00000000:OUTH = %11111010:OUTL = %00111000
PAUSE 5
OUTL = %00000000:OUTH = %11110110:OUTL = %00000111
PAUSE 5

Basically, what I did was make the BS2 send low signal's to "port B" after each row was lit, then let it execute the next set of instructions.
Back to top Go down
View user profile
Admin
Admin
avatar

Posts : 115
Join date : 2008-03-26
Location : USA, California

PostSubject: Re: Single color 4x4x4 led cube   Sat Apr 26, 2008 6:35 pm

That is almost exactly what my code does. A little different because of the interrupt style and pins layout.

One thing I forgot to mention is you may or may not of noticed but if you have an entire row lit then it will be dimmer then if only one LED in the row is lit. The flip flops help with that.

Justin
Back to top Go down
View user profile http://coilgunpower.com
Sponsored content




PostSubject: Re: Single color 4x4x4 led cube   

Back to top Go down
 
Single color 4x4x4 led cube
Back to top 
Page 2 of 2Go to page : Previous  1, 2
 Similar topics
-
» 3 color on the border
» Background-color:
» How to verify particular TEXT color in web page using selenium webdriver?
» How to test single page application (java) with selenium
» Selenium Help color text

Permissions in this forum:You cannot reply to topics in this forum
Coilgun Power :: PIC Microcontrollers :: LED Cubes-
Jump to: