|Sep 28, 2006, 08:14 PM|
12f683 5 Channel Encoder.....
Here is a 5 channel Encoder.....using a 12F683
channels 0,1,2,3 are analog...
channel 4 is switch controlled 1ms or 2 ms
Here are the Project files for use with MIKROBASIC [demo]
maybe someone can enhance by using 16f88 or other and add
mixing, crystal stability , whatever......
use 5k ohm pots for analog channels...
|Sep 29, 2006, 03:20 AM|
Nice basis to realise accessoiries like liner pushers ( for a 4m twin jetcat 120 Airbus A320 model ...) or other ground vehicles.
Besides that ... may I get you advice about the MikroBasic compiler ??? as an info ... the dSpic Basic compiler is released ... and a demo version available !!!
|Sep 29, 2006, 03:51 AM|
The basic compiler is ok, I had some issues with the ver 4+ compiler
ie you had to be carefull with the math[I believe ther were some issues there]
and debugger issues.....
, I don't know about ver 5 yet....
The debugger sucks....it can't handle interrupts.......so if you use interrupts
get that code working first....
I cannot justify getting a high priced [by my standards] license for a procuct
that I will use about 4 to 5 times a year.....when MPASM is free and has
a very good debugger.macros are easy to make. Once I get started I can use it eaiser than basic, mainly because it's easier to debug....
another note.. I was going to try PicBasic but decided it was to archaic...
|Sep 29, 2006, 10:27 AM|
I assume the pots are 5K with 5 Volts Vcc on one end and GND at the other?
Also - the analog is switched between 5v and GND?
yes thre pots are connected +5 and gnd,,,,for mechanical trim I will try
to use a 500 ohm in series with each control pot,,this hasn't been tested
and I see no reason why it won't work.....
The switch is connected to +5 and ground ....with a 3.9k resistor going to the pin.....
note. currently channel 4 see's 2 states...however the code can
be changed to detect 3 states.....0, +5, and open....
which would allow 1ms, 1.5ms and 2ms setting
|Sep 29, 2006, 05:49 PM|
Forget abut the 3 state.......I forgot that GPIO.3 is input only
The 300US setting may be on the low side....I just had 1 chip programmed
with 300 and osctune = 0 and I did not check for 300 with scope
The osc was too fast
It would not work until I set OSCTUNE = 0x1D
Also you may want to use a larger sync time....
the present frame is about 2*5+2.8 = approx 13 ms.....
I just realize that abbot decoder is skipping a frame while outputting
Just change sync from 3000 to 10000 and now abbot isn't skipping
I guess ver 2 needs to add all desiredtimes and subtract from frame time
to get the sync time ,,,,,but that will be later......
|Sep 29, 2006, 08:12 PM|
Added Fixed Frame Approx 20 Ms AND change 1 value for +/- pulse out
|Dec 19, 2007, 04:01 AM|
There should be a resistor ( 1k) between pic pin 4 and switch to
keep from possibly blowing pin 4 on pic...
This is the 3-state input and is set hi and low to determine state...
this doesn apply to 12f683!
|Jan 10, 2010, 12:30 PM|
the pots are just voltage divider,,, code mods would probably not be needed
unless chip impedance affects the pot resistance too much, but doubt it,,,note though higher resistance are mor sensitive to electrical noise...
|Jan 13, 2010, 05:53 AM|
Joined Oct 2007
|Jan 19, 2010, 04:51 AM|
Joined Jan 2007
Unless you modify the joystick controller you will not be able to use it with this chip.
the reason is that as someone has pointed out in this design the pots are just voltage dividers. But the resistance at the centre of the stick travel has to be in the centre (to get 2.5V at centre)
Joystick controllers only use 2 wires (you would have to add the third), but more importantly the joystick controllers do not have the pot at centre when the stick is at centre.
So you would have to do some mechanics to centre the pots.
|Category||Thread||Thread Starter||Forum||Replies||Last Post|
|Help!||need help 5-channel decoder 12f683||xtal||DIY Electronics||7||Oct 15, 2006 06:10 AM|
|Small, light 5 channel sport plane - Switchback Sport RG||BEC||Sport Planes||13||Mar 13, 2002 01:59 PM|
|WTB 5+Channel Transmitter Hitec||Randy G||Aircraft - Electric - Airplanes (FS/W)||0||Dec 14, 2001 02:20 PM|
|5 channel Tx and 4 channel Receiver||Skysaurus||Beginner Training Area (Aircraft-Electric)||5||Nov 29, 2001 09:08 AM|
|Best 4 - 5 channel transmitter?||dbhenry1234||Electric Plane Talk||24||May 13, 2001 03:55 PM|