bits

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jeffkqst@yahoo.com

    bits

    incoming data is 12 bit.
    ps = (char *)(data).
    how ps can pass 12 bit data?.
    let's say Acq takes only 8 bit ps.
    Acq(ps);
    jeff




    --
    Sent by jeffkqst from yahoo subdomain of com
    This is a spam protected message. Please answer with reference header.
    Posted via http://www.usenet-replayer.com/cgi/content/new
  • Noah Roberts

    #2
    Re: bits

    jeffkqst@yahoo. com wrote:[color=blue]
    > incoming data is 12 bit.
    > ps = (char *)(data).
    > how ps can pass 12 bit data?.
    > let's say Acq takes only 8 bit ps.
    > Acq(ps);
    > jeff
    >
    >
    >
    >[/color]

    This message is very difficult to make heads or tails of. Please
    provide more information. It might also help to use complete sentances
    rather than segments that may make sense to you but are gibberish to
    others. Right now I have no idea what you are trying to do and so
    cannot help in any way.

    NR

    Comment

    • Howard

      #3
      Re: bits


      "jeffkqst@yahoo .com" <u112792968@spa wnkill.ip-mobilphone.net> wrote in
      message news:l.10632631 32.1534545898@h ost-66-81-69-117.rev.o1.com. ..[color=blue]
      > incoming data is 12 bit.
      > ps = (char *)(data).
      > how ps can pass 12 bit data?.
      > let's say Acq takes only 8 bit ps.
      > Acq(ps);
      > jeff
      >[/color]

      What do you mean that "incoming data is 12 bit"? What data type is that?
      How are you getting this "incoming data"? We can't know how to convert the
      data unless we can see both data types you're dealing with. But if you've
      got 12 bits and want to use only 8 of them, you're going to lose 4 bits of
      information. But I don't even have a 12-bit data type on my machine, nor
      any way to pass such information, either via hardware or software. The only
      way I know of to do that is to use 16-bit data and ignore 4 bits of it.
      -Howard


      Comment

      • Michiel Salters

        #4
        Re: bits

        u112792968@spaw nkill.ip-mobilphone.net (jeffkqst@yahoo .com) wrote in message news:<l.1063263 132.1534545898@ host-66-81-69-117.rev.o1.com> ...[color=blue]
        > incoming data is 12 bit.
        > ps = (char *)(data).
        > how ps can pass 12 bit data?.
        > let's say Acq takes only 8 bit ps.
        > Acq(ps);
        > jeff[/color]

        char* in C and C++ has at least three meanings. It can be a pointer
        to a single char (often 8 bits, but check macro CHAR_BIT to be sure),
        a pointer to an array of chars whose size is stored separately or
        known a priori, or it can be a pointer to a zero-terminated array
        (i.e. all chars up to the first (char)0 0.

        In your case, you know ps points to 12 bits. My guess would be that
        either the bits are packed, in which case you have 2 bytes *(ps) and
        *(ps+1), or unpacked when you have 12 bytes *(ps) till *(ps+11).

        i.e. your case is the second of three, "array, size known a priori"

        Regards,
        --
        Michiel Salters

        Comment

        Working...