View Single Post
Old Jan 16, 2011, 10:15 PM
SadSack is offline
Find More Posts by SadSack
Registered User
United Kingdom, Bristol
Joined Aug 2008
1,829 Posts
Originally Posted by richardkalaf View Post
Hi guys,

Does anyone have this working with a Spektrum DX5e TX and a AR500 RX ?

The only MCU i have available here is a AT90S2313 . I have programed it with the 6ch hex that someone kindly posted here on page 4 (sorry i donīt remember the name), but the output signal ( pin B7 right?) show a quite crazy output on the scope. Several pulses that oscillate from 2 to several pulses all nuts..and they donīt seem to change in duration as i flick the TX sticks.

1-Have anyone tried this with an ATS902313 yet? Does it work?
2-Does someone have a working code for 5 channels? Even better if itīs tested with AR500 RX.
3- Someone sugested using the 4078. Is there really a reliable analog solution for this? Or maybe a C code? ( i canīt code in Assembly) Or maybe a PIC solution?

Any help would be MUCH appreciated!


I really can't code but druzara commented code pretty well.
You could comment out the input pins ";" so can have 3,4,5 so on That appears pretty simple (simple being mother of all )

druzara has commented out one channel already (in Blue)
And changed channel order (in Yellow) yes yellow looks bad
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
I have futaba rx and honestly there simple output from rx is 1,2,3,4,5,6 very easy. Specky well all different Well you have a scope maybe you can figure out channel order !?
I had to invert mine (see my posts) Maybe you could swap ldi sbi (in red) around but sure that would be stupid!?

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
SadSack is offline Find More Posts by SadSack
Reply With Quote