Serial Data Issue


Closed Thread
Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: Serial Data Issue

    Hi,
    I've only looked at this briefly but it looks to me as if you're sending 96 bytes but you are grabbing the data from the 86 first bytes of those:
    Code:
    Term_RX:
    
    ' 4 bytes per iteration, 2 iterations   =   8bytes
    For Counter = 0 to 1
      HSERIN 1000, RX_Bombed, [DEC2 LightSetHR[Counter], DEC2 LightSetMN[Counter]]    'receive light on HR and MN for all 4 channels
    NEXT
    
    ' 4 bytes per iteration, 2 iterations   =   8bytes
    For Counter = 0 to 1
      HSERIN 1000, RX_Bombed, [DEC2 lightoffHR[Counter], DEC2 lightoffMN[Counter]]    'receive light off HR and MN for all 4 channels
    next
    
    ' 4 bytes per iteration, 4 iterations   =   16bytes
    For Counter = 0 to 3
      HSERIN 1000, RX_Bombed, [DEC2 fadesetHR[Counter], DEC2 fadesetMN[Counter]]                                'receive fade in HR value for all 4 channels
    NEXT
    
    ' 4 bytes per iteration, 4 iterations   =   16bytes
    For Counter = 0 to 3
      HSERIN 1000, RX_Bombed, [DEC2 fadeoutHR[Counter], DEC2 fadeoutMN[Counter]]                               'receive fade out HR value for all four channels
    NEXT
    
    ' 4 x 4 bytes = 16 bytes
    HSERIN 1000, RX_Bombed, [DEC4 CH1_Min]                                          'receive min brightness value for all four channels
    HSERIN 1000, RX_Bombed, [DEC4 CH2_Min]
    HSERIN 1000, RX_Bombed, [DEC4 CH3_Min]
    HSERIN 1000, RX_Bombed, [DEC4 CH4_Min]
    
    ' 4 x 4 bytes = 16 bytes
    HSERIN 1000, RX_Bombed, [DEC4 CH1_Max]                                          'receive max brightness value for all four channels
    HSERIN 1000, RX_Bombed, [DEC4 CH2_Max]
    HSERIN 1000, RX_Bombed, [DEC4 CH3_Max]
    HSERIN 1000, RX_Bombed, [DEC4 CH4_Max]
    
    ' 3 x 2 bytes = 6 bytes
    HSERIN 1000, RX_Bombed, [dec2 TimeH]                                            'receive HR value from PC
    HSERIN 1000, RX_Bombed, [dec2 TimeM]                                            'receive Mn value from PC
    HSERIN 1000, RX_Bombed, [dec2 SS]
    
    lcdout $FE,$94,"HH ",dec TimeH
    lcdout $FE,$94+8,"MM ",dec TimeM
    /Henrik.

    EDIT: Ok, seems you found it while I was looking/typing....

  2. #2
    Join Date
    Oct 2009
    Posts
    583


    Did you find this post helpful? Yes | No

    Default Re: Serial Data Issue

    LOL - thanks anyway !

Similar Threads

  1. EEPROM or DATA issue with 16F1503
    By scasale in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 11th October 2013, 04:46
  2. Issue using DATA statement with 16F1933 in PBP2.60
    By bcd in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 10th August 2010, 01:36
  3. Code Issue - select case or 'if' issue - not sure why
    By jamie_s in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 7th October 2007, 08:52
  4. Storing Data Issue
    By ngeronikolos in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 10th June 2005, 13:40
  5. Multiplex serial data
    By Squibcakes in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 19th May 2004, 00:28

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