View Single Post
Old Jan 16, 2011, 10:42 PM
richardkalaf is offline
Find More Posts by richardkalaf
Registered User
richardkalaf's Avatar
So Paulo,Brazil
Joined Jan 2011
148 Posts
Originally Posted by SadSack View Post


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
Thanks for the tips. Ill give it a try tomorrow, as its quite late around here already.

I have already found the order of the AR500 Rx . If anyone is interested, here goes:

1 Roll ( Aile)
2 Pitch (Elev)
3 Yaw (Rud)
4 Throttle ( duh..)
5 Aux1 (gear)

Also, in a desperate attempt ive tryed the infamous "diodes apporach", and it shows a little better output, but inverted ( as mentioned before) and with some weird spikes. I tried to filter it out experimenting with caps and resistors but didnt help much.
Also between the Throttle pulses theres a "mid-level" voltage. Not 0V nor 5V.

Maybe ill post videos or pics of the scope readings tomorrow.

By the way, is there an arduino way of doing this? I have a spare Mega328 laying around i can dedicate to this.

Thanks so far.
richardkalaf is offline Find More Posts by richardkalaf
Reply With Quote