HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Jul 11, 2009, 11:50 AM
Registered User
Joined Feb 2009
166 Posts
Does this code work with mega 8

Quote:
Originally Posted by rich smith
Luckily the chips were unlocked so here's code. Should work unmodified on a Tiny26 too or any old AVR with a port B. Pinout should be same as the Tiny13 one with extra channels added on after 4. Just from memory, it's been a few years.

No chance to test it myself because my Futabas batt is dead and also I don't have a Mega8 socket wired up. Please post result so we'll know. Photo would be nice too so others can benefit.

SRVPPM83.HEX:

:020000020000FC
:100000007FE97DBFBC9A61E010D062E00ED064E071
:100010000CD068E00AD060E208D060E406D060E866
:1000200004D0C49A0CD0C498EECF76B37623E9F30B
:10003000C49A05D0C49876B37623E9F7089593E07F
:100040000197F1F708952863292032303036205285
:060050002E536D69746877
:00000001FF


Does this cod work for mega 8 or any other code for mega 8
kanchana is offline Find More Posts by kanchana
Reply With Quote
Sign up now
to remove ads between posts
Old Jul 13, 2009, 04:19 AM
7000mw of raw power!
rich smith's Avatar
New Hampshire (not the old one)
Joined Dec 2006
5,987 Posts
Quote:
Originally Posted by kanchana
Does this cod work for mega 8 or any other code for mega 8
Yes. Any AVR that has "original" address for Port B like Mega8, Mega8515, and all of the Tiny family.
rich smith is offline Find More Posts by rich smith
Reply With Quote
Old Jul 16, 2009, 10:50 AM
Registered User
Joined Jul 2009
2 Posts
I have ATtiny12l , which is max 4mhz, can i use unmodified original code for this converter, or it needs to be changed, or unluckily i can not use that at all ?
DanNsk is offline Find More Posts by DanNsk
Reply With Quote
Old Jul 17, 2009, 06:44 AM
7000mw of raw power!
rich smith's Avatar
New Hampshire (not the old one)
Joined Dec 2006
5,987 Posts
Quote:
Originally Posted by DanNsk
I have ATtiny12l , which is max 4mhz, can i use unmodified original code for this converter, or it needs to be changed, or unluckily i can not use that at all ?
The 4mhz spec is for use with very low voltage (1.8v). At 5v the chip runs at 8mhz and higher so there is no problem. In fact I've run them at 20mhz with xtl.

Also note this program is pretty much frequency indpendent. 8mhz will give about 300us gap which is close to real PPM.
rich smith is offline Find More Posts by rich smith
Reply With Quote
Old Jul 17, 2009, 08:13 AM
Registered User
Joined Jul 2009
2 Posts
Quote:
Originally Posted by rich smith
The 4mhz spec is for use with very low voltage (1.8v). At 5v the chip runs at 8mhz and higher so there is no problem. In fact I've run them at 20mhz with xtl.
ATtiny12L datasheet says 2.7 - 5.5V , 0-4 MHz, but ok thanks , i'll try.
DanNsk is offline Find More Posts by DanNsk
Reply With Quote
Old Jul 17, 2009, 08:39 AM
7000mw of raw power!
rich smith's Avatar
New Hampshire (not the old one)
Joined Dec 2006
5,987 Posts
Quote:
Originally Posted by DanNsk
ATtiny12L datasheet says 2.7 - 5.5V , 0-4 MHz, but ok thanks , i'll try.
IIRC there are charts at the end of the spec that show more details. But you get the idea.
rich smith is offline Find More Posts by rich smith
Reply With Quote
Old Aug 10, 2009, 09:26 AM
Registered User
United Kingdom, Bristol
Joined Aug 2008
1,774 Posts
Well this looks great. Few Q:
Try for hour or so and don't appear to work with my futaba 2.4 but could be fuse's set wrong.

1: Will it work with Futaba 2.4 and/or Spektrum RX ?
2: fuse? what should it be for attiny 45
3: See other code for 4 or more channels. But only have attiny 13/45/85. Could i use a pair of attinys ?? to give me 6/8 channels ?

Hoping i can go wireless on Phoenix Sim
SadSack is offline Find More Posts by SadSack
Reply With Quote
Old Aug 11, 2009, 07:00 AM
7000mw of raw power!
rich smith's Avatar
New Hampshire (not the old one)
Joined Dec 2006
5,987 Posts
Quote:
Originally Posted by SadSack
1: Will it work with Futaba 2.4 and/or Spektrum RX ?
2: fuse? what should it be for attiny 45
3: See other code for 4 or more channels. But only have attiny 13/45/85. Could i use a pair of attinys ?? to give me 6/8 channels ?
1. As long as servo pulses do not all start at the same time it should work.

2. Any setting for 8mhz no WDT. I use fuseh=d7 fusel=e2 for my Tiny45. Actually almost any clock will work, even the stock 1mhz setting, but faster gives more accurate PPM train.

3. Using a pair will result in two separate PPM signals so not sure if this is useful.
rich smith is offline Find More Posts by rich smith
Reply With Quote
Old Sep 21, 2009, 12:19 PM
Registered User
Joined Feb 2009
166 Posts
I have 8 channel version

I ave 8 channel version programmed in a atmega8 chips whic i can ship if interested
kanchana is offline Find More Posts by kanchana
Reply With Quote
Old Sep 21, 2009, 01:18 PM
7000mw of raw power!
rich smith's Avatar
New Hampshire (not the old one)
Joined Dec 2006
5,987 Posts
Quote:
Originally Posted by kanchana
I ave 8 channel version programmed in a atmega8 chips whic i can ship if interested
If you're willing to do it on a non-profit basis that sounds fine. I released my code as a contribution to RCG hobbyists and would have no problem if others passed on the favor.
rich smith is offline Find More Posts by rich smith
Reply With Quote
Old Sep 23, 2009, 08:09 AM
Registered User
Toronto Canada
Joined Feb 2008
25 Posts
Quote:
Originally Posted by rich smith
Luckily the chips were unlocked so here's code. Should work unmodified on a Tiny26 too or any old AVR with a port B. Pinout should be same as the Tiny13 one with extra channels added on after 4. Just from memory, it's been a few years.

No chance to test it myself because my Futabas batt is dead and also I don't have a Mega8 socket wired up. Please post result so we'll know. Photo would be nice too so others can benefit.

SRVPPM83.HEX:

:020000020000FC
:100000007FE97DBFBC9A61E010D062E00ED064E071
:100010000CD068E00AD060E208D060E406D060E866
:1000200004D0C49A0CD0C498EECF76B37623E9F30B
:10003000C49A05D0C49876B37623E9F7089593E07F
:100040000197F1F708952863292032303036205285
:060050002E536D69746877
:00000001FF
Thanks rich! 7 channel hex image does work Verified even on an obsolete 8MHz 2313 that I had otherwise no use for these days :P

Just a couple of observations that I have noticed that others may find useful:

1.You must supply pulses to all 7 inputs PB0-PB3, PB5-PB7 as there are some blocking codes that will hang if any channel(s) are missing. Which led me to modify the code slightly for a 6 channel Spektrum 6100 reciever.

2.Your receiver must output pulse sequence in order from PB0 to PB7, otherwise, the generated PPM will be all messed up. I found out the hard way by wiring up a Spektrum 6100 receiver with a DX7. It turns out the channels are sequenced in the following order:
1 Aileron
2 Aux
3 Elevator
4 Rudder
5 Throttle
6 Gear
This sequence appears to be dependent on the transmitter, using an Eflite LP5DSM, the pulse sequence is in order of the receiver header pins.
1 Throttle
2 Aileron
3 Elevator
4 Rudder
5 Gear
6 Aux
druzara is offline Find More Posts by druzara
Reply With Quote
Old Sep 23, 2009, 08:59 AM
7000mw of raw power!
rich smith's Avatar
New Hampshire (not the old one)
Joined Dec 2006
5,987 Posts
Thanks for verifying! It would be wonderful if you and Kanchana posted your code so others could take advantage. A local fellow has modified for 5 channel and I'm trying to get a copy to post. I would personally find your 6ch more useful than any of the other versions.

Maybe some day I'll get a chance to upgrade to a version that does not require fixed number of channels. Probably would be more than couple dozen instructions though.

Thanks for clearing up the pinout issue too. Makes it easier for those who don't have a scope.
rich smith is offline Find More Posts by rich smith
Reply With Quote
Old Sep 23, 2009, 09:00 AM
Registered User
United Kingdom, Bristol
Joined Aug 2008
1,774 Posts
Quote:
Originally Posted by druzara
Thanks rich! 7 channel hex image does work Verified even on an obsolete 8MHz 2313 that I had otherwise no use for these days :P

Just a couple of observations that I have noticed that others may find useful:

1.You must supply pulses to all 7 inputs PB0-PB3, PB5-PB7 as there are some blocking codes that will hang if any channel(s) are missing. Which led me to modify the code slightly for a 6 channel Spektrum 6100 reciever.

2.Your receiver must output pulse sequence in order from PB0 to PB7, otherwise, the generated PPM will be all messed up. I found out the hard way by wiring up a Spektrum 6100 receiver with a DX7. It turns out the channels are sequenced in the following order:
1 Aileron
2 Aux
3 Elevator
4 Rudder
5 Throttle
6 Gear
This sequence appears to be dependent on the transmitter, using an Eflite LP5DSM, the pulse sequence is in order of the receiver header pins.
1 Throttle
2 Aileron
3 Elevator
4 Rudder
5 Gear
6 Aux

Any chance of sharing code ?
And how did you work out correct conections ? I'm hopeing to use futaba 2.4 and i don't have a scope
SadSack is offline Find More Posts by SadSack
Reply With Quote
Old Sep 23, 2009, 09:02 AM
7000mw of raw power!
rich smith's Avatar
New Hampshire (not the old one)
Joined Dec 2006
5,987 Posts
One minute later!!!
rich smith is offline Find More Posts by rich smith
Reply With Quote
Old Sep 23, 2009, 09:04 AM
Registered User
United Kingdom, Bristol
Joined Aug 2008
1,774 Posts
or maybe i can do a best guess from this http://jreise.de/PPM/R617FS.html
SadSack is offline Find More Posts by SadSack
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion how to convert PWM servo signal to DC voltage sahilkit DIY Electronics 15 Oct 05, 2008 09:23 PM
Mini-HowTo Motor PWM to PPM impulse converter quax DIY Electronics 27 Jun 16, 2008 11:38 PM
PWM to servo signal conversion? mcross DIY Electronics 13 Jul 05, 2005 08:48 PM
Futaba PCM receiver servo pulse other than PPM? risto Power Systems 14 Feb 14, 2002 12:18 PM