Hi Phil,
Sorry for the slow response, I was away in France last week and I’ve only now got around to answering.
Of course, you are 100% correct, 125K baud is possible with 16MHz Atmega328p. I realised this a few weeks after that post but I never got around to posting my findings and my other work on using the Spektrum X1TX0 module. In fact, there is a bit of a story about it all…
The reason we were playing around with the Spektrum X1TX0 module from a DX6i, DX5e, DX4e or DX4 was there was a period when there were few other modules available for 2.4GHz conversions, it was the time between the FrSky DHT being discontinued, but before the XHT was released, the OrangeRx DIY modules were permanently out of stock, Spektrum had discontinued the DM9, nobody much wanted to use the Futaba TM7 FASST modules, the LemonRx module was not announced yet, let alone available and the only alternative was the 4-in-1 multi-protocol modules, but they had there own set of issues at the time.
When I eventually read the Atmega328p data sheet, rather than relying on what I had read elsewhere, I got the UART working at 125K. I added it to the firmware for my LCD encoders, it simultaneously outputs both ppm and DSM serial. To go with this I designed a simple Spektrum module board, with an onboard 3.3V regulator and logic level shifter (5V to 3.3V) and connector for the module, it was designed to piggyback on my GTB encoder boards. There are a few conversions I did with the X1TX0 module still being used at our field. The Spektrum X1TX0 module has only 6 channels and most people seem to want 7 or 8 channels, even though their models don't need that many channels and they're only using a 6 channel Rx so never really took off.
Most people seem to prefer using the simpler Pro Mini Strong/GTS-based encoders for conversions and I had over 80 GTS encoders on the shelf at the time that would be useless if there were no 2.4GHz modules to use them with. The problem using the GTS/Pro Mini Strong with the X1TX0 module was that the Atmega328p UART Tx output is on D1 and on a GTS/Pro Mini Strong that is connected to the DIP switch on these encoders, the only spare output is D0 normally used for ppm output.
The obvious answer was to use a “soft serial output” on D0. I tried various Arduino libraries, but some couldn't do 125K, and others needed an input configuring for the serial Rx (and there were no inputs spare), even though we are not receiving anything, I couldn’t find anything to suit. So I wrote my own bit-bang soft serial function, based on what I'd written for a PIC1684 back in the 90s. I then modified the F3A encoder firmware to have 125K DSM output on D0 (instead of ppm) and run on a GTS or Pro Mini Strong. I never got around to posting this program at the time, as I never finished it 100%. I’ll post it in the “Arduino Stuff” section in a short while, it’s just a few years later than it should have been! Please note it is a proof-of-concept and not tested to my normal standards, but I did fly with it a few times without problem.
With my bit-bang serial, I could set any baud rate, 130K is just as possible as 125K. Out of interest, I tested the range of baud rates the modules would work with (1K baud at a time) and had a surprise, 125K baud was near the lower limit of what would work, most X1TX0 modules centred around 129-130K baud (I found the upper and lower baud that would work and took the centre). What was more interesting was that I’d been given a “faulty” Spektrum X1TX0 module, but it turned out that it worked sporadically at 125K, but worked just fine at 130K baud and “centred” at 133K, what the heck was happening with that one? It’s just like the X1TX0 module is designed to work at 130K, the ATmega used in the DX6i/DX5e/DX4e could only do 125K, but 125K is in the tolerance band that will work with 130K, so Spektrum used it. I might be completely wrong about that, it’s just my observation of a few X1TX0 modules.
The work on this project stopped before I’d finished it for three reasons, the FrSky XHT was launched, LemonRx brought out their DIY hack modules and we worked out how to properly use the 4-in-1 multi-protocol modules. There was no point in using a 6-channel donor module that would cost more to use than a LemonRx module. The only advantage of the X1TX0 module was that it offered “ModelMatch” on my LCD multi-model-memory encoders. I still have 4 or 5 of the X1TX0 module carriers and around 6 Spektrum DX4e I had collected as donors if anybody is interested (but I’m out of GTS encoders).
Spekky advice please
- Mike_K
- Posts: 762
- Joined: 16 Feb 2018, 06:35
- Location: Hertfordshire
Re: Spekky advice please
- Attachments
-
- PPM_F3A_X1TX0_01a.ino
- (22.05 KiB) Downloaded 126 times
- Phil_G
- Posts: 783
- Joined: 15 Feb 2018, 23:32
- Contact:
- Mike_K
- Posts: 762
- Joined: 16 Feb 2018, 06:35
- Location: Hertfordshire
Re: Spekky advice please
I've got a box of unassembled GTS boards from JLCPCB sitting on the workbench, I just haven't had time (or the enthusiasm) to assemble, program and test them yet, I seem to have been away more than at home for the last few months and other non R/C things have to take priority.