Hello,
I was wondering if anybody had a link to better explanation of using the compare module to output a PWM string of pulses for communication.
microchips AN594 tries to explain it but the code is ASM and its not my strong suit. I'm really on the hunt for something similar written in C.
Thanks
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Sat Apr 08, 2006 12:44 pm
These CCS driver and example files have C source code that uses the
PWM module in Compare mode:
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
Posted: Sat Apr 08, 2006 5:04 pm
What sort of communication are you trying to do with the PWM? It is usually used for analog output or power control, not communication. _________________ The search for better is endless. Instead simply find very good and get the job done.
dmendesf
Joined: 31 Dec 2005 Posts: 32
Posted: Sat Apr 08, 2006 8:32 pm
I don�t know what he�s doing, but i�ve used the PWM for generating a diferential manchester signal. It�s very easy and works OK.
eaton
Joined: 02 Oct 2004 Posts: 22 Location: cleveland
Posted: Mon Apr 10, 2006 8:56 am
I'm trying to communicate to a car using the SAE J1850 PWM protocol.
each bit is 24us long. a 1 is high for 8us and low for 16us while a zero is high for 16us and low for 8us. This sounded like a job for a PWM signal.
33% for a 1 and 66% for a zero. But it's not working out.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum