View previous topic :: View next topic |
Author |
Message |
sonicdeejay
Joined: 20 Dec 2005 Posts: 112
|
Communicate 2 PIC using PWM |
Posted: Sun Feb 19, 2006 11:29 am |
|
|
Can I communicate 2 PIC(sender n receiver) using PWM output and input capture??
or DAC is the only solution..? (sender PIC with digital out and receiver PIC with get the analog data by placeing DAC between them)
|
|
|
ak6dn
Joined: 08 Jan 2006 Posts: 23 Location: Saratoga, CA USA
|
Re: Communicate 2 PIC using PWM |
Posted: Mon Feb 20, 2006 1:00 am |
|
|
sonicdeejay wrote: | Can I communicate 2 PIC(sender n receiver) using PWM output and input capture?? or DAC is the only solution..? (sender PIC with digital out and receiver PIC with get the analog data by placeing DAC between them)
|
You don't need either PWM or DAC... a digital output/input on PIC1 could be connected to a digital input/output on PIC2, and you could send Morse code messages between the devices. If you obey some simple rules (ie, the other guy can't transmit until I say I'm finished) just one bidirectional signal wire could be used for two-way communications... |
|
|
sjbaxter
Joined: 26 Jan 2006 Posts: 141 Location: Cheshire, UK
|
|
Posted: Mon Feb 20, 2006 3:32 am |
|
|
If the PICs have UARTS, why not just use these to send ascii data between the devices. Just as if you were sending RS232 info ?! _________________ Regards,
Simon. |
|
|
MikeValencia
Joined: 04 Aug 2004 Posts: 238 Location: Chicago
|
|
Posted: Mon Feb 20, 2006 3:42 pm |
|
|
Don't forget the current limiting resistor between the two PICs, just so you don't fry either chip if you accidentally turn them both into outputs! (I personally would rather use i2c between the two PICs, thus you'll have more flexibility in the messages you want to send.) |
|
|
|