CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Simple Bit Bang Code
Goto page Previous  1, 2, 3, 4
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Aug 12, 2010 5:35 pm     Reply with quote

Can you post a photo of your board for this project ?
StingzLD



Joined: 18 Jul 2010
Posts: 42
Location: Richmond, VA

View user's profile Send private message

PostPosted: Fri Aug 13, 2010 9:40 am     Reply with quote

Okay, the image is pretty big; so here is the link to it: http://img530.imageshack.us/i/max7221setup.jpg/

The chip on the left is the PIC16F684 (with programmer connected), and the right is the MAX7221. For ease of seeing the different LED colors instead of the Bi-Polar, I swapped it out for two regular LEDs with the wiring of them being unchanged. And I have a bunch of different things on this breadboard all at once, so don't worry about the other wiring you see.
Ttelmah



Joined: 11 Mar 2010
Posts: 19551

View user's profile Send private message

PostPosted: Fri Aug 13, 2010 10:06 am     Reply with quote

Add a small decoupling capacitor right by the PIC.
Decoupling at the supply, is _not_ adequate for boards like this.
Can't see the ground connection to PIN4 on the chip. Presumably under the blue wire?.
Double check your Iset calculations. Looks like you have 270R. If so, you will probably have destroyed the LED's. The current is set to about 100* the value set by the Iset resistor. You want no more than 25mA on the LEDs, so about 0.25mA on the resistor About 1.2K _minimum_.....

Best Wishes
StingzLD



Joined: 18 Jul 2010
Posts: 42
Location: Richmond, VA

View user's profile Send private message

PostPosted: Fri Aug 13, 2010 10:45 am     Reply with quote

Thanks for the capacitor tip. I'm not sure if it will smooth power out or not since my programmer (which is seconding as my power supply while trying to get it to work) has all that built in, but it doesn't hurt to have more than needed! And as for the Iset resistor, it is a 220 ohm resistor that so far has not killed the LEDs. But just to be on the safe side, I swapped it out for the 1.2k ohm you suggested.

[Side note: I never went to school for any of this, so figuring out calculations is not my strong point. So thanks for the pointer!)
StingzLD



Joined: 18 Jul 2010
Posts: 42
Location: Richmond, VA

View user's profile Send private message

PostPosted: Fri Aug 13, 2010 11:03 am     Reply with quote

I finally got it to work correctly!!!! I have no clue why the difference in the resistor made such a huge impact, but it worked! I thought that it would have worked no matter what, except it would just be extremely dim if it was too high or blow if it was too low. But thanks for all of your help everyone! Hopefully this will be the end of this thread, and I will not encounter more problems as I add more LEDs. Thanks again!
StingzLD



Joined: 18 Jul 2010
Posts: 42
Location: Richmond, VA

View user's profile Send private message

PostPosted: Sat Aug 14, 2010 8:33 am     Reply with quote

UPDATE:

This is solely FYI. Since getting the MAX7221 to work and playing around with it, I decided that I would take that chip out and try the MAX7219 for sh1ts and giggles. Well, apparently whatever has been going wrong during this whole thread has been because the MAX7219 doesn't like my chip. Just be certain I slapped the MAX7221 back in and voila! Worked like a charm. I do find it very curious though that the MAX7219 does perform the lighting of the single LED... but only very sporadically with an immense amount of time in between flashes.

So the lesson to be learned from this experiment is if your chip doesn't have any special features in regards to communication (like my PIC16F684), use the MAX7221!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2, 3, 4
Page 4 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group