saving RCREG to word


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default No optimisation done since it worked.

    Hi Magman,
    I did not optimise the code since I had plenty of time in the way I did it. It may turn out that your pauseus approach may save space and time. If I needed code space or clock cycles I would have checked that method out.

    I reckon a single checksum across all channels uses less time and code than the 100% redundancy approach you are taking with the true/inverted signalling but I agree yours is a safe and simple approach. If I get a bad packet or a bad channel within a packet (out of range or delta too big) I use the last good value for that channel. Given that real data does not jump much from frame to frame this method seems to fly quite well.

    My uplinks are 36 and 2400 MHz using the transmitter in PPM.

    What are you building. Is it an aircraft?

    Cheers
    BrianT
    Last edited by BrianT; - 15th September 2008 at 11:05. Reason: grammar

  2. #2


    Did you find this post helpful? Yes | No

    Default

    Looking over your code closely, I realized something. Do you pause in the TX output for 16 ~ 20ms before starting up your next frame?

    I am not doing that, it may be why I am seeing the results I am seeing. using a continuous back to back output from the TX @ 4800bps I am able to get 4 servo + 2 hardware PWM control. BTW I figured out why my servo is a bit coarse. in your code you multiply with a 2 constant. I am not moving in 2us increments. I am doing the following: 2* (4*byte + 500), So for every crank on the potentiometer I am moving in chunks of 8us, so I am not loosing packets, its my scaling factor....ggeeeezzz.


    yes, it is an aircraft. Actually VTOL.
    Last edited by Macgman2000; - 15th September 2008 at 13:56.

Similar Threads

  1. Read/Write Problem
    By Tobias in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 10th February 2010, 01:51
  2. Minimizing code space
    By Tobias in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th May 2009, 07:25
  3. SEROUT WORD variable problem
    By Tobias in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 19th April 2009, 11:20
  4. DS2760 Thermocouple Kit from Parallax in PicBasicPro
    By seanharmon in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 8th July 2008, 23:19
  5. calculation problem
    By nicolelawsc in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 31st March 2006, 15:23

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts