er9x development

er9x is the best known firmware. It has a superb range of features and is well supported by the community. Well worth trying out.
andrewju
Posts: 784
Joined: Tue Aug 21, 2012 7:29 am
Country: Russian Federation
Location: Moscow

Re: er9x development

Post by andrewju »

Ugh... hmm... I didn't hear about it.

Thanks for the info!

User avatar
MikeB
9x Developer
Posts: 17992
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: er9x development

Post by MikeB »

I've been investigating adding the extra 3-position switch option. I added code, taken from ersky9x, that handles automatically sorting the switch selection in the menus based on hardware settings. I've been testing this on the '128, but I was getting odd reboots when editing a switch.
I've looked into this and discovered I was getting stack overflow. The '128 only seems to have around 50 bytes spare on the stack normally, and the addition of a couple of RAM based tables to handle the switches used more than this up.

So, basically we are getting close to the limits of what may be possible on the original 9X, and the 9XR, except maybe for the '2561 that has more RAM. Only a few people have the '2561.

Perhaps the obvious thing to do, to free up some RAM, is to remove the "throttle trace" from the STAT display. This saves 126 bytes of RAM. This is already removed from the '64-FrSky version to save flash as well.
In any case, 50 bytes left for the stack is a bit low, given some combination of interrupts may still occur that will use up more stack.
I think "throttle trace" will have to go from the '128 to allow for 3-position switch options.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: er9x development

Post by jhsa »

Yes please ;) I think it's a big gain compared to the loss, if there is any.. ;) :)

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
mmilan
Posts: 171
Joined: Fri Mar 23, 2012 12:16 am
Country: United States
Location: Holly, Mi

Re: er9x development

Post by mmilan »

MikeB,
There may be more '2561s out there than you think. I have four 9x tx with '2561. I like many others are mostly silent in the forums as I have mediocre technical abilities.
Thankyou,
Mike Milan
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: er9x development

Post by jhsa »

I wonder if my boards would be able to take one more chip change :(

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW

User avatar
MikeB
9x Developer
Posts: 17992
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: er9x development

Post by MikeB »

I had already removed the "throttle trace" from all '64 versions, and I will remove it from '128 versions. I will leave it available in the '2561 version, easy enough to do it is just a compile option just left enabled if the '2561 is defined.

mmilan: You probably have a better technical ability than you think, particularly if you've change 4 processors out!

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
andrewju
Posts: 784
Joined: Tue Aug 21, 2012 7:29 am
Country: Russian Federation
Location: Moscow

Re: er9x development

Post by andrewju »

I think swapping TQFP-64 is quite easy, once you figure out how to do it. I have modified a lot of the stock 9x boards, installing m128 or m2561 (mostly 2561). So there are surely more '2561 boards out there than it may seem.

And we're all looking forward to the new features! :)

Thanks a lot, Mike!
User avatar
magnetus
Posts: 92
Joined: Tue Mar 12, 2013 2:10 am
Country: United States
Location: Orlando, FL

Re: er9x development

Post by magnetus »

I want to mod my spare 9x with a '2561 but also will like to install a rotary encoder. I emailed hipo and he is no longer fabricating those pcb. does anyone has a spare pcb???
I will order the encoder and the chips from mouser or digikey
Miguel
User avatar
KAL
Posts: 552
Joined: Thu Oct 10, 2013 4:36 pm
Country: Germany
Location: somewhere near Rothenburg ob der Tauber

Re: er9x development

Post by KAL »

mmilan wrote:... there may be more '2561s out there than you think. I have four 9x tx with '2561...
Same with me. Beside my own 2 9XR-Pros there are four 9x in my family that I changed to m2561. All modded with megasound, rotary encoder, backlight ...

Klaus
( TH9X / 9XTreme / FrSky DHT / Spektrum / Multi / RotEnc )
( 9XR PRO / erSKY9x  / FrSky DHT / Spektrum / Multi / RotEnc / P3 as Slider )
flybabo
Posts: 143
Joined: Wed May 16, 2012 11:41 pm
Country: United States
Location: SF Bay Area, CA

Re: er9x development

Post by flybabo »

We should actively promote people to learn "fine-soldering" skill to upgrade their CPU to 2561 :D
I'm an old fart - if I can do it, anyone can :)
I ordered several 2561's since it's on sale at Newark/Element14.
http://www.newark.com/atmel/atmega2561- ... dp/87W8109
Many thanks to Mike - you've brought us this far.
User avatar
KAL
Posts: 552
Joined: Thu Oct 10, 2013 4:36 pm
Country: Germany
Location: somewhere near Rothenburg ob der Tauber

Re: er9x development

Post by KAL »

For me the bigger problem was to remove the first m64 without demolishing the PCB.
Lucky me I found chipquik smd removal kit.
This in combination with solder wick works better than the hot air rework station I bought in the meantime ...
(If you are a bit careless the surrounding chicken feed will float away ;) )

btw: for hobby purpose I recommend using leaded solder 'cause it can be used
with lower temperatures than unleaded solder.

Klaus
( TH9X / 9XTreme / FrSky DHT / Spektrum / Multi / RotEnc )
( 9XR PRO / erSKY9x  / FrSky DHT / Spektrum / Multi / RotEnc / P3 as Slider )
User avatar
MikeB
9x Developer
Posts: 17992
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: er9x development

Post by MikeB »

I've got a 3-position switch almost fully working on my '128, having removed the throttle trace to free off some RAM. This should therefore work on the '2561, with the throttle trace still present.

The implementation is for it to replace the ELE switch. There is a new option under "hardware" in the radio setup where you select whether the ELE switch is 2-POS or 3-POS. If 3-POS, then the two signals on the Megasound that were the LCD 3 and LCD 4 signals are used as the switch inputs, the original ELE signal becomes unused (for now).

Having used the same implementation as I already use on ersky9x, this new switch appears in the correct place when editing, but doesn't cause any other EEPROM changes.

I think the only thing not working is the switch warning. This will need a bit more work to sort.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: er9x development

Post by jhsa »

That is great Mike, thanks...
About the now unused ELE connection, I always wanted a second momentary switch. I was thinking of a (or a couple) Push button on the back of the radio.. Now with the possibility of incrementing GVARs, that idea really starts to make some sense.. One of the many possibilities that just come to my mind is for example being able to do some kind of trimming, throttle idle adjustment,or increase/decrease dual rate/expo without even letting go of the sticks, control a channel, etc, etc.. So many possibilities..

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
MikeB
9x Developer
Posts: 17992
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: er9x development

Post by MikeB »

Let me get the ELE 3-POS fully working first.
The problem with using any more inputs is there are likely to be many different uses so it will be tricky to provide different options. Some people may want to use the "spare" ELE input to make another switch into a 3-POS switch.
We also have some possibilities for further inputs:
There are three connections on the Megasound board (I called them X1, X2 and X3). The HC1969 board doesn't bring these out, so would require soldering to processor pins to use them. These three signals are also analog capable. Also there is the "PB7" signal on P1, but with the transistors on this signal it is a bit less easy to use.
Looking at the main board, we also have some options. Originally there were several unused pins on the processor:
PORT C bit 0 - Currently still unused I think
PORT C bit 6 - Used for telemetry switch re-mapping
PORT C bit 7 - Used for telemetry switch re-mapping
PORT G bit 2 - Used for haptic control output
PORT B bit 7 - Used for either backlight control or parallel Megasound control

The '2561 also has an extra I/O pin available. Pin 1 is PORT G bit 5.

Since we only ever write to the LCD, the LCD-WR signal is not needed, so we can free this pin for other uses.

Lastly, we are using some of the LCD data lines to handle the rotary encoder. The other lines, if not used for the parallel connection to the Megasound, could also be used, although they would connect differently from the other pins.

While this all sounds useful, providing the ability to configure all these for different possible uses will be very difficult so I may have to limit for what any one signal might be used.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: er9x development

Post by jhsa »

Thanks Mike. On the Arduvoice module all pins can be easily accessed by soldering to the arduino pins whch are 2.54mm pitch.
I guess it is not easy to add more switches and perhaps analog inputs and keep it all flexible. Speaking about the analogs, at least one slider would be great. I installed one of the frsky sliders on my 9x with the skyboard. It is a tight fit with a lot of preparation to make the hole in the right place, but it is perfectly possible. I replaced one of the pots.
But some people might want the extra inputs for controlling camera gimbals for example.
One thing that could be a good idea would be to also have a connection for the haptic on an easier pin. Maybe the voice module?
Thank you for all..

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
MikeB
9x Developer
Posts: 17992
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: er9x development

Post by MikeB »

I've just posted test version for the '128 and '2561. These include support for the ELE switch as a 3-position switch, the connections being on the Megasound board (LCD 2 and 3).
PLEASE backup up EEPROM before using.

I'm considering whether I can add some more hardware configuration for things like this. Things like:
Haptic - options NONE and PG2
Backlight - options PB7 MEGASOUND
3-POS ELE A - options EXT1 ELE PC0 PG2 PB7 PG5 LCD-WR
3-POS ELE B - options EXT2 PC0 PG2 PB7 PG5 LCD-WR

So this would allow a choice as to what you add and to where it is wired.

Example:
You don't have a Megasound board or haptic, but would like the ELE switch as a 3-position.
You wire the new 3-position switch using the existing ELE switch wire and PC0
Select the ELE switch as 3-POS
Select 3-POS ELE A as ELE
Select 3-POS ELE B as PC0

This should work, although again, the '64 FrSky version probably won't have enough flash to support it (unless I can find several hundred bytes of savings which is now getting unlikely). I will probably remove the A and V options from safety switches as they are not needed with the new voice alarms in. I'm not sure how much this will save.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: er9x development

Post by jhsa »

You could remove that from the others as well ;)

Thank you Mike.. I'm having a little fight with myself trying to decide if I should upgrade both my radios to the m2561. One of them is open as I have been testing the ArduVoice (voice module with arduino) and some hall effect sensors on the gimbals. The latter without much success at the moment.. but im persistent and just received some other magnets to test with. They are probably too big, I don't know.. the thing is, the m128 on this radio was zapped with 10 volts a couple of times but is working... it doesn't seem to have been damaged in any way.. But maybe this is my excuse to replace it ;) :) And I don't have a m2561 radio to test er9x.
Will see.. :)

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
magnetus
Posts: 92
Joined: Tue Mar 12, 2013 2:10 am
Country: United States
Location: Orlando, FL

Re: er9x development

Post by magnetus »

so we will have the options to use PC0, PG2, PA0, PA1, PA2, PA3 and PB7 on the 9x and LCD2, LCD3, PB7 and the lines you call X1, X2 and X3.
how much memory or how hard will be to replace RUD, ELE, AIL, GEAR with 3 ways switches and replace trainer with a switch.
it will feels more like my DX9....
Miguel
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: er9x development

Post by jhsa »

To replace trainer with a normal switch you can do it already. You don't need any firmware option for that.. ;)

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
magnetus
Posts: 92
Joined: Tue Mar 12, 2013 2:10 am
Country: United States
Location: Orlando, FL

Re: er9x development

Post by magnetus »

jhsa wrote:To replace trainer with a normal switch you can do it already. You don't need any firmware option for that.. ;)

João
great I just read it in the manual also you can assign any function to it. :mrgreen:
Miguel
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: er9x development

Post by jhsa »

Yes. The only place where it might be missing are the "AND" switches in logical switches..

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
MikeB
9x Developer
Posts: 17992
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: er9x development

Post by MikeB »

I've been trying a few things out. I've concluded that if you want to make the ELE switch into a 3-position switch, it will work fine if you continue to use the existing wire for one input and just have the other (new) input wired somewhere useful. This means only this other (new) input needs to be assigned. It should also mean other switches could be handled in the same way, with each needing just one new input to be selected.

To be able to select PG2 between haptic output and switch input, PB7 between backlight/Megasound control and switch input and LCD-WR between LCD use and switch input will take me a bit more time to sort, but PC0, PG5 (on '2561) and the two external signals from the Megasound should be useable soon.

So, 3-POS ELE A will no longer have any options, assumed to be the existing wire,
3-POS ELE B will have options of EXT1 EXT2 PC0 PG2 PB7 PG5 LCD-WR
and with some luck I shuld be able to have
3-POS RUD B
3-POS AIL B
3-POS GEA B
and have all of these available as 3-position switches (not sure on M64 yet).
Whether I can have all these will also depend on having enough RAM for the switch mapping tables.

Watch this space!

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
flybabo
Posts: 143
Joined: Wed May 16, 2012 11:41 pm
Country: United States
Location: SF Bay Area, CA

Re: er9x development

Post by flybabo »

If you reroute the trim switches using PC0 and LCD_WR, you can replace them by EXT3 and EXT4 options on the 3-POS option list.
User avatar
magnetus
Posts: 92
Joined: Tue Mar 12, 2013 2:10 am
Country: United States
Location: Orlando, FL

Re: er9x development

Post by magnetus »

can a FM24C256 or MB85RC256V serial RAM be implemented?
this particular cases are 256k (32kx8) and is an I2C device
also how about a AT24C256 for extra eeprom space.
Miguel
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: er9x development

Post by jhsa »

Mike could you please make haptic available on one of the voice module EXT pins? I would probably prefer to have the extra switch pin connected to a mainboard processor pin if available, and connect the haptic to the voice module. Of course when there are no more pins available on the mainboard, or if it it is too difficult to solder to it, then we have the voice module's option.

Thanks

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: er9x development

Post by jhsa »

flybabo wrote:If you reroute the trim switches using PC0 and LCD_WR, you can replace them by EXT3 and EXT4 options on the 3-POS option list.
I guess the trim switches need to be connected to the voice module to make it fall into bootloader mode?

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
magnetus
Posts: 92
Joined: Tue Mar 12, 2013 2:10 am
Country: United States
Location: Orlando, FL

Re: er9x development

Post by magnetus »

reroute the trim switches using PC0 and LCD_WR, you can replace them by EXT3 and EXT4 options on the 3-POS option list
make haptic available on one of the voice module to have the extra switch pin connected to a mainboard processor pin if available
great ideas !!!!
I think we can access bootloader mode with one of the switches engaged( ei. whatever switch replaces current trim).
Miguel
flybabo
Posts: 143
Joined: Wed May 16, 2012 11:41 pm
Country: United States
Location: SF Bay Area, CA

Re: er9x development

Post by flybabo »

jhsa wrote:
flybabo wrote:If you reroute the trim switches using PC0 and LCD_WR, you can replace them by EXT3 and EXT4 options on the 3-POS option list.
I guess the trim switches need to be connected to the voice module to make it fall into bootloader mode?

João
Not really.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: er9x development

Post by jhsa »

magnetus wrote: I think we can access bootloader mode with one of the switches engaged( ei. whatever switch replaces current trim).
Not so easy.. First this means very fine soldering involved.. Most of the people that bought the Megasound board probably can't do it..

Second, you can't use any of the other switches to put the module in bootloader mode. If switch reverse is selected as switch default for one of those switches, the voice module will fall into bootloader mode when you turn the radio on..

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: er9x development

Post by jhsa »

flybabo wrote:
jhsa wrote:
flybabo wrote:If you reroute the trim switches using PC0 and LCD_WR, you can replace them by EXT3 and EXT4 options on the 3-POS option list.
I guess the trim switches need to be connected to the voice module to make it fall into bootloader mode?

João
Not really.
ooook, so how would you put the voice module in bootloader mode?

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW

Post Reply

Return to “er9x”