Page 1 of 1

Analog input problem after m128 upgrade

Posted: Wed Dec 23, 2015 7:50 am
by AshwinRwt
Hi, I recently upgraded my turnigy 9x with m128 (Atmega128a) and I'm getting this strange problem that both the a1 and a3 values are being controlled by the pitch stick, whereas my yaw stick doesn't have any control. I have checked every point with a continuity tester and there are no solder bridges. I have selected 9x/m128 fw. I hope I have the fuses right, I found them on some russian site. Also I get verification error when I try to burn the fw:

Code: Select all

Writing | ################################################## | 100% 105.05s

avrdude.exe: 66790 bytes of flash written
avrdude.exe: verifying flash memory against D:\Program Files (x86)\OpenTX\FW\opentx-9x128-frsky-heli-templates-nosplash-gvars-autosource-autoswitch-dblkeys-battgraph-thrtrace-pgbar-sqt5font-en-2.1.6.hex:
avrdude.exe: load data flash data from input file D:\Program Files (x86)\OpenTX\FW\opentx-9x128-frsky-heli-templates-nosplash-gvars-autosource-autoswitch-dblkeys-battgraph-thrtrace-pgbar-sqt5font-en-2.1.6.hex:
avrdude.exe: input file D:\Program Files (x86)\OpenTX\FW\opentx-9x128-frsky-heli-templates-nosplash-gvars-autosource-autoswitch-dblkeys-battgraph-thrtrace-pgbar-sqt5font-en-2.1.6.hex auto detected as Intel Hex
avrdude.exe: input file D:\Program Files (x86)\OpenTX\FW\opentx-9x128-frsky-heli-templates-nosplash-gvars-autosource-autoswitch-dblkeys-battgraph-thrtrace-pgbar-sqt5font-en-2.1.6.hex contains 66790 bytes
avrdude.exe: reading on-chip flash data:

Reading | ################################################## | 100% 59.74s

avrdude.exe: verifying ...
avrdude.exe: verification error, first mismatch at byte 0x10000
             0x0c != 0x70
avrdude.exe: verification error; content mismatch
Can anyone help? Thanks

Re: Analog input problem after m128 upgrade

Posted: Wed Dec 23, 2015 10:03 am
by jhsa
First problem. Search for shorted pins on the CPU as well as pins that might not be soldered, specially on the left side of the chip. Search for solder blobs shorting components around the chip. Use a good magnifier glass.

Second problem, try to program with "-B 100" (without the quotes) in the extra arguments. This will slow the programming down.

João

Re: Analog input problem after m128 upgrade

Posted: Wed Dec 23, 2015 11:06 am
by AshwinRwt
Hi, I did both of them. I did everything I found on this site. I've been debugging this problems since yesterday, but haven't found a reason yet. Do you think that the analog input problem could be due to the fw not being burnt properly? Because I'm pretty confident on my soldering. I'm heading to the city to buy another mcu (hopefully they stock it). The rest of the radio is working nicely.

Re: Analog input problem after m128 upgrade

Posted: Wed Dec 23, 2015 11:34 am
by jhsa
I am also always pretty confident on my soldering abilities but it's not the first time nor the last that I found shorts, blobs of solder and cold soldering.. :)

That is all that comes to mind at the moment.. Maybe the other guys here will have some more ideas..

João

Re: Analog input problem after m128 upgrade

Posted: Wed Dec 23, 2015 11:37 am
by Kilrah
Did you first program the fuses correctly with a programmer that allows slowing clock down before loading firmware? That's needed on a new chip as it will by default use its internal clock that is too slow to be programmed at full speed.

Re: Analog input problem after m128 upgrade

Posted: Wed Dec 23, 2015 11:48 am
by jhsa
Hmm, I doubt he would have been able to program the fuses without slowing the clock down?
With me it never worked..

João

Re: Analog input problem after m128 upgrade

Posted: Wed Dec 23, 2015 12:07 pm
by MikeB
Double check pin 58 of the processor is soldered to its pad.
Test using a pin or needle and try pushing the pin gently sideways. If it moves, it isn't soldered.
The left horizontal stick follows the right vertical stick in the sequence of analog conversions in the firmware. If there is no input connection on the left horizontal input, then you usally get "feed through" of the previous input, in this case the left vertical stick.

Mike.

Re: Analog input problem after m128 upgrade

Posted: Sun Dec 27, 2015 6:08 pm
by AshwinRwt
Hi, I replaced the micro, and everything was sorted out. Is there any page where pin mapping of the uC is listed for 9x? I tried finding 9x's schematic but with no success, can anyone post a link to the schematic? Thanks

Edit: By pin mapping I mean, which pin is connected to which switch/pot/etc.

Re: Analog input problem after m128 upgrade

Posted: Sun Dec 27, 2015 6:51 pm
by MikeB