Espritmodel.com Telemetry Radio
Reply
Thread Tools
Old Jan 23, 2011, 04:31 PM
Registered User
richardkalaf's Avatar
São Paulo,Brazil
Joined Jan 2011
148 Posts
I was afraid you´d ask that.. lol

As a matter of fact in the end, i didn´t even need the transistors. But i gave up on trying not to use the external XTAL.

SadSack´s third hex file got it right. After i soldered it all neatly on a board and added a couple of caps, the signal was nice and clean, but i´m quite embarassed to admit what was really preventing the software from being able to detect the signal.

It turns out that at some point i commented the line #define SERIAL_SUM_PPM for testing and forgot to uncomment it .

After that it worked.

I still have to figure out how to solve that AUX1 problem now though.
richardkalaf is offline Find More Posts by richardkalaf
Last edited by richardkalaf; Jan 23, 2011 at 05:12 PM.
Reply With Quote
Sign up now
to remove ads between posts
Old Jan 24, 2011, 05:48 AM
Registered User
UK
Joined Sep 2008
40 Posts
Aux1

Does your TX have a monitor screen where you can see each channel? If so check that the AUX 1 switch is actually doing what you expect. Are the end point settings for each channel the same? Does the AUX1 channel have to be set as a 3 position switch? If so, I know the DX6i does not easily allow this (I assume your 5 channel tx also does not) although you can get around it by programming it a via a mixer on the TX.
D
helidave1 is offline Find More Posts by helidave1
Last edited by helidave1; Jan 24, 2011 at 04:08 PM. Reason: clarification
Reply With Quote
Old Jan 26, 2011, 12:52 PM
Registered User
richardkalaf's Avatar
São Paulo,Brazil
Joined Jan 2011
148 Posts
@ SadSack, Helidave1 and everyone else who helped me so far, here´s a link the the MultiWii thread where i´ve posted 2 videos showing the AUX1 thing. Maybe it can help.

http://www.rcgroups.com/forums/showp...postcount=7509
richardkalaf is offline Find More Posts by richardkalaf
Last edited by richardkalaf; Jan 26, 2011 at 10:23 PM.
Reply With Quote
Old Jan 27, 2011, 01:25 PM
Registered User
richardkalaf's Avatar
São Paulo,Brazil
Joined Jan 2011
148 Posts
Quote:
Originally Posted by SadSack View Post
would be nice if you post your change's, how you sorted it.
So others can benefit
Here´s what Alexinparis said:

"on your video, we can see there is only 5 rising edges on the stream.
channel 1= time difference between rising egde 1 and 2
channel 2= time difference between rising egde 2 and 3
channel 3= time difference between rising egde 3 and 4
channel 4= time difference between rising egde 4 and 5
no way to distinguish a channel 5

The soft works like this.
You can maybe double the last channel to have another rising edge on the stream."

It makes sense! So if others encounter the same problem, this is probably the answer.

I´m still trying to disassemble your hex file to try to double the last pulse, but i think i don´t know how to use AVR Studio very well.
richardkalaf is offline Find More Posts by richardkalaf
Reply With Quote
Old Jan 29, 2011, 01:20 PM
Registered User
United Kingdom, Bristol
Joined Aug 2008
1,770 Posts
Well i'll re post code for V3

[PHP]; 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
cbi PORTB, 7 ; 0018 9AC4 0030 set ppm out low
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
sbi PORTB, 7 ; 0013 98C4 0026 ppm out high

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[/PHP]

AVRStudio wasn't used to re-make source http://acholic.turningaway.net

Enjoy

ps can i suggest that you move AUX inut to one other pins and change code to suit. If only to see if channel can be seen in software.
SadSack is online now Find More Posts by SadSack
Reply With Quote
Old Jan 30, 2011, 08:12 AM
Registered User
USA, NY, Syracuse
Joined May 2005
874 Posts
edited because of wrong info.
beer-man is online now Find More Posts by beer-man
Last edited by beer-man; Jan 31, 2011 at 12:40 PM.
Reply With Quote
Old Jan 30, 2011, 02:51 PM
Registered User
UK
Joined Sep 2008
40 Posts
Tt rec-enc

Hi,
I have been using the above unit for some time to get a PPM and it works very well. I have been comparing it's operation with the code listed here and used it an ATTiny 2313. The 2313 gives a good solid output signal but when I use it on a tricopter I get a "glitch" of some sort. I noted the comment in the above post and wondered if this could be the cause as the TT REC ENC unit works flawlessly when I swap it over. I cannot see a problem on the scope. I realise that the above description is vague but it's the best I can describe it.
I wondered if anybody has any ideas - assembly code is beyond me !
D
helidave1 is offline Find More Posts by helidave1
Reply With Quote
Old Jan 30, 2011, 11:13 PM
Registered User
richardkalaf's Avatar
São Paulo,Brazil
Joined Jan 2011
148 Posts
Yes, by the way, even though SadSack kindly posted the code above, i´m still strugling to modify it to double the last pulse or at least insert another "clear bit, set bit" so the MultiWii software will see the 5 "rising edges" and sense all 5 channels correctly.

As a matter of fact, i decided to google and try to study a little bit of avr assembly just to try to understand and modify the code..

Just a note on the coment about the binary count above. If you open Windows "programmer´s calculator" and type "00010000" binary and click hex, it will output "10" . If you type "00100000" it will output "20" ...
richardkalaf is offline Find More Posts by richardkalaf
Reply With Quote
Old Jan 31, 2011, 12:26 PM
Registered User
USA, NY, Syracuse
Joined May 2005
874 Posts
you see I am wrong, I forgot about the hex value.
beer-man is online now Find More Posts by beer-man
Reply With Quote
Old Jan 31, 2011, 11:36 PM
Registered User
richardkalaf's Avatar
São Paulo,Brazil
Joined Jan 2011
148 Posts
Quote:
Originally Posted by SadSack View Post
Well i'll re post code for V3

[PHP]; 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
cbi PORTB, 7 ; 0018 9AC4 0030 set ppm out low
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
sbi PORTB, 7 ; 0013 98C4 0026 ppm out high

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[/PHP]

AVRStudio wasn't used to re-make source http://acholic.turningaway.net

Enjoy

ps can i suggest that you move AUX inut to one other pins and change code to suit. If only to see if channel can be seen in software.
SadSack,

Dude... i´m PM´ing you because i need your help.
richardkalaf is offline Find More Posts by richardkalaf
Reply With Quote
Old May 06, 2011, 02:40 AM
Registered User
South Africa
Joined Dec 2007
207 Posts
Hi Guys,

Anyone seen this yet, http://www.dealextreme.com/p/usb-g3-...r-dongle-65233 ?

I will dump the disk that comes with the dongle as i do not support piracy, however for $25 i seems crazy for me to build up an AVR programmer (Although i bought all the components to make it) and make up my own wireless sim dongle. I own a legit version of Reflex XTR and will only be using that, however for those with legit versions of Aerofly, etc this may be a good solution, :-).

Cheers
Rob
Bobbo is offline Find More Posts by Bobbo
Reply With Quote
Old May 06, 2011, 10:47 AM
Registered User
USA, NY, Syracuse
Joined May 2005
874 Posts
I don't think it's going to come with a full version on realflight. It'll will probably have a emulater program to get it started without their usb dongle. This is how I do it.
beer-man is online now Find More Posts by beer-man
Reply With Quote
Old May 06, 2011, 01:02 PM
Registered User
United Kingdom, Bristol
Joined Aug 2008
1,770 Posts
Quote:
Originally Posted by beer-man View Post
I don't think it's going to come with a full version on realflight. It'll will probably have a emulater program to get it started without their usb dongle. This is how I do it.
Why use software to emulate hardware....!!
Just use hardware
well Phoenix works that way and i do own a lead.
Guy puts alot of work into it.
Only same cost as mild crash with trex 600 so cheap(not the crash btw).
Just wanted wireless with phoenix.
SadSack is online now Find More Posts by SadSack
Reply With Quote
Old May 11, 2011, 12:04 PM
ysb
use the force..or a quadcopter
ysb's Avatar
quebec
Joined Dec 2010
247 Posts
Quote:
Originally Posted by Bobbo View Post
Hi Guys,

Anyone seen this yet, http://www.dealextreme.com/p/usb-g3-...r-dongle-65233 ?

I will dump the disk that comes with the dongle as i do not support piracy, however for $25 i seems crazy for me to build up an AVR programmer (Although i bought all the components to make it) and make up my own wireless sim dongle. I own a legit version of Reflex XTR and will only be using that, however for those with legit versions of Aerofly, etc this may be a good solution, :-).

Cheers
Rob
mine is in Custom... will se how it work soon...
seem that it's a 6 channels with 2 channels hidden and not soldered (total 8 channels)... time to dig in...
ysb is offline Find More Posts by ysb
Last edited by ysb; May 11, 2011 at 12:43 PM.
Reply With Quote
Old May 12, 2011, 01:49 AM
Registered User
South Africa
Joined Dec 2007
207 Posts
Quote:
Originally Posted by ysb View Post
mine is in Custom... will se how it work soon...
seem that it's a 6 channels with 2 channels hidden and not soldered (total 8 channels)... time to dig in...
Damm, :-), mine is still in Transit, probably only get it early next week, the last order i placed with them was here in 7 days.

Let us know how it does when you get it.

Cheers
Rob
Bobbo is offline Find More Posts by Bobbo
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