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.

My RGB project

Status
Not open for further replies.

Number17

New Member
Hi

Recently my friend asked me to create a USB device which he can use to control lights with. Ofcourse I asked why not serial, since it would be easier, but he insisted I should use USB. So I thought I would share my project with you all.

The entire project is based on Microchip's Custom HID Demo (with DLL). I've used an PIC18F4550 for USB.

Compilers used:
PC: Visual C++
18F4550: MPLAB C18
16F628: MikroC PRO

Basically the pc sents 5 bytes of data. The first byte is the start byte and is 14 Hex. The next three bytes is each an 8bit "color" byte. The last byte is an "master control" byte, which controlls the total brightness of all 3 colors. (I'm still working on that)

Block diagram:
Block.JPG

The diagram pretty much explains all. Ok so the pc sends 5 bytes via USB. The 18F converts and sends the data to the 16F. This will be wireless. The Buadrate is 14.4k.

The 16F uses a "3 channel" software PWM, found on this site. I could'nt found the link, but it was done by Mike McLaren K8LH.

Here are 2 screenshots of the program on the pc.

appstart.JPGappinuse.JPG


The color values is selected with a numeric up/down "counter". The percentage of color used is displayed with the bars on the bottom. You can also preview the color on the right, before you "create it"



This is the "devolepment board". Unfortantly I don't have an RGB LED. I hope to get one soon and test if this thing really work. Currently I test the voltage over each LED to determine if it's less bright when I can't see the diffenrnce.

Just to let you know. The 18F is programmed with a bootloader found here: eegeek.net - 18F4550 USB Interface

I've also used their schematics for the 18F layout.


29122009279.jpg

And thats all for now. Thank you for looking at the post.

Cheers
Christiaan
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top