Search:

Type: Posts; User: nutsNguts

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    1,445

    This was dreadful. var = (int)...

    This was dreadful.





    var = (int) (c_Array[1] << 8) ; //upper BYTE stored
  2. Replies
    3
    Views
    1,445

    ahh yes.. good call. I completely missed that...

    ahh yes.. good call. I completely missed that one.
    Thanks
  3. Replies
    3
    Views
    1,445

    Int storing two chars

    I'm trying to store two different chars to a single Int. Upper B and lower B.
    Is this method correct and the most efficient?



    //sizeof Int = 2 Bytes
    //array of unsigned chars init to hex...
  4. Replies
    8
    Views
    3,768

    int == 4 for c18 I found the error at that...

    int == 4 for c18

    I found the error at that line by debugging, but I believe the error is within funct2. It may be a timing or config. issue.

    Thanks very much!
  5. Replies
    8
    Views
    3,768

    the contents not the address - i should have used...

    the contents not the address - i should have used a different variable name as int address points to a int which contains an address that is used to store to a physical address in funct2

    eg. the...
  6. Replies
    8
    Views
    3,768

    it should be the high bits(byte) for the first...

    it should be the high bits(byte) for the first funct2 call, then the low bits(byte) for the second funct2 call.
  7. Replies
    8
    Views
    3,768

    It's embedded with c18. If you want I could still...

    It's embedded with c18. If you want I could still post a rather large chunk; however I think the rest would be better suited to a microchip forum.

    I posted here because it is a simple snippet in...
  8. Replies
    8
    Views
    3,768

    casting contents of pointer?

    I'm using a pointer to type int inside a function and trying to shift the contents right 8 and cast to a char, to extract a byte for the upper address.
    I get a run-time error.

    This seem logical...
Results 1 to 8 of 8