Espritmodel.com Telemetry Radio
Reply
Thread Tools
Old Sep 28, 2006, 08:14 PM
Registered User
xtal's Avatar
McDonough, Georgia USA
Joined Feb 2005
300 Posts
Mini-HowTo
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...
xtal is offline Find More Posts by xtal
Reply With Quote
Sign up now
to remove ads between posts
Old Sep 29, 2006, 03:20 AM
"MAYONNAISE"
Acetronics's Avatar
Le Treport, France
Joined Jun 2004
1,397 Posts
Hi, Xtal

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 !!!

Alain
Acetronics is offline Find More Posts by Acetronics
Reply With Quote
Old Sep 29, 2006, 03:51 AM
Registered User
xtal's Avatar
McDonough, Georgia USA
Joined Feb 2005
300 Posts
Hi Ace

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...
xtal is offline Find More Posts by xtal
Reply With Quote
Old Sep 29, 2006, 10:06 AM
Registered User
Joined May 2006
22 Posts
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?


Thanks,

Pat Bunn
pbunnstf is offline Find More Posts by pbunnstf
Reply With Quote
Old Sep 29, 2006, 10:27 AM
Registered User
xtal's Avatar
McDonough, Georgia USA
Joined Feb 2005
300 Posts
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
xtal is offline Find More Posts by xtal
Reply With Quote
Old Sep 29, 2006, 01:46 PM
Registered User
Joined May 2006
22 Posts
Thanks,


I will try it. I am looking for something simple to put into some old vintage transmitters. I use the Futaba 50 Mhz module for RF.


Pat Bunn
pbunnstf is offline Find More Posts by pbunnstf
Reply With Quote
Old Sep 29, 2006, 05:49 PM
Registered User
xtal's Avatar
McDonough, Georgia USA
Joined Feb 2005
300 Posts
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
channel's .....

Just change sync from 3000 to 10000 and now abbot isn't skipping
any frames.....

I guess ver 2 needs to add all desiredtimes and subtract from frame time
to get the sync time ,,,,,but that will be later......
xtal is offline Find More Posts by xtal
Last edited by xtal; Sep 29, 2006 at 06:29 PM.
Reply With Quote
Old Sep 29, 2006, 08:12 PM
Registered User
xtal's Avatar
McDonough, Georgia USA
Joined Feb 2005
300 Posts
5-chanel Encoder

Added Fixed Frame Approx 20 Ms AND change 1 value for +/- pulse out
xtal is offline Find More Posts by xtal
Reply With Quote
Old Dec 10, 2007, 11:44 AM
Registered User
xtal's Avatar
McDonough, Georgia USA
Joined Feb 2005
300 Posts
Heres a quick schematic,,,, note use a 12f683
pots a 5k ohm ....
xtal is offline Find More Posts by xtal
Reply With Quote
Old Dec 19, 2007, 04:01 AM
Registered User
xtal's Avatar
McDonough, Georgia USA
Joined Feb 2005
300 Posts
ALERT! ALERT!

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!
xtal is offline Find More Posts by xtal
Last edited by xtal; Jan 06, 2008 at 06:41 PM.
Reply With Quote
Old Jan 08, 2008, 04:18 AM
Registered User
xtal's Avatar
McDonough, Georgia USA
Joined Feb 2005
300 Posts
Here's simple schematic
xtal is offline Find More Posts by xtal
Reply With Quote
Old Jan 02, 2010, 03:35 AM
Registered User
Northwest Arkansas
Joined Sep 2008
617 Posts
Is it possible to modify this code for use with 100k pots? I'm wanting to use a pc joystick with a gameport connector.

http://en.wikipedia.org/wiki/Game_port

Thanks
arkcom is offline Find More Posts by arkcom
Reply With Quote
Old Jan 10, 2010, 12:30 PM
Registered User
xtal's Avatar
McDonough, Georgia USA
Joined Feb 2005
300 Posts
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...
xtal is offline Find More Posts by xtal
Reply With Quote
Old Jan 13, 2010, 05:53 AM
Registered User
Joined Oct 2007
116 Posts
Quote:
Originally Posted by xtal View Post
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...
Does that mean the 5K pots can be replaced with 10K pots, without any code mods ??
fm_head is online now Find More Posts by fm_head
Reply With Quote
Old Jan 19, 2010, 04:51 AM
Registered User
Joined Jan 2007
43 Posts
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.
kaindub is offline Find More Posts by kaindub
Reply With Quote
Reply


Thread Tools

Similar Threads
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