crazylegsmurphy
New Member
Hey All,
I just got my PICKit 2 starter kit and have been reading over as much stuff as I can, but I'm pretty new to all this and so I'm getting quite stuck. I had someone who seemed willing to help, but they flaked out, so I'm back to square one.
I'm looking for some help to get this project going. I don't really want someone to program it all for me as I want to learn, but I am willing to compensate anyone who feels like putting in a legit effort to get things going.
With that said, here is what I am trying to do.
I need to program three PIC's (16F690).
The following is a document that someone was helping me with, but no longer has the time.
Basically, I need the three devices to communicated with each other so they know when each device is present.
From there, I need to write code to allow the devices to turn on up to 5 LED's/Bulbs. When all three devices are present, the lights will turn on, and then randomly fade from light to dim.
Once the devices are brought away from each other, the lights fade out and turn off.
So that is what I am basically trying to do. I am willing to put in as much time as possible to get it working, but I really need some solid direction and help so I'm actually working towards the right goals and not just puttering around.
Thanks!
Jeff
I just got my PICKit 2 starter kit and have been reading over as much stuff as I can, but I'm pretty new to all this and so I'm getting quite stuck. I had someone who seemed willing to help, but they flaked out, so I'm back to square one.
I'm looking for some help to get this project going. I don't really want someone to program it all for me as I want to learn, but I am willing to compensate anyone who feels like putting in a legit effort to get things going.
With that said, here is what I am trying to do.
I need to program three PIC's (16F690).
The following is a document that someone was helping me with, but no longer has the time.
IR Communications:
Using USART in Asynch mode, with an IR modulation frequency that is a multiple of the bitrate, 2 bytes are to be sent from the lower end of the chain of command upward: One byte will tell the receiving device to listen for the next byte (To avoid false-positives in transmission). The slave devices will each send a specific code to the next highest in command. For a practical example, the Lower Slave will first send the handshake code (10100101, or 0xA5) to tell the next higher device that it will be sending, then it's own device code (e.g. 00110101, or 0x35). If the highest chain of command receives the next bit out-of-order, it's parsing routine will ignore it. This will make the system avoid spontaneous synchronous transmissions, which would confuse the system. The Middle Slave device and master device would both receive the signal if in range, but the device code would cause only the Middle Slave to act on the signal. The middle slave, upon receiving the Lower Slave's device code, would transmit it's own device code after the handshake (e.g. 01110101, or 0x75).
After each device has transmitted it's code, it will wait for a predetermined amount of time for an Acknowledge code (Also device-specific) to be sent from it's next-in-command. Upon receiving the acknowledgement code, the device waits for the Master code to start the lighting routine.
The master device needs only to receive the Middle Slave's code and transmit a Master code.
Lower Slave:
Timeline of activities:
Transmit Handshake -> Transmit Device Code -> Wait .5s for Middle Slave and Master communication -> Back to Transmit Handshake
Middle Slave:
Timeline:
Wait for Lower Slave Handshake & Device Code -> Transmit Handshake -> Transmit Device Code -> Wait .5s for Master Signal -> Back to Wait for Lower Slave HS & DC
Basically, I need the three devices to communicated with each other so they know when each device is present.
From there, I need to write code to allow the devices to turn on up to 5 LED's/Bulbs. When all three devices are present, the lights will turn on, and then randomly fade from light to dim.
Once the devices are brought away from each other, the lights fade out and turn off.
So that is what I am basically trying to do. I am willing to put in as much time as possible to get it working, but I really need some solid direction and help so I'm actually working towards the right goals and not just puttering around.
Thanks!
Jeff