+ Reply to Thread
Results 1 to 1 of 1

Thread: How to Multiplex 60 inputs

  1. #1
    Heber - Support nigelb's Avatar
    Join Date
    May 2010
    Posts
    26

    Thumbs up How to Multiplex 60 inputs

    We are often asked if it is possible to connect a large number of buttons to x10i the answer is yes, the x10i has a built in multiplexer for reading inputs over a 4ms time slice. and here is how we suggest doing it:

    Code:
    SuperStrict
    
    Framework	heber.x10i
    Import	brl.polledInput
    Import	brl.retro
    
    
    Global x10iBoard:TX10iBoard = New TX10iBoard.Create( encryptedKeyGeneric )
    
    x10iBoard.InputMultiplexing( inputMultiplexEnabled )
    
    Global minputs:usbMultiplexedInput = New usbMultiplexedInput 
    
    Repeat
    
    	x10iBoard.GetMultiplexedInputs( minputs )
    	Print ""
    
    		
    	For Local bits:Int=0 To 3-1
    
    		For Local channel:Int=0 To 4-1
    
    			Print "Byte" + channel + " = " + Bin$( minputs.byMuxInp[channel,bits] )
    		Next
    		
    		Print ""
    	Next
    	
    	Delay(100)
    
    Until KeyDown(KEY_ESCAPE)
    
    x10iBoard.Close()
    x10iBoard = Null
    GCCollect
    
    End
    
    Rem
    4ms Multiplexer                        OP12  OP13  OP14  OP15
    
                                             |     |     |     |
                       ___                   |     |     |     |
    IP0 ----------o---o   o-->|--------------o     |     |     |
                  |    ___                   |     |     |     |
                  o---o   o-->|--------------)-----o     |     |
                  |    ___                   |     |     |     |
                  o---o   o-->|--------------)-----)-----o     |
                  |    ___                   |     |     |     |
                  o---o   o-->|--------------)-----)-----)-----o
                                             |     |     |     | 
                       ___                   |     |     |     |
    IP1 ----------o---o   o-->|--------------o     |     |     |
                  |    ___                         |     |     |
                  o---o   o-->|--------------------o     |     |
                  |    ___                               |     |
                  o---o   o-->|--------------------------o     |
                  |    ___                                     |
                  o---o   o-->|--------------------------------o
    
     
    
     
    
    ) = bridge
    
    O = connection
      ___
    -o   o- = switch
    
    -->|--  = diode 1N4148
    
    Using this schematic you can achieve a 60 input capability using only 15 inputs and 4 outputs.
    EndRem
    Last edited by nigelb; 06-08-2010 at 10:06 AM.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts