Misterbenn said:..i have 5 units, each unit controls 4 LEDs (red green blue and white).
Misterbenn said:2) where the units are out of phase so while one is red teh other is green the other is blue so on
they were just examples, the acctual colours would be a mixture of the 4 diferent colours the sub-units control eg red and green = purpple.What should the color for the fifth unit be? You said you only have 4 LEDs of different colors. Maybe you would add yellow or amber to your mood LED collection.
So basicaly you are using your own serial protocol? I suggest you should use I2C instead, that would be much better.Misterbenn said:because i have 5 units i will need 3 adress bits, these will be followed by the 4 4 bit instructions for the brightness of the 4 LEDS of each unit. giving my a total of a 21 bit serial transmition. i will need a start and stop bit as well as a parity bit so the units can reject the data if it isnt valid giving me a total of 24 bits. again havent thought of the code for this.
Assembly will be ok with this project. There is no need to switch to different language.now i have very limited experiance with PICs, i only have the PIC kit1 starter kit, limiting the pics i can use, also i only know assembeler, (would it be worth learning i diferent programing language, such as C)
I2C is multidevice synchronus two wire half-duplex serial BUS, designed for communication between many devices (each one having it's own unique address).Misterbenn said:Jay.slovak:
this sounds good, though i need to keep the sub-unit size down, could this system interface directly with say 12F675? i'd prefer to keep it down to just one wire if pos
mechie:
RS232 sounds perfect, however i dont know much about it, and affter googling it, it seems to just be a computer port right? ideally i want an indevidual unit, not one conected to the PC, but this kind of chain system sounds perfect, and elimintaes the need for addresses, so i'll prob try and recreate this type of serial comunication using a pic, i assume this would be synchronous?
RS232 is a communication 'protocol', it seems far more daunting than it needs to be.Misterbenn said:mechie:
RS232 sounds perfect, however i dont know much about it, and affter googling it, it seems to just be a computer port right? ideally i want an indevidual unit, not one conected to the PC, but this kind of chain system sounds perfect, and elimintaes the need for addresses, so i'll prob try and recreate this type of serial comunication using a pic, i assume this would be synchronous?
Full-duplex is one of the options of RS232, but here I am suggesting a 'simplex' (comms only in one direction) system - there should be no need to ever read back from one of these devices.Jay.slovak said:As for RS-232... ...it will appear as a standard asynchronus full-duplex two wire (one wire for each direction) BUS. it was NOT designed for multiple IC communication
No two controllers have their recieve lines are connected to any one transmit line - I am suggesting a daisy-chain arrangement, one-to-one, anyway, I connect THREE computers together with RS232 (single port on each computer) - I just 'bend the rules' a bit !Jay.slovak said:... it was NOT designed for multiple IC communication
this idea seems perfect, one thing why would it need two wires? for handshaking? couldnt this be avoided by using synchronous transmition?My idea is that the 'master' unit will send out a full command string of 20 bytes to the first PIC-based LED controller, this looks at the full string, reading the lot into its memory, it uses the first four bytes for its LEDs, deletes them from the string and then transmits the remainder (in this case, 16 bytes) on along the chain. The next controller does exactly the same, now passing 12 bytes on.
I think you misunderstod synchronus and asynchronus transmissions. Synchronus requires 2 wires (one for clock, second for data). Asynchronus will be fine with one (Start and Stop bits will take care of syncronisation). So if you want to save wires, look for asynchronus (it's slower then synchronus).Misterbenn said:this idea seems perfect, one thing why would it need two wires? for handshaking? couldnt this be avoided by using synchronous transmition?
There seems to be some confusion about how I counted two wires for data. I am referring to a 'data' line and a 'common' or 0v line, the return path for the current.Misterbenn said:one thing why would it need two wires? for handshaking? couldnt this be avoided by using synchronous transmition?
No problem - an interesting project and a chance for me to learn :!:Misterbenn said:thanq for the offer of help with the code, i may very well take you up on that
True, but read below :? :wink:Misterbenn said:and as for bending the rules, thats how new systems are discoverd!
Misterbenn said:ok i've finaly got around to starting this project.
i'm only using 3 LEDs per unit now, i found this nice little RGB unit. so i'm only sending 15 bites now. though i think i'll need a transducer driver or somthing like that. any one got any idears about a small transducer driver i could use? i thought of a darlington driver but they only come in 8/chip, i need a smaller 3/chip version.
i think the code is going ok, although i'll need some / lots of help with the transmition, and reception bit of the code. i'm planning to run this at about 20MHz, and transmit the LED light level data 50 times a second.
i'll post the code later so people can look through it, any and all help with it will be welcomed with wide open arms! i'm sure there must be a way to make it look a little less complex.
i've decided i'm going for a light pattern of
R G B
3/3 2/3 1/3
2/3 1/3 0/3
1/3 0/3 1/3
0/3 1/3 2/3
1/3 2/3 3/3
2/3 3/3 2/3
then back to the top.
Misterbenn said:the single versions will add to the size of my units. i need to keep this as small as possible. i could just use surface mount fransistors and resistors, but they cost more and i'd need to by the solder for them. so i need a cheap small soulution.
all i need is 3 drivers packaged in a single chip or something similar, so a small darlinglton aray would be perfect
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?