NickMu
- 1st November 2012, 23:17
I have an application similar this (http://www.picbasic.co.uk/forum/content.php?r=203-PWM-Servo-PWM-encode-decode). Based on the readings from 3 channels (1, 3 and 5) of a FutabaR617FS receiver I need to decide if I should output one receiver channel (3) or an artificially generated servo output or a mix of the two.
It seems to me that most of the work was magnificently done by Walter in his “Servo PWM encode / decode) project published in the Wiki section(Thank you Walter for sharing) so I’m studying his code to see how much I can use for my project.
My tools are PBP 2.47 and MCS 2.3.0, target PIC is PIC16F819(I’m familiar with it, I have a bunch of them left from other projects and I need more I/Os). I’m using U2 USB programmer. I will start using the same chip Walter used (PIC12F683) just to get things started and understand his approach.
I’m sure I can handle the PBP part but assembly is a bit too much for my aging gray cells not to mention that there is not too much left when it comes to pulling hair.http://www.picbasic.co.uk/forum/images/icons/icon7.png
It will be a great help if somebody could answer few questions for me:
· If I use the code as it is published will I have access to the channels 1 – 4 pulse width values?
· Is the system automatically outputting in the background the mirror signals of channels 1 – 4?
· What will be the real reading value (number) for one channel that has a 1.5 ms pulse width?
· If I do not need to deal with reverse or centering of the channels can I just use something like: Channel_x_pulse_width = Last_falling_edge – Last_rising_edge to get a number between 1 and 2 ms? (I’m having hard time understanding the tempword /adj approach).
I’m planning on building the prototype board so any input that stops me from wasting resources will be appreciated.
Regards,
Nick
It seems to me that most of the work was magnificently done by Walter in his “Servo PWM encode / decode) project published in the Wiki section(Thank you Walter for sharing) so I’m studying his code to see how much I can use for my project.
My tools are PBP 2.47 and MCS 2.3.0, target PIC is PIC16F819(I’m familiar with it, I have a bunch of them left from other projects and I need more I/Os). I’m using U2 USB programmer. I will start using the same chip Walter used (PIC12F683) just to get things started and understand his approach.
I’m sure I can handle the PBP part but assembly is a bit too much for my aging gray cells not to mention that there is not too much left when it comes to pulling hair.http://www.picbasic.co.uk/forum/images/icons/icon7.png
It will be a great help if somebody could answer few questions for me:
· If I use the code as it is published will I have access to the channels 1 – 4 pulse width values?
· Is the system automatically outputting in the background the mirror signals of channels 1 – 4?
· What will be the real reading value (number) for one channel that has a 1.5 ms pulse width?
· If I do not need to deal with reverse or centering of the channels can I just use something like: Channel_x_pulse_width = Last_falling_edge – Last_rising_edge to get a number between 1 and 2 ms? (I’m having hard time understanding the tempword /adj approach).
I’m planning on building the prototype board so any input that stops me from wasting resources will be appreciated.
Regards,
Nick