View previous topic :: View next topic |
Author |
Message |
cagacug
Joined: 14 Apr 2004 Posts: 5
|
different Project using rs-232 and PWM carrier sg, possible? |
Posted: Tue Aug 23, 2005 1:44 am |
|
|
Hi to Everyone,
I am trying to build a little different project which uses soft rs-232 and 20kHz signal as a carrier for rs-232.
I did this with a hardware version, I mean I add the output of rs-232 pin with 20kHz signal which I produce with an oscillator, and it is working. But in order to free some space and components I want to this with software.
In other words, I want to define rs-232 and pwm, when the soft tries to transmit rs-232 data, it will actually enable the pwm output with 20kHz. But how can I define that the tx pin will actually enable the pwm output? OR can I change the internal rs-232 function to do this? Rx pin will work as it is. Any ideas?
Thanks, |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Tue Aug 23, 2005 7:14 am |
|
|
You will have to bit bang the data out or use a hardware solution that "ANDs" the pwm and rs232 signals together. |
|
|
cagacug
Joined: 14 Apr 2004 Posts: 5
|
|
Posted: Tue Aug 23, 2005 7:18 am |
|
|
Thanks for the reply.
Can you explain or give example of "bit bang" ing? |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Tue Aug 23, 2005 7:20 am |
|
|
Set pin high
wait
set pin low
wait
and so on
This means that you must manually create the waveform by toggling a pin! |
|
|
|