Masking address bits


Results 1 to 13 of 13

Threaded View

  1. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    mmm, interesting, never tried it before... Thanks Dave!

    Anybody else tried that before and got bad results with this ?

    anyways, here's an easy workaround.

    Code:
    IOExpander var byte[7]
    WichIOExpander var byte
    IOExpander[0]=%11110000
    IOExpander[1]=%11110001
    IOExpander[2]=%11110010
    IOExpander[3]=%11110011
    IOExpander[4]=%11110100
    IOExpander[5]=%11110101
    IOExpander[6]=%11110110
    
    For Loop = 0 to 6
        WichIOExpander=IoExpander[Loop]
        I2cWRITE blah,blah2,WichIOExpander,[SteakBledindePatate]
        pause 5
        next
    OR
    Code:
    IOExpander=%11110110
    
    For Loop = 0 to 6
        I2cWRITE blah,blah2,(IOExpander+Loop),[SteakBledindePatate]
        pause 5
        next
    And if it doesn't work..
    Code:
    WichIOExpander var byte
    IOExpander=%11110110
    
    For Loop = 0 to 6
        WichIOExpander=IOExpander+Loop
        I2cWRITE blah,blah2,WichIOExpander,[SteakBledindePatate]
        pause 5
        next
    Sorry, i can't check any of the above where i am right now.
    Last edited by mister_e; - 18th November 2005 at 07:25.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Bits, Bytes Words and Arrays
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 24
    Last Post: - 14th June 2016, 07:55
  2. Instant Interrupts - Revisited
    By Darrel Taylor in forum Code Examples
    Replies: 772
    Last Post: - 17th February 2016, 22:14
  3. RF Transmitter
    By et_Fong in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th October 2005, 16:34
  4. error on compiling
    By parker in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 16th June 2005, 14:31
  5. 18f452 internal eprom help
    By TONIGALEA in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 13th July 2004, 15:50

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