ATmega2561 support in openTx
ATmega2561 support in openTx
Look what I got today!
Based on a few recent discussions, I managed to get my hands on one of the ATmega2561-16AU MCUs with 256kB Flash, 4kB EEPROM, 8kB SRAM
Bertrand, you mentioned it shouldn't take a lot of work to add support, as the chip is a pin and functionality compatible sub family. I did notice the migration document mentions that some registers names are different & some bits are in different registers and/or locations. Does that create problems? There are a few more porting considerations mentioned in the doc as well.
Migration between ATmega128 and ATmega1281/ATmega2561
I have a brand new Turnigy 9x waiting for a brain transplant, so I'm willing to be the guinea pig on this!
Based on a few recent discussions, I managed to get my hands on one of the ATmega2561-16AU MCUs with 256kB Flash, 4kB EEPROM, 8kB SRAM
Bertrand, you mentioned it shouldn't take a lot of work to add support, as the chip is a pin and functionality compatible sub family. I did notice the migration document mentions that some registers names are different & some bits are in different registers and/or locations. Does that create problems? There are a few more porting considerations mentioned in the doc as well.
Migration between ATmega128 and ATmega1281/ATmega2561
I have a brand new Turnigy 9x waiting for a brain transplant, so I'm willing to be the guinea pig on this!
Re: ATmega2561 support in openTx
The 2561's already supported for the Gruvin board. That version however can't be used as is, as all the connections are different on there, so it wil be like another new hardware platform.
I must say I'd tend to advise against creating yet another at this point, seeing the mess it has been lately with trying to keep up on supporting the different eeprom versions. The radio side is not a problem, it's mostly about managing to keep all conversions up to date in C9X.
I must say I'd tend to advise against creating yet another at this point, seeing the mess it has been lately with trying to keep up on supporting the different eeprom versions. The radio side is not a problem, it's mostly about managing to keep all conversions up to date in C9X.
Re: ATmega2561 support in openTx
I think it was the 2560 and not the 2561 we were talking about?
And why not? if it works I will get a couple.. if it is to make the 9X more powerfull on par with other more powerful platforms, I'm in.. This what I call hacking.
João
And why not? if it works I will get a couple.. if it is to make the 9X more powerfull on par with other more powerful platforms, I'm in.. This what I call hacking.
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
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
- MikeB
- 9x Developer
- Posts: 17993
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: ATmega2561 support in openTx
The 2560 is a 100-pin device, I believe this is used on the Gruvin board.
The 2561 is the 64-pin version, this is what will fit the stock board instead of the Mega64.
Mike.
The 2561 is the 64-pin version, this is what will fit the stock board instead of the Mega64.
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
Re: ATmega2561 support in openTx
ahh ok.. thanks Mike.. And, do you think it can be done?
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
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
- MikeB
- 9x Developer
- Posts: 17993
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: ATmega2561 support in openTx
It's a bit more involved than going from the '64 to the '128. It is possible however.
Mike.
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
Re: ATmega2561 support in openTx
new challenge?
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
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
- MikeB
- 9x Developer
- Posts: 17993
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: ATmega2561 support in openTx
Not so much a challenge, more organisation. Each different hardware version means more testing and the need for a test unit. For example, I have 3 9Xs, but don't have enough variants to test everything (why I asked about testing the 128 code).
Mike.
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
Re: ATmega2561 support in openTx
Don't forget that any new tempting challenge is driving developers away from further working on some existing, and sometimes unfinished thingsjhsa wrote:new challenge?
Re: ATmega2561 support in openTx
if you're referring to the voice module for example, hhmmmm, true..
But this would put the 9x on par with the faster boards I guess.. at least for a while..
I would like to read other people's opinions/comments too, not just me and Mbanzi
João
EDIT: I'm quite happy what I have now.. telemetry, lot's of models if necessary, ENCODER, voice, telemetry..
But the RAM is quite limiting on the m128 also.. And the 1261 has the double??
But this would put the 9x on par with the faster boards I guess.. at least for a while..
I would like to read other people's opinions/comments too, not just me and Mbanzi
João
EDIT: I'm quite happy what I have now.. telemetry, lot's of models if necessary, ENCODER, voice, telemetry..
But the RAM is quite limiting on the m128 also.. And the 1261 has the double??
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
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
Re: ATmega2561 support in openTx
As much as I like the idea of replacing the CPU again. I do feel that now maybe the time to take a breather and consolidate what we have, as (IMO) there does seem to be a fair number of bugs and errors creeping in on Opentx and Companion which does seem to be related to the major developments and changes that have happened.
The idea of an all in one add on board for the M64 sounds great.. I would buy one and change out my M128 back to the M64 if needs be to use it, if it ever sees the light of day.
The idea of an all in one add on board for the M64 sounds great.. I would buy one and change out my M128 back to the M64 if needs be to use it, if it ever sees the light of day.
Re: ATmega2561 support in openTx
I agree.
The M128 already allows for a lot. You can have all options in, and have twice the amount of model storage (which was a bit tight for many on 64). You don't even need to mod your radio to use one, as if you get a 9XR now it comes with one. What you don't have is the higher number of flight phases, custom switches and custom functions. BUT, do you really need them so badly, and more importantly NOW?
We've had a number of requests and suggestions that people brought in "just because they might be useful one day". These need to be turned down unfortunately. If there's a real need, now, then yes.
I had an intersting read the other day reminding about a very good thing in software development - Never include a feature just because you can.
Everytime you implement something you need:
- Maybe hardware to test it on (like in this case)
- A bit of time to implement the feature (usually that's the quickest)
- More time to test it
- Even more time to debug it
- Yet more time to support it in the long run.
So ask yourself if it's really worth that the developers buy/make themselves one or more 1281/2561 radio(s), spend a week of work or so adding support for another processor in openTx, another week adding support for it in C9X and testing everything, then spend multiple days or weeks in the future just to make sure it keeps working correctly over time and feature additions, upgrades normally from one version to another etc... for something you maybe don't need now, and that a year from now by the time you'd need it you'll have bought a new radio, or that "it would be cool" to use now, but which is not THAT important.
The M128 already allows for a lot. You can have all options in, and have twice the amount of model storage (which was a bit tight for many on 64). You don't even need to mod your radio to use one, as if you get a 9XR now it comes with one. What you don't have is the higher number of flight phases, custom switches and custom functions. BUT, do you really need them so badly, and more importantly NOW?
We've had a number of requests and suggestions that people brought in "just because they might be useful one day". These need to be turned down unfortunately. If there's a real need, now, then yes.
I had an intersting read the other day reminding about a very good thing in software development - Never include a feature just because you can.
Everytime you implement something you need:
- Maybe hardware to test it on (like in this case)
- A bit of time to implement the feature (usually that's the quickest)
- More time to test it
- Even more time to debug it
- Yet more time to support it in the long run.
So ask yourself if it's really worth that the developers buy/make themselves one or more 1281/2561 radio(s), spend a week of work or so adding support for another processor in openTx, another week adding support for it in C9X and testing everything, then spend multiple days or weeks in the future just to make sure it keeps working correctly over time and feature additions, upgrades normally from one version to another etc... for something you maybe don't need now, and that a year from now by the time you'd need it you'll have bought a new radio, or that "it would be cool" to use now, but which is not THAT important.
Re: ATmega2561 support in openTx
yeah, forget about the other atmega then. just make sure that you will support HORUS. That is the radio I would buy to replace my 9x's
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
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
-
- 9x Developer
- Posts: 2764
- Joined: Fri Dec 30, 2011 11:11 pm
- Country: -
Re: ATmega2561 support in openTx
Sorry guys I don't consider 2561 as a feature, but as a new platform for running the existing features. The first hex is sent to mbanzi for beta testing
Re: ATmega2561 support in openTx
??'
Bertrand, you're tha man, you know that??
EDIT: Wait a second, did you already send him a Hexfor the 2561?? But, what hardware changes are needed?
Hmmm, I think I'm lost now..
Bertrand, you're tha man, you know that??
EDIT: Wait a second, did you already send him a Hexfor the 2561?? But, what hardware changes are needed?
Hmmm, I think I'm lost now..
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
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
-
- 9x Developer
- Posts: 2764
- Joined: Fri Dec 30, 2011 11:11 pm
- Country: -
Re: ATmega2561 support in openTx
Right, I sent it to mbanzi, let's wait for the first tests before going further...
Re: ATmega2561 support in openTx
Mbanzi, could you please post the link where you bought yours from?
Thanks
Thanks
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
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
Re: ATmega2561 support in openTx
The ones I have now are samples from Atmel. There were pretty good prices on the chip from AliExpress too. João, you mean you are thinking about doing a MCU transplant again??
Re: ATmega2561 support in openTx
hhmmm, in the name of science?? is it a valid argument??
I guess you are doing it too? again?
I guess you are doing it too? again?
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
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
Re: ATmega2561 support in openTx
I have to ask the question as to what this chip would buy us and if it really is worth spending time on.. It is fairly cheap at £12 odd in the UK.
Re: ATmega2561 support in openTx
Well I have a spare 9x just sitting there, may as well donate it to science.
-
- 9x Developer
- Posts: 2764
- Joined: Fri Dec 30, 2011 11:11 pm
- Country: -
Re: ATmega2561 support in openTx
In your place I would wait for first mbanzi tests ... I only added the 6th flight mode now (compared to the ATmega128).
Re: ATmega2561 support in openTx
Ok, I will wait for the tests.. I only have1 opentx tx at the moment.. so if I do it, maybe better we know it works first..
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
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
Re: ATmega2561 support in openTx
Finally got the m2561 installed today, and the good news is so far it works perfectly!!! Bertrand, thanks for the hex file that you compiled for me! I have been flying my V929 quad around in the house with no problems at all. The transmitter is a brand new Turnigy with no mods except for the m2561. I will start adding the other mods one by one when I have time to continue the testing. Model screen shows 3,528 free!
I didn't want to solder in the programmer connections until I knew the m2561 worked perfectly, so I rigged a little connector board with a few pogo pins I had lying around from an old dive computer project. Not pretty but it works well:
I didn't want to solder in the programmer connections until I knew the m2561 worked perfectly, so I rigged a little connector board with a few pogo pins I had lying around from an old dive computer project. Not pretty but it works well:
-
- 9x Developer
- Posts: 2764
- Joined: Fri Dec 30, 2011 11:11 pm
- Country: -
Re: ATmega2561 support in openTx
Good to hear! Next steps will be AUDIO and VOICE then!
Re: ATmega2561 support in openTx
Does that mean, if someone is going to replace the cpu, he should take the 2561 instead of the m128 ?
I already have ordered two M128 ond got the QuickChip the last days.
Reinhard
I already have ordered two M128 ond got the QuickChip the last days.
Reinhard
-
- 9x Developer
- Posts: 2764
- Joined: Fri Dec 30, 2011 11:11 pm
- Country: -
Re: ATmega2561 support in openTx
128 is not bad, but 2561 will be better
Re: ATmega2561 support in openTx
Thanks.
So I'll probably go with the 128
Reinhard
So I'll probably go with the 128
Reinhard
Re: ATmega2561 support in openTx
Just wondering what the thoughts are on this for the future.
I do realise that development work on the Taranis has taken precedent over most things for now.
I do realise that development work on the Taranis has taken precedent over most things for now.
Re: ATmega2561 support in openTx
[ot]
Received the M128 yesterday and immediately started to modify one, up to that unmodified radio.
Happy about that it went so easy with the QuickChip, ... until ... , João, guess what ??
I discovered that I had soldered it in by 90 degree rotated
Unsoldered it again (using the same QuickChip material that I had used the first time) and now placed the chip correctly. Most important thing that I found with unsoldering and also with resoldering is, DO USE FLUX.
That QuickChip that I ordered had 5 sticks of about 16 cm long, 1.17 mm thick, and I needed half a stick to remove the m64.
The next step was to set the fuses, where I used my selfmade parallel port programmer and PonyProg2000. And used it also to flash the 128 firmware.
Everything is working now, having 2280 bytes eeprom free with 9 models loaded.
[/ot]
Reinhard
Received the M128 yesterday and immediately started to modify one, up to that unmodified radio.
Happy about that it went so easy with the QuickChip, ... until ... , João, guess what ??
I discovered that I had soldered it in by 90 degree rotated
Unsoldered it again (using the same QuickChip material that I had used the first time) and now placed the chip correctly. Most important thing that I found with unsoldering and also with resoldering is, DO USE FLUX.
That QuickChip that I ordered had 5 sticks of about 16 cm long, 1.17 mm thick, and I needed half a stick to remove the m64.
The next step was to set the fuses, where I used my selfmade parallel port programmer and PonyProg2000. And used it also to flash the 128 firmware.
Everything is working now, having 2280 bytes eeprom free with 9 models loaded.
[/ot]
Reinhard