I love using GCB and have been using GCB for a few months now with PIC's - You guys do a great job! I have decided to jump into the world of PWM, which I have very little knowledge of other than a basic understanding of what it is and the basics of how it works.
I am working on a small (and probably simple) little project where I want to read two LED PWM inputs through a single pin and separate them to two separate LED output pins. The problem is I don't know which GCB command syntax to use to read the PWM input or the best way to separate the inputs. I am using a PIC16F1823.
Any guideance would be very much appreciated!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
a pwm signal is just a pin going on then off at a given frequency and you can set the on time and so the off time from 1% to 99%.
you can "read" the pwm by using the values you have given it.
there is no read pwm command
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As Anobium says. If you have set up pins for pwm output then you have set the frequency and the % ie mark space ratio of % on and these can be absolute values ie a number or the frequency and % could be variables. You know what the pwm values are because you configured them so no need to "read" them.
as Anobium mentioned what am I missing?
Last edit: stan cartwright 2020-09-05
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi guys,
I love using GCB and have been using GCB for a few months now with PIC's - You guys do a great job! I have decided to jump into the world of PWM, which I have very little knowledge of other than a basic understanding of what it is and the basics of how it works.
I am working on a small (and probably simple) little project where I want to read two LED PWM inputs through a single pin and separate them to two separate LED output pins. The problem is I don't know which GCB command syntax to use to read the PWM input or the best way to separate the inputs. I am using a PIC16F1823.
Any guideance would be very much appreciated!
a pwm signal is just a pin going on then off at a given frequency and you can set the on time and so the off time from 1% to 99%.
you can "read" the pwm by using the values you have given it.
there is no read pwm command
Agree with Stan there is no formal readpwm.
So, let me assume you have two square waves arriving at the same input pin.... how would you determine which signal is which signal?
|¨¨||¨¨||¨¨||¨¨|__|¨¨| = signal one
|¨¨¨¨||¨¨¨¨||¨¨¨¨||¨¨¨¨|_ = signal two .. a different freqency?
The two signals combined would look like ____|¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨|_
So, what am I missing? :-)
Last edit: Anobium 2020-09-06
As Anobium says. If you have set up pins for pwm output then you have set the frequency and the % ie mark space ratio of % on and these can be absolute values ie a number or the frequency and % could be variables. You know what the pwm values are because you configured them so no need to "read" them.
as Anobium mentioned what am I missing?
Last edit: stan cartwright 2020-09-05