Bit stuffing problem!


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    atomski's Avatar
    atomski Guest


    Did you find this post helpful? Yes | No

    Default

    Sorry, abt that my bad Here are the defines:

    DEFINE OSC 20
    Rx_Data Var Byte[7]
    Rx_Byte Var Byte
    Rx_Bit Var Bit
    Pulse Var Word
    I Var Byte
    w Var Byte

    ... and it's not .byte7 and .byte0 it's byte.bit7 and byte.bit0

    BTW I found a typo in my snippet:

    Rx_Byte = Rx_Byte << 1
    Rx_Byte.0 = Rx_bit

    the actual code is:

    Rx_Byte.0 = Rx_bit
    Rx_Byte = Rx_Byte << 1


    I'm trying to receive 7 bytes of data, each containing 6 bits
    (bit.7 and bit6 are not used). Data received per w loop looks
    like this: 01001000 = $48 but I've sent 00100100 = $24. So,
    you see all bits are shifted one place to the left towards MSB.
    What am I doing wrong here?

    YZ7REA Vladimir
    Last edited by atomski; - 1st November 2004 at 09:03.

Similar Threads

  1. Bits, Bytes Words and Arrays
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 24
    Last Post: - 14th June 2016, 08:55
  2. PICBasic newbie problem
    By ELCouz in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 12th February 2008, 01:55
  3. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 18:27
  4. DMX512 Problem ..Schema+Code
    By programmer07 in forum mel PIC BASIC Pro
    Replies: 21
    Last Post: - 21st March 2007, 16:39
  5. USART interrupt not interrupting right
    By Morpheus in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 6th March 2005, 02:07

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