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.

Learning PWM and RGB

Status
Not open for further replies.

yfx4

Member
Being new to PICs I have some bigger project ideas but want to go in little steps to learn along the way. I have done some of Nigels tutorials.

I have a 12f683 coming (free!!). I also have these RGBs:

**broken link removed**

I am considering a project with 1 RGB that I want to color fade and then 1 red and 1 blue LED that will double-flash alternately--in a police-like fashion.

This project is an excuse to learn more (??) about programming. I am placing it into a little LEGO model so it has lights in it (something like is on www.brickmodders.net). No useful purpose--just an excuse to make something.

My questions are... with 5 I/O pins, 3 used on the RGB (should I make it CA or CC??). The remaining two I can use for the blue and red. Since they will be alternating can I get away with 1 pin playing with the tristate in a kind of charlieplex fashion?? Would it be better to just use the two pins for the red and blue?? Or is it a personal preference issue? I believe the 12f683 has more than enuf power and speed to do all this smoothly. Or at least OK.

Also, since the R, G and B have different Vf I need different value resistors for each chip, correct? In calculating the values for them I should use Vdd-0.7 volts--or am I misreading the datasheet?

The project is still in the brain phase so no written schematic or code exists yet. This is supposed to be simple but also an opportunity to learn.

In advance, thank you for the input. I have learned a lot from the other threads here already!!
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top