Multiplexer channel selection


Results 1 to 18 of 18

Threaded View

  1. #3
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink

    hi,

    your answer is "something like that"

    ... but as the PIC will perform the A/D conversion ... a Porta Analog input has some good chance to be in use ... if you do not use another ADC input ( PortE 0,1 or 2 for a 16F877a )


    without any headaches ... it gives

    Code:
    Porta.5 = 0                ' Enable the Mpxer
    
    for I = 0 to 15
    
     Porta =  (Porta & %11000001 ) + (I *2)  ' Keep Porta.5 low, Porta.0,6,7 as is, and Porta1-4 select the input
     Pause 5                               ' to stabilize Mpxer Output voltage
     ADCin Portx.y, value[I]           ' Portx.y is where the Mpxer output is connected ...
                                               'value[I] is the table location corresponding to the cell
    NEXT I
    
    .
    .
    .
    too simple !

    Alain

    PS: May be someone could explain me why writing [] with UPPERCASE I inside the brackets show
    Code:
    [I]
    ...
    Last edited by Acetronics2; - 14th May 2008 at 18:11.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

Similar Threads

  1. Best way to shut down HPWM channel?
    By LetTheSmokeOut in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 26th January 2010, 22:01
  2. Timer + rc5
    By naga in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 19th November 2009, 07:56
  3. Hserin
    By [email protected] in forum Serial
    Replies: 11
    Last Post: - 16th December 2008, 18:49
  4. 18F1320 ADC multiple channel select
    By jmgelba in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 28th November 2005, 21:40
  5. 16F819 ADCIN Channel Select?
    By modifyit in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 27th April 2005, 18:31

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