You are here

HOW TO SEND WORD USING PWM. | Cypress Semiconductor


Summary: 4 Replies, Latest post by sky022 on 02 Jun 2014 09:37 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
user_260097727's picture
46 posts

Hi to all

Does any one help me or guide me for sending word or byte using PWM.


user_1377889's picture
9256 posts

PWM is usually found in controlling applications, not for the transmission of information. When I understand your question correctly you want to "send a word or byte" this might be difficult to regain the sent information correctly.

A PWM has 2 parameters to controll it:

The period that describes how often (at which frequency) the information gets repeated

and the duty-cycle which actually contains the information to be sent.

Realization of PWM in PSoCs is made with a counter fed by a clock and a comparator that compares for "less than the counter". Since the maximum of the compare-value is the period, the precision of the PWM gets better with increasing width of the counter, usually selectable between 8 and 16, sometimes up to 32 Bits.



user_14586677's picture
7646 posts

If you are trying to convert a byte into a PWM signal, say dusty cycle, then

decode it at other end and retrieve initial byte value, you would do so by

controlling PW on send side, then measuring the PW on the receive side.

But you have errors associated with measuring period and PW, +/- 1 count

issues with gating, clock differences......


This is best done via UART, I2C, SPI, One Wire....a serial protocol. Then you will

elimnate some of the aforementioned issues.


Regards, Dana.

user_460349's picture
1362 posts

While it is not common. You can use pulse with mark/space ratio of 75/25 for a 1 and 25/75 for a 0 or vice versa. And some uses 2 pulse width ie a 10ms high pulse is a 0 and a 20ms pulse as a 1. But unless you need to interface an existng device with that requirment. There are better ways to send serial data as suggested by Bod and Dana.

sky022's picture
6 posts

PWM isn't usually used to transmit serial information, but you can write your own low-level protocol... It would be easier to use, as dana said, standard serial protocols.

Log in to post new comments.