HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Sep 23, 2009, 09:05 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

Hoping i can use this with Phoenix sim lead
SadSack is offline Find More Posts by SadSack
Reply With Quote
Sign up now
to remove ads between posts
Old Sep 23, 2009, 09:25 AM
7000mw of raw power!
rich smith's Avatar
New Hampshire (not the old one)
Joined Dec 2006
5,987 Posts
Das schaltplan ist einfach!
rich smith is offline Find More Posts by rich smith
Reply With Quote
Old Sep 23, 2009, 09:40 AM
Registered User
United Kingdom, Bristol
Joined Aug 2008
1,774 Posts
even with babelfish all greek to me
SadSack is offline Find More Posts by SadSack
Reply With Quote
Old Sep 23, 2009, 10:29 AM
Aircraft re-kitter
ergocentric's Avatar
15NM from CYYZ on 06L
Joined Feb 2007
632 Posts
Quote:
Originally Posted by Tomapowa
This might even be a simpler non-PIC/AVR solution for converting multiple PWM signals into a single PPM signal.. simply add more diodes for more channels/inputs:

http://www.rcgroups.com/forums/showp...6&postcount=35

Something like a eight input nor/or gate?



Edit: Good for most older receivers that don't sync servo movement
ergocentric is offline Find More Posts by ergocentric
Last edited by ergocentric; Sep 23, 2009 at 07:13 PM.
Reply With Quote
Old Sep 23, 2009, 03:16 PM
Registered User
Toronto Canada
Joined Feb 2008
25 Posts
Quote:
Originally Posted by rich smith
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.
sure thing! will post asm and hex files when i get home this evening, wanted your permissions first since it was "reverse engineered" from your hex
druzara is offline Find More Posts by druzara
Reply With Quote
Old Sep 23, 2009, 10:30 PM
Registered User
Toronto Canada
Joined Feb 2008
25 Posts
Here they are, enjoy!

Atmel ASM file:
Code:
          ; Atmel Win32 AVR Disassembler V1.01 by SXPILOT450
          ; Byte Address & ASCII Column by WagnerLip - 2009
          ;
          ; Instruction         ADDR HEXA OPERANDS     BYTE#  ASCII NEXT 8 
          ; ------------------  ---- ---- --------     ----  ----------------
          ;

	  ; Modified by Druzara/Rex 09/22/2009
	  ; http://acholic.turningaway.net
          ;
	  ; 6 Channel operation for Spektrum 6xxx receivers
	  ; PPM output on PB7, inputs on PB0-PB5
          ; AT90S2313 8MHz
          ; changes to original code are commented out but left in source


         .DEVICE AT90S2313
         .INCLUDE "2313def.inc"
         .cseg
         .org	0



          ldi    r23, 0x9F    ; 0000 E97F              0000   Setup stack pointer
          out    SPL, r23     ; 0001 BF7D              0002   
;         sbi    DDRB, 4      ; 0002 9ABC              0004   PB4 as ppm output
          sbi    DDRB, 7      ;                        0004   PB7 as ppm output

avr0003:  ldi    r22, 0x01    ; 0003 E061              0006   load r22 with bit to test
          rcall  avr0015      ; 0004 D010              0008   call avr0015 to set output
          ldi    r22, 0x02    ; 0005 E062              000A   repeat for all bits
          rcall  avr0015      ; 0006 D00E              000C   
          ldi    r22, 0x04    ; 0007 E064              000E   
          rcall  avr0015      ; 0008 D00C              0010   
          ldi    r22, 0x08    ; 0009 E068              0012  
          rcall  avr0015      ; 000A D00A              0014   
;         ldi    r22, 0x20    ; 000B E260              0016   
          ldi    r22, 0x10    ; 000B E260              0016   
          rcall  avr0015      ; 000C D008              0018   
;         ldi    r22, 0x40    ; 000D E460              001A   
          ldi    r22, 0x20    ; 000B E260              0016   
          rcall  avr0015      ; 000E D006              001C   
;         ldi    r22, 0x80    ; 000F E860              001E   
;         rcall  avr0015      ; 0010 D004              0020   
;         sbi    PORTB, 4     ; 0011 9AC4              0022
          sbi    PORTB, 7     ; 0011 9AC4              0022   ppm out high
          rcall  avr001F      ; 0012 D00C              0024   short delay
;         cbi    PORTB, 4     ; 0013 98C4              0026
          cbi    PORTB, 7     ; 0013 98C4              0026   ppm out low
          rjmp   avr0003      ; 0014 CFEE              0028   loop for next cycle

avr0015:  in     r23, PINB    ; 0015 B376              002A   test PB bit masked
          and    r23, r22     ; 0016 2376              002C   by r22
          breq   avr0015      ; 0017 F3E9              002E   
;         sbi    PORTB, 4     ; 0018 9AC4              0030   
          sbi    PORTB, 7     ; 0018 9AC4              0030   set ppm out high
          rcall  avr001F      ; 0019 D005              0032   short delay to inject gap
;         cbi    PORTB, 4     ; 001A 98C4              0034   
          cbi    PORTB, 7     ; 0013 98C4              0026   ppm out low

avr001B:  in     r23, PINB    ; 001B B376              0036   wait until current
          and    r23, r22     ; 001C 2376              0038   channel is done
          brne   avr001B      ; 001D F7E9              003A   
          ret                 ; 001E 9508              003C   

avr001F:  ldi    r25, 0x03    ; 001F E093              003E   delay for proper gap between pulses
avr0020:  sbiw   r24, 0x01    ; 0020 9701              0040   ie: "needle" glitch as generated
          brne   avr0020      ; 0021 F7F1              0042       by diode circuits
          ret                 ; 0022 9508              0044   


          ori    r18, 0x38    ; 0023 6328              0046   '(c) 2006 R.Smith'
          and    r2, r9       ; 0024 2029              0048   ') 2006 R.Smith..'
          cpi    r19, 0x02    ; 0025 3032              004A   '2006 R.Smith....'
          cpi    r19, 0x60    ; 0026 3630              004C   '06 R.Smith......'
          subi   r18, 0x20    ; 0027 5220              004E   ' R.Smith........'
          subi   r18, 0x3E    ; 0028 532E              0050   '.Smith..........'
          ori    r22, 0x9D    ; 0029 696D              0052   'mith............'
          ori    r23, 0x84    ; 002A 6874              0054   'th..............'
                                                       
         .exit
and the hex file:

:020000020000FC
:100000007FE97DBFBF9A61E00ED062E00CD064E072
:100010000AD068E008D060E106D060E204D0C79A58
:100020000CD0C798F0CF76B37623E9F3C79A05D002
:10003000C79876B37623E9F7089593E00197F1F72F
:100040000895286329203230303620522E536D69AE
:020050007468D2
:00000001FF

thanks again, rich!
druzara is offline Find More Posts by druzara
Reply With Quote
Old Sep 24, 2009, 06:58 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 druzara
Here they are, enjoy!

thanks again, rich!
Thank you!

Now I don't have to hunt down my source. This will make it a trivial matter to change number of channels too.
rich smith is offline Find More Posts by rich smith
Reply With Quote
Old Sep 24, 2009, 08:27 AM
Registered User
United Kingdom, Bristol
Joined Aug 2008
1,774 Posts
Nice one thanks druzara

I'll guess you used scope to find out which pin order ?
SadSack is offline Find More Posts by SadSack
Reply With Quote
Old Sep 24, 2009, 02:21 PM
Registered User
Toronto Canada
Joined Feb 2008
25 Posts
Quote:
Originally Posted by SadSack
Nice one thanks druzara

I'll guess you used scope to find out which pin order ?
aye, was troubleshooting it with scope when it worked for eflite and not with dx7 TX.

btw, worked fine with Phoenix sim. Wireless infront of a projected screen is just like a day in the park except the part where i am looking for the broken parts in the grass.
druzara is offline Find More Posts by druzara
Reply With Quote
Old Sep 24, 2009, 02:27 PM
Registered User
United Kingdom, Bristol
Joined Aug 2008
1,774 Posts
hmmmmm guess i'll figure it out other boring way then.

Q: could that be complied to run on mega 88v? Got to order otherwise

Thx
SadSack is offline Find More Posts by SadSack
Reply With Quote
Old Sep 24, 2009, 04:08 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 SadSack
hmmmmm guess i'll figure it out other boring way then.

Q: could that be complied to run on mega 88v? Got to order otherwise

Thx
Easy to figure channels. Just move a servo from one to the other and wiggle TX sticks.

To work with 88 you need to change addresses for Port B.
rich smith is offline Find More Posts by rich smith
Reply With Quote
Old Sep 29, 2009, 03:41 PM
Registered User
United Kingdom, Bristol
Joined Aug 2008
1,774 Posts
Well ATTINY2313-20PU 8-BIT came to day
Well built it and well few issues...

Unsure of fuse setting, appears too work. Still rather be on same page.

Well may untrained eye it appears to be inverted but you tell me how its wrong

I've used same setting to pick both signels

First pic is PPM output from 12FG trainer port



Next output from convertor. Looks like pins PB0~PB06 in order go into Futaba R606FS in order PB0=ch1 PB1-ch2 and so on, nice.



So any help would be great, Thanks
SadSack is offline Find More Posts by SadSack
Reply With Quote
Old Sep 29, 2009, 03:46 PM
Registered User
United Kingdom, Bristol
Joined Aug 2008
1,774 Posts
btw have tried my specktrum module and that appears to be inverted too.
And not guessed channel order either.
SadSack is offline Find More Posts by SadSack
Reply With Quote
Old Sep 30, 2009, 03:02 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
btw have tried my specktrum module and that appears to be inverted too.
And not guessed channel order either.
All servo PWM signals are activie hi. My Hitec TX PPM signals are active hi too so that's what the code outputs. Other TX may be active low so If your quad, autopilot, etc expects that you can add a transistor (i.e. 2n7000) on the output to invert or mod the code.

And ch1-7 inputs are PB0-6. They must be in order for this to work right.
rich smith is offline Find More Posts by rich smith
Reply With Quote
Old Sep 30, 2009, 04:53 AM
Registered User
United Kingdom, Bristol
Joined Aug 2008
1,774 Posts
hoping for code fix...this will be very handy for sim. And 1 mcu few leads simple
But can't code myself ;( Can't do much...apart from read(kinda) and drive soldering iron!
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