SMALL - espritmodel.com SMALL - Telemetry SMALL - Radio
Reply
Thread Tools
Old Mar 06, 2013, 12:41 PM
RC beginner
New York
Joined Oct 2008
6,054 Posts
Quote:
Originally Posted by midelic View Post
Edit.again.....Oookkkk.....uffff,...
ahaa! gobbledygook!

you can actually use the same timer to generate 2 pwm and measure input pulse simultaneously. and no interrupts either. also the other timer is free to do 2 more for a total of 4 pwm. a little more complicated but as my old buddy fishycomics (god bless his soul) says "its do-a-ble".
dave1993 is offline Find More Posts by dave1993
Reply With Quote
Sign up now
to remove ads between posts
Old Mar 06, 2013, 12:43 PM
Registered User
midelic's Avatar
Joined Apr 2012
3,731 Posts
Dave,
Good news.
Touch down...... to use american football lingo.......It's working.....I had before a normal delay code for 1460us tx packet ,and I changed for a hardware timer ,timer 0,....test again now is working all channels.It appear this timing is critical for sending packets.However it needs trimming again....with this module.

For use other timer i need 16bits timer so...... there is no other timer....anyway it was pointless as I said before ,,,i can see servo timing on each channel so I was loosing time for changing the code .I know as an exercise is ok....but for my code was pointless.
How is it possible to use the same timer 16 bits?
Fast PWM mode?My timer is in normal mode.I think for using the same timer I need to stop the timer after each input capture.Atm in my code I didn't stop the timer...like thierry did after each capture.My PPM code it is not copied from thierry's.
midelic is online now Find More Posts by midelic
RCG Plus Member
Last edited by midelic; Mar 06, 2013 at 01:10 PM.
Reply With Quote
Old Mar 06, 2013, 01:08 PM
RC beginner
New York
Joined Oct 2008
6,054 Posts
the almighty Ed-i-tor... strikes again!

16bit timer has 8 bit mode so can be used just like the other one. but yes, you dont need servo pwm so no point in going to all that trouble.
dave1993 is offline Find More Posts by dave1993
Reply With Quote
Old Mar 06, 2013, 01:16 PM
Registered User
midelic's Avatar
Joined Apr 2012
3,731 Posts
I don't need 8 bits ,but 16 bits timer.Because my data was in range of 500-2500us.The timer resolution is 1us.I edit a lot because english is not my native language....but I'll try not to change significantly the post.
midelic is online now Find More Posts by midelic
RCG Plus Member
Latest blog entry: DIY Multiprotocol TX Module
Reply With Quote
Old Mar 06, 2013, 01:32 PM
RC beginner
New York
Joined Oct 2008
6,054 Posts
excuses excuses. you speak english better than 90% of the people in my country. and 5 minutes to avoid the dreaded "edit" message should be enough for even google translate.

personally i find 8 bits more than adequate for rc applications. makes coding a lot easier too. 1/2 or even 1/4 that resolution does the job in most cases. lots of guys insist they need 1024 steps but i dont buy it.
dave1993 is offline Find More Posts by dave1993
Reply With Quote
Old Mar 06, 2013, 01:39 PM
Registered User
midelic's Avatar
Joined Apr 2012
3,731 Posts
I agree but I was '"stuck",with 1us resolution.I'll try to change the PPM code for stopping the timer each capture...in order to work easier with ICRH and ICRL......,Which mode to use for generate servo PWM .....?
midelic is online now Find More Posts by midelic
RCG Plus Member
Latest blog entry: DIY Multiprotocol TX Module
Reply With Quote
Old Mar 06, 2013, 01:58 PM
RC beginner
New York
Joined Oct 2008
6,054 Posts
i always use 8 bit mode for servo even with 16 bit timer. timer descriptions in the manual hurt my head so i just try loading wgm up with consecutive numbers til the oc output does something close to what i want.

for ppm and both types of pwm measuring i fall back on bit polling instead of icp, again in the interest of portability. if the program is not too busy and can afford it that is.
dave1993 is offline Find More Posts by dave1993
Reply With Quote
Old Mar 06, 2013, 02:10 PM
Registered User
midelic's Avatar
Joined Apr 2012
3,731 Posts
8 bits timer is much much simpler.I chose prescaller 8 for 1us resolution because it seems easier for me to understand....counting 500-2500 us range.As long as the performance is not affected(because of higher resolution) working with a 8 bits timer ,will be easier.
midelic is online now Find More Posts by midelic
RCG Plus Member
Latest blog entry: DIY Multiprotocol TX Module
Reply With Quote
Old Mar 06, 2013, 02:17 PM
RC beginner
New York
Joined Oct 2008
6,054 Posts
the 8 bit is not only much simpler than the 16 bit but unlike the 16 bit, varies little from avr to avr. no matter what 1us is excellent if you can manage that.
dave1993 is offline Find More Posts by dave1993
Reply With Quote
Old Mar 06, 2013, 07:01 PM
Micro Crazy Man
epicdoom's Avatar
Baltimore, Md.
Joined May 2004
1,531 Posts
Dave sent you a PM
epicdoom is offline Find More Posts by epicdoom
Reply With Quote
Old Mar 07, 2013, 09:03 AM
Registered User
midelic's Avatar
Joined Apr 2012
3,731 Posts
Dave,
Daryoon is asking you about the lights on V939.I'm also interested.
http://www.rcgroups.com/forums/showp...postcount=3241
midelic is online now Find More Posts by midelic
RCG Plus Member
Latest blog entry: DIY Multiprotocol TX Module
Reply With Quote
Old Mar 07, 2013, 10:04 AM
RC beginner
New York
Joined Oct 2008
6,054 Posts
sorry for the delay and i hope you dont mind replying in the thread. i dont check pm unless somebody tells me and there is overflow problem. and several asked the same question so better to reply here anyway.

Quote:
Originally Posted by epicdoom
tiny deadbug RX

Dave are you selling these I'm building a tiny plane and dont want to use IR gear on it my flight is outdoors only I have a wind screaned area I test fly in I build 1/72 scale planes and need tiny RX's all the time for them the plane I an building will be 2 ch but I will attempt a 3 ch after this one is flying at some point a 4ch 4" WS plane will be my Goal. I dont have programer skills or the equipment to do it. I do however have good soldering skills working with a good bit of SMD components.
i only made 3 of the deadbug units. one was dismantled, one for a friend, and one for myself. unlike the half gram pcb version they take hours to build so if i sold these the cost would probably be simiar to what theunissin charges for deltang units. i suppose i could do more if somebody was really interested but mostly what i have now are the half gram ones. i produced 30. 20 some went to friends and relatives at cost which was about $18. most of that went to my assembly lady for labor. i kept a few to myself so if you or anybody is interested pm address and ill respond with pp info. i can probably spare a half dozen or so.

if theres significant interest after that i can probably turn out another lot. considering the local response from just word of mouth these look like a popular item and i may even try signing up to sell on ebay. let me know.
dave1993 is offline Find More Posts by dave1993
Reply With Quote
Old Mar 07, 2013, 10:16 AM
Registered User
midelic's Avatar
Joined Apr 2012
3,731 Posts
Dave,
How do you program these tiny atmel mcu?
midelic is online now Find More Posts by midelic
RCG Plus Member
Latest blog entry: DIY Multiprotocol TX Module
Reply With Quote
Old Mar 07, 2013, 10:32 AM
RC beginner
New York
Joined Oct 2008
6,054 Posts
Quote:
Originally Posted by midelic View Post
Dave,
Daryoon is asking you about the lights on V939.I'm also interested.
http://www.rcgroups.com/forums/showp...postcount=3241
im going to double post here on the off chance somebody remembers that fellows comments:

Quote:
Originally Posted by bulesz View Post
Many of us have 9X radio and no success at all...that would be great if could switch on/off the LEDs form the 9X...
Quote:
Originally Posted by Daryoon View Post
Thanks for the heads up. I thought I was keeping up with the findings. Must have missed that. Any pointers to threads with more info will be much appreciated.
sorry for missing those posts last week. i dont have rcg access on weekends and dont always catch up with them all.

yes, it came out of the blue and iirc was in a thread not directly related to the v939 about a month ago. as an incidental experiment i set pulse width to 600ms while working on my 9x "no mods" project and sure enough the led signal toggled. this is not something that a normal radio, even 9x, can do but would be no sweat for anybody set up for tinkering with er9x code. i wish i had taken more notes and now feel like that fellow some time ago back who said he did it with the wlt remote. i took that with a grain of salt and still dont think its likely, not with that radio, but now its my turn. lol!

there were several members of the "regular gang" in that thread and im surprised nobody else is piping up. the fellow who did it was pretty smart but not an extremely active poster. im not having any luck searching 600ms or milliseconds. anybody who can do the super long pulse will be able to reproduce. i will give it another try paying more attention when i get a chance.

meanwhile if anybody else remembers that post please speak up.
dave1993 is offline Find More Posts by dave1993
Reply With Quote
Old Mar 07, 2013, 10:38 PM
Registered User
Beijing Capital, China
Joined Mar 2004
62 Posts
Dave,
Why do you open source of youres? Let us to learn and modify.
jpshu is offline Find More Posts by jpshu
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Mini-HowTo TH9X Turnigy FlySky IMax modify module to SMA and 1W booster DIY FPV rotaryboots Radios 3 Jun 08, 2013 02:32 PM
Sold iMAX/Turnigy/FlySky TX module & RX John Kim Aircraft - General - Radio Equipment (FS/W) 0 Jan 12, 2011 12:33 PM
For Sale iMAX/Turnigy/FlySky TX module & RX John Kim Aircraft - General - Radio Equipment (FS/W) 2 Dec 09, 2010 11:15 AM
For Sale Turnigy/iMAX/FlySky TX module & RX John Kim Aircraft - General - Radio Equipment (FS/W) 0 Oct 27, 2010 11:03 AM