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.

Electronic Based Halloween costume idea

Status
Not open for further replies.

skeeterb

Member
I was loading up The Sims 3 and got hit by a BRILLIANT costume idea. I know that I want to use a PIC uC to control it. I was recommended to use a RGB LED and the PWM of the pic to change the Plumbob color between Green, Yellow, Yellow-Red, and Red. But I am TOTALLY unfamiliar with the techniques to control the PWM and how to send the output of the PWM to the LEDs to change the Sim plumbob's color. I'm a little familiar with using Flowcode, but I'm wanting to ease away from that program. Can anyone help me get a good start? I DON'T want ANY code just suggestions to help me get started. I want to figure this out for MYSELF, like I did with my first program that I created using Assembly, that I got to work in simulation but never actually created a circuit for.


Edit: I've started a program using Flowcode, as much as I hate to. But how would I output the PWM to my RGB LEDs? I can put in boxes that you can put in C Code, but I just want to see how to before I use that.
 
Last edited:
Use 3 o/p pins and a counter, the counter increments with the chip clock, set a pin high theb compare the counter with the req pwm, when the pwm counter exceeds the req pwm clear the o/p pin.
You wont get massive resolution, probably 7 bit at around 30 - 40hz.

You can get 2 pin rgb leds with a built in sequencer.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top