|
|
|
|
Joined May 2013
10 Posts
|
rc swtich 12f675, need help changing program
Hi everyone, my name is John
I'm having difficulties about to change the program for 12f675 I found on the internet project RC switch use 12f675 here: http://myweb.tiscali.co.uk/kendo/rc_...tml/start.html I use TX 9 channel ,In this project 12f675 work only a single channel Now, I want to add a channel signal, I want to RC switch 2 chanel separate Can someone help me change the program ? thank a lot |
|
|
|
|
|
|
||
|
Joined May 2013
10 Posts
|
Quote:
I see 12f675 also some unused pins So I think the program change is better than using two 12f675. (sorry for my greedy) changing program for 12f675 seem complexity ? how to 12f675 can operate each channel separately ? |
|
|
||
|
|
||
|
UK, Cardiff
Joined Dec 2008
2,157 Posts
|
Quote:
Maybe someone does have the time to write the program for you to do what you want, especially if the pay rate is reasonable, but as Bruce suggests the changes do not look straightforward. Use two 12F675s. |
|
|
||
|
|
||
|
Joined May 2013
10 Posts
|
Quote:
![]() seems it is not optimal, but have to accept |
|
|
||
|
|
||
|
|
Quote:
![]() But if you insist on trying to wring the most out of that 8 pin PIC, here's the gist of what you need to change in the program:- 1. Assign an input pin for each servo channel (eg. GP5, GP4, and GP3) and an output pin for each switch (GP0, GP1, GP2). 2. Duplicate the pulse measurement routine for each channel. Store the results in 3 separate variables. 3. Count the number of consecutive on or off pulses for each channel separately, and turn the associated switch on/off as required. When measuring the second and third channels there an added complication - if the pulse is high, do not wait for it to go low first, but start timing immediately. The reason for doing this is that most receivers send out channel pulses consecutively with no gap in between. Depending on which order the channels are received, you may miss every second set of pulses (because the next 'first' channel pulse started while you were processing the switch states). This is not fatal, but it means the switches will take a little longer to react. If this is a problem then just swap the inputs around until the channels are measured in the same order as they are received. Some receivers output multiple channels at the same time. For that case you need to measure the timing of each pulse simultaneously, and the software starts to get complicated! |
|
|
||
|
|
||
|
Joined May 2013
10 Posts
|
Quote:
I'm sad because I could not do what I want , have accepted add 12f675 for each chanel My application only to on / off LED. i think it will be a big size motherboard if using 10 separate channels |
|
|
||
|
|
|
|
|
This is the gist of the problem, you don't understand enough about programming a PIC for someone to be able to help you. The only thing anyone could do it to just write the entire program for you, debug it, and draw you a new schematic for the circuit. That's more than anyone is going to be willing or able to do, and is an unreasonable request.
|
|
|
|
|
||
|
Joined May 2013
10 Posts
|
Quote:
thanks for your answer I found this article in need of help, it is your http://www.rcgroups.com/forums/showt...1824599&page=2 I saw Bruce has helped you write the program, of course you will absorb faster than me because I do not know how to write program C or asm Why did you get the help, now I need help but you said " it is an unreasonable request" ? |
|
|
||
|
|
||
|
Joined May 2013
10 Posts
|
Quote:
thank for answer in addition to this application, I do not add any other project. Having to start the microcontroller program is too difficult for me. because I'm old, I was 68 years old |
|
|
||
|
| Thread Tools | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Question Need Help Programming EZRUN-150-PRO | Chatenever | Electric Power Cars | 6 | May 19, 2013 11:31 PM |
| Discussion help write programs for 12f675 control signal Esc sensored | Jame David | DIY Electronics | 5 | Apr 13, 2013 07:52 AM |
| Discussion Need help finding an RC switch for RC signal. | milo12 | Radios | 3 | Apr 11, 2013 03:45 PM |
| Discussion Need help programming throttle on switch. Futaba 10C | TheTick | Electric Sailplanes | 1 | Apr 04, 2013 03:57 PM |
| Discussion Need help programming Hacker X-7 ESC | Cougar347 | Power Systems | 3 | Jan 08, 2013 08:19 PM |