Weird code problem


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Aug 2007
    Location
    Mississauga, Ontario, Canada
    Posts
    29


    Did you find this post helpful? Yes | No

    Default

    Code:
    You can, but you need to make sure you don't exceed the array boundary.
    
    A 4 word array only goes from 0 to 3. Not 0 to 4.
    I see... I had incorrectly assumed it goes from 0 to 4. Duly noted.
    I will give it a try and report back...

    thank you for the pointers...

    Alex

  2. #2
    Join Date
    Aug 2007
    Location
    Mississauga, Ontario, Canada
    Posts
    29


    Did you find this post helpful? Yes | No

    Talking

    Bruce...

    that did it! The transmitter now spits out good data.
    In addition to the increase in the array size, I also had to make the following change from:

    Code:
    EncodedData var word [5]

    To:
    Code:
    EncodedDataLow var Byte [5]
    EncodedDataHigh var byte [5]
    For some reason the splitting the manchester word into EcodedData.LowByte and EncodedData.Highbyte didn't quite work, and so I ended up creating sepatate bytes for the high and low ends of the manchester word.
    Not sure why it didn't work in the first place but it doesn't matter now. I might revisit this issue at a later date.

    Thank you for steering me in the right direction. This would have never crossed my mind - must be a habit from my old QBasic programming days.



    Alex

Similar Threads

  1. Problem compiling EasyHID code
    By mindthomas in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 25th August 2010, 20:46
  2. MN1307 sample code problem
    By ngeronikolos in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 20th November 2008, 20:41
  3. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  4. PIC18F got some weird problem?
    By NatureTech in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 19th February 2007, 16:18
  5. Servo Code problem
    By ALFRED in forum General
    Replies: 1
    Last Post: - 2nd March 2006, 03:30

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