View Single Post
Old Apr 05, 2010, 01:22 AM
thanhTran is offline
Find More Posts by thanhTran
That tree again!!!!
thanhTran's Avatar
Germantown, MD, US
Joined Sep 2004
6,644 Posts
Quote:
Originally Posted by kapteinkuk View Post
Hitec uses the samme channel ordering as Futaba. But Im not sure what the problem is. If you connect a terminal to PD6 and enable the debug code you can get the channels as seen by the atmega.
Also you can try the new V4.
Here is what the debug says when I un-commented the "rcall ShowChannels"

With Berg6 RX: 0005 0013 0003 0017 0035
With spektrum: 000B 0019 0006 0019 0037

They look almost identical. The reading of channel 3 varies from 0003+ - 005C+ for both receivers when I move the throttle stick. I'm trying to debug the code with AVRStudio. Sometimes, during single stepping, the board armed correctly. I'm not familiar with AVR assembly. Not just assembly alone, your math library is so advance to me, and I just couldn't figure out some of the codes there

ldi t,high(int(@1+0x8000)-0x8000)
...
ldi t,high(int(frac(@1)*0x10000+0x10000)-0x10000)

Apart from thinking you are trying to get the integer and fraction part of the numbers, what do they actually do? What do we get when we add the second param (says, 20, or 100) to 0x8000 and then substract with 0x8000? And why 8000 and 10000?

anyway, I'm going to try out your V4. Thanks very much

-Thanh
thanhTran is offline Find More Posts by thanhTran
Reply With Quote