SMALL - espritmodel.com SMALL - Telemetry SMALL - Radio
Reply
Thread Tools
Old Oct 13, 2009, 01:55 PM
Registered User
Joined Jun 2005
32 Posts
Cesco, .HEX end .EPP from sat_hk.asm please?

To Cesco

Hello!

Is it possible to give .hex and .eep files for 4 channel decoder from the satellite HobbyKing receiver.

I compiled the latest source with some older version of AVR Studio without errors , but flashed program not working. Fusses - 8 MHz internal oscillator.

Mega8 of pins:
Pin 14 - 17 (PB2-PB5) - 1-4 channel
Pin 32 (Int0/PD2) - input from the satellite
Pin 28 (PC5) - bind
pin 29 (Reset) - resistor 10k to "+"

Thanks in advance!

PS. Sorry for my bad English.
chwory is offline Find More Posts by chwory
Reply With Quote
Sign up now
to remove ads between posts
Old Oct 13, 2009, 02:39 PM
Registered User
Joined Dec 2007
568 Posts
That is most probably a timing issue.

Try different N parameters. Every internal rc-osc is different and the calibration "osccal" in the source is for MY atmega8, yours will be different.

Yesterday i made the code run on a atmega163 with 8mhz crystal and i had to change this:

.equ N = 24 ; 24 us
.equ t_reload = (256-N)+1
.equ t_reload_first = (256-(N+N/2))+4 ; 0=37 1=35.88 2=34.50
.equ t_reload_send = (256-(N+N/2))+5 ; 0=37 1=35.88 2=34.50

and this

;-----fla-----------------------------------------------------------------
; transmit stuff, byte must be in u_buffer_l

uart_transmit:
ldi flags0,(1<<BUSY)|(1<<TD) ;Set only busy- and transmit flag

clr temp1
out GIMSK,temp1 ;Disable external interrupt

ser u_bit_cnt ;Erase bit-counter (set all bits)

ldi temp1,1<<TOIE0 ;Set bit 1 in u_tmp
out TIFR,temp1 ; to clear T/C0 overflow flag
out TIMSK,temp1 ; and enable T/C0 overflow interrupt

ldi u_reload,t_reload ;Set reload-value
ldi temp1,t_reload_send ;Set timer delay to first bit
out TCNT0,temp1 ;Set timer reload-value (1 bit)

cbi serial_out ;Clear output (start-bit)

waittrend:
sbrc flags0,TD ;Wait until data is sent
rjmp waittrend
ret

to work correcty.
You better have sone assembler knowedge and a 2-ray scope to adjust timing.
Cesco is offline Find More Posts by Cesco
Reply With Quote
Old Oct 13, 2009, 03:00 PM
Registered User
Joined Jun 2005
32 Posts
Thanks, i will try that.
chwory is offline Find More Posts by chwory
Reply With Quote
Old Oct 14, 2009, 01:49 PM
Registered User
Joined Jun 2005
32 Posts
To Cesco
By your recommendations i`m replace setting "osccal" to that of 8MHts my Mega8 in:
"
;----- fla ------------------------------------------- ----------------------
; Init after reset

reset:
ldi temp1, 0xa2; 0xaf; 0xab orig
out OSCCAL, temp1 "
Changed and:
". equ N = 24; 24 us "

Now the channels are working, but:
1.Channel4 affect to Channel3.
2.Channel3 disappears after a few seconds.
3.Happens to be spontaneous restarts.

Obviously needed playing with timings.

Thanks!
chwory is offline Find More Posts by chwory
Reply With Quote
Old Oct 14, 2009, 05:47 PM
Onward through the fog.
Cybernaught's Avatar
Bohol Philippines
Joined Aug 2008
1,566 Posts
Question about programming with T6config.

Hi Gang,

I have an HK version of the 6ch 2.4G set and about 6 recievers. I have not been able to program elevons. I'm currently using an external mixer to get the mix on elevator and rudder but would like to use internal mixing.

I have read the first 35 pages of this thread but it seems most of you are interested in electronic mods of the equipment and writing programs for PDAs and PPCs. Not really my thing. I just wanna fly. Is there a post or thread on the finer art of getting all you can get out of the programming for this rig? I read on HK's site that you have to use the Heli mode to do the correct mix and then switch to Plane mode to use it?????

I downloaded Keepitsimple's Turborix.exe file but the Environment file is 48M and my slow-ass server makes downloading a file that big very time consuming and problematic at best. I'll try it when I can get to the Cybercafe in our provinical capitol. We are out on a small island and away from all the good technology. Internet is via GPRS and dead slow when it works.

This is a great combo and dirt cheap from HK. I live in the Philippines and have to order all my RC electronics from overseas.

Here is my latest bird:
http://www.rcgroups.com/forums/attac...mentid=2815809

Great thread, guys.

Steve.
Cybernaught is offline Find More Posts by Cybernaught
Reply With Quote
Old Oct 14, 2009, 08:32 PM
R.I.P, Aardvark.
F-111 John's Avatar
Holt, MI
Joined Jan 2009
1,554 Posts
Quote:
Originally Posted by Cybernaught
Hi Gang,

I have an HK version of the 6ch 2.4G set and about 6 recievers. I have not been able to program elevons. I'm currently using an external mixer to get the mix on elevator and rudder but would like to use internal mixing.
Steve,

Elevons are super simple. Using T6Config, you need to program two mixes:

Mix Num: MIX 1
Source: CH1
Des: CH2
Up Rate: 100%
Down Rate: 100%
Switch: ON

Mix Num: MIX 2
Source: CH2
Des: CH1
Up Rate: -100% (Note Negative Sign!)
Down Rate: -100% (Note Negative Sign!)
Switch: ON

Mix Num: MIX 3
Doesn't matter.
Switch: OFF

Left elevon servo plugs into channel 1, right elevon servo into channel 2. If your throws are backwards, click on the reverse check boxes for both channels 1 and 2.

Here is a basic default elevon file. Remove the .doc extension. The .doc is just to fool the RCGroups file loader into accepting it.
F-111 John is offline Find More Posts by F-111 John
Reply With Quote
Old Oct 15, 2009, 06:18 AM
Onward through the fog.
Cybernaught's Avatar
Bohol Philippines
Joined Aug 2008
1,566 Posts
Quote:
Originally Posted by F-111 John
Steve,

Elevons are super simple. Using T6Config, you need to program two mixes:

Mix Num: MIX 1
Source: CH1
Des: CH2
Up Rate: 100%
Down Rate: 100%
Switch: ON

Mix Num: MIX 2
Source: CH2
Des: CH1
Up Rate: -100% (Note Negative Sign!)
Down Rate: -100% (Note Negative Sign!)
Switch: ON

Mix Num: MIX 3
Doesn't matter.
Switch: OFF

Left elevon servo plugs into channel 1, right elevon servo into channel 2. If your throws are backwards, click on the reverse check boxes for both channels 1 and 2.

Here is a basic default elevon file. Remove the .doc extension. The .doc is just to fool the RCGroups file loader into accepting it.
John,

Thanks for the info and the file. I had used those setting before and it didn't work but when I loaded your program for the 3rd time, it kicked in, and it worked. Now when I use and /or change the Mix settings it works. Maybe I had inadvertently made set something that prevented it from working. I don't know but thanks to your help I'm getting the mixing to work correctly now. Before both controls 1&2 operated the same function. I'll use the external mixers and a "Y" cable if I want to mix a canard elevator-only with elevons. This will really simplify my future builds.

One other question, if you don't mind. I have a second TX/RX HK 2.4G radio coming with 3 more receivers. When HK gets them in stock. I'm assuming they will work side by side to control two separate planes at the same time without any problems. I'm used to 72Mhz and channel flags but it's my understanding the 2.4G stuff automatically sorts all that stuff out with the electronics and auto frequency selection or something, with the exception of binding a receiver to a transmitter.

Thanks again, John. You've been a big help.

Steve.
Cybernaught is offline Find More Posts by Cybernaught
Reply With Quote
Old Oct 15, 2009, 07:11 AM
Registered User
earlwb's Avatar
USA, TX, Grapevine
Joined Dec 2008
13,356 Posts
cybernaught, each transmitter has a special serial number or id number that is used for the receiver to lock in with and sync up. Thus many 2.4ghz systems can share a number of frequencies and not interfere with each other. So yes when you perform the "bind" sequence, the receiver is locked to a specific transmitter and only that TX can control it after it has been bound to it.

But in the past there have been a few instances where the factory didn't set the serial numbers on some Tx's and left them at all zeros. In that case the TX's could control each other's receivers as the TX's all had the same default zero serial numbers.
earlwb is online now Find More Posts by earlwb
RCG Plus Member
Latest blog entry: My new Gaui X5 Rc Helicopter
Reply With Quote
Old Oct 15, 2009, 07:49 AM
R.I.P, Aardvark.
F-111 John's Avatar
Holt, MI
Joined Jan 2009
1,554 Posts
Quote:
Originally Posted by Cybernaught
John,

Before both controls 1&2 operated the same function. I'll use the external mixers and a "Y" cable if I want to mix a canard elevator-only with elevons. This will really simplify my future builds.

Steve.
Glad things worked out for you, Steve! The thing that got me at first was not putting the minus signs on the second mix. If you leave off the negative sign on the mix value for the second mix, then both elevator and aileron would give you just ailerons.

If you have a canard aircraft with elevons, you have one mix left, so you could mix channel 2 (elevator) to channel 5 (or 6,) and have separate elevator signal for canards. You'd plug in your canard servo into channel 5.

Enjoy!
F-111 John is offline Find More Posts by F-111 John
Reply With Quote
Old Oct 15, 2009, 09:24 AM
Onward through the fog.
Cybernaught's Avatar
Bohol Philippines
Joined Aug 2008
1,566 Posts
Quote:
Originally Posted by F-111 John
Glad things worked out for you, Steve! The thing that got me at first was not putting the minus signs on the second mix. If you leave off the negative sign on the mix value for the second mix, then both elevator and aileron would give you just ailerons.

If you have a canard aircraft with elevons, you have one mix left, so you could mix channel 2 (elevator) to channel 5 (or 6,) and have separate elevator signal for canards. You'd plug in your canard servo into channel 5.

Enjoy!
Thanks for the info Earl.
I'll check things out when the new TX arrives.

John,
It was the negative values that got me! I didn't see them in your earlier post, or perhaps I did see them but just didn't snap to the fact they were "minus" signs.

Re: Canard...
Your idea would allow altering the setting for incidence and radical offset for high alpha... Hmmmmmm Either way it adds a tremendous amount of versatility to a very cheap radio system.

Sweet!
Steve.
Cybernaught is offline Find More Posts by Cybernaught
Reply With Quote
Old Oct 15, 2009, 09:38 AM
R.I.P, Aardvark.
F-111 John's Avatar
Holt, MI
Joined Jan 2009
1,554 Posts
This radio would be even sweeter if it had more than three mixes. Flapperons takes three mixes, leaving nothing for a v-tail. That rules out a lot of sailplanes I've looked at. I could always use an onboard v-tail mixer, but they have low resolution.

Maybe someday FlySky will get the 9x right.
F-111 John is offline Find More Posts by F-111 John
Reply With Quote
Old Oct 15, 2009, 10:45 AM
Registered User
Joined Dec 2007
568 Posts
Quote:
Originally Posted by chwory
To Cesco
Obviously needed playing with timings.
There is a thinking-error in the soft. Sorry, i did see only today.
the first transmit reload value must be 24us, not 36us !!!
t_reload_send = 24us and it will be much simpler to adjust timing

There is also a very ugly thing in the bind code ...

Nobody is perfect ... Cesco
Cesco is offline Find More Posts by Cesco
Last edited by Cesco; Oct 15, 2009 at 02:16 PM.
Reply With Quote
Old Oct 15, 2009, 11:04 AM
Registered User
JMP_blackfoot's Avatar
United States, OH, Galena
Joined Jul 2003
1,719 Posts
Quote:
Originally Posted by earlwb
....But in the past there have been a few instances where the factory didn't set the serial numbers on some Tx's and left them at all zeros. In that case the TX's could control each other's receivers as the TX's all had the same default zero serial numbers.
Has this been reported for the FlySky (or clones), or do you refer to the Futaba Zero GUID teething problem which happened in 2007 and has been corrected from early 2008 on ?
( http://www.rcgroups.com/forums/showthread.php?t=803207
http://www.rcgroups.com/forums/showthread.php?t=1087860 )
JMP_blackfoot is offline Find More Posts by JMP_blackfoot
Reply With Quote
Old Oct 15, 2009, 11:27 AM
R.I.P, Aardvark.
F-111 John's Avatar
Holt, MI
Joined Jan 2009
1,554 Posts
It was Renns who reported this problem with FlySky clones.

http://www.rcgroups.com/forums/showp...postcount=1205
F-111 John is offline Find More Posts by F-111 John
Reply With Quote
Old Oct 15, 2009, 12:24 PM
Registered User
JMP_blackfoot's Avatar
United States, OH, Galena
Joined Jul 2003
1,719 Posts
Yes, I remember now

Renns may well have put his finger on the explanation of the problem in his post #1240 (page 83):

"Strange. I bought one from snhobbies, and a second used one, which I believe also came from the same outfit. It could be coincidence, or perhaps snhobbies is selling off factory 2nds, or some early release version of these things?"

I have one 6 ch. system I bought from SN Hobbies, one 4 ch. from R2Hobbies and two 4 ch. from Hobby City. They do not have the problem between them ( but then I do not have two of the SN ).
The Tx RF board and the Rx boards in the SN Hobbies are different from the other three's. There is evidence of capacitors soldered as an afterthought in the SN receiver, and the SN transmitter current drain is noticably lower than the others (135 mA versus 170 mA).
I checked the pulse trains with a scope and found that the SN transmitter sends data once every PPM sequence, while the others update data more or less continuously. This is also confirmed by the fact that apparent radiated RF is much lower from the SN Tx.
This said, range tests give very similar results with all four systems - I guess the peak RF power is the same - and they all give trouble-free service.

Based on the above observations, I believe that SN Hobbies did indeed sell off early versions of the FlySky system, which would explain the troubling behaviour witnessed by Renns's radios ?
JMP_blackfoot is offline Find More Posts by JMP_blackfoot
Last edited by JMP_blackfoot; Oct 15, 2009 at 12:30 PM.
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
New Product X8---new 2.4GHz Radio System ASSAN Radios 5713 Nov 23, 2014 11:21 AM
Yippee! New 2.4GHz DSM radio - New standard? PrasadL Scratchbuilt Indoor and Micro Models 12 Jun 03, 2013 08:03 AM
For Sale NEW - 2.4GHZ 2 channel Pistol R/C system SRM Cars - Cars and Parts (FS/W) 0 Oct 22, 2008 10:39 AM
FS: 1x Used 1x New 2.4ghz Wireless video cameras with receiver Nik-rc Aircraft - Electric - Airplanes (FS/W) 4 Nov 30, 2004 07:21 PM