Shop OBEX P1 Docs P2 Docs Learn Events
Reading Multiple POTS, one POT affects the other — Parallax Forums

Reading Multiple POTS, one POT affects the other

SiCCSiCC Posts: 21
edited 2011-01-08 12:57 in Propeller 1
Sorry if this is a stupid question. I searched but couldnt find an answer.

I have a Prop which needs to read multiple POTs. I have used the parallax example of reading 2 pots in parallel as well as the running RCTime (from Obex) successively. No matter how I code it each POT affects the others value after RCTime. Each uses a different Pin and has its own cap and resistor, the only thing they share is ground.

If its a hardware problem, what am I missing? Or is it software?

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-01-06 21:06
    Please post a schematic and the exact code that's causing the problem. Otherwise, our guess is only as good as yours.

    -Phil
  • ElectricAyeElectricAye Posts: 4,561
    edited 2011-01-06 21:11
    It sounds like you might have the "wiper" of the first pot feeding current to the second pot. Without the pots being connected to anything, have you checked how the resistance changes on the leads as you turn the knobs? You might have your leads switched somehow.
  • JonnyMacJonnyMac Posts: 9,208
    edited 2011-01-06 21:17
    If you want to read two pots in parallel you'll need to use ctra and ctrb in the cog. Here's a routine that might help.
    pub readpots(p1, p1pntr, p2, p2pntr)
    
    '' Reads RC circuits on pins p1 and p2
    '' -- assumes 10K + 0.01uF
    
      ctra := (%01000 << 26) | p1                                   ' ctra in pos detect mode 
      frqa := 1
      ctrb := (%01000 << 26) | p2  
      frqb := 1
                        
      outa[p1] := dira[p1] := 1                                     ' charge caps
      outa[p2] := dira[p2] := 1  
      waitcnt((clkfreq / 1_000) + cnt)
    
      phsa := phsb := 0                                             ' clear counters
      dira[p1] := dira[p2] := 0                                     ' allow caps to discharge   
    
      repeat until ((ina[p1] == 0) and (ina[p2] == 0))              ' let both finish
    
      long[p1pntr] := phsa                                          ' write results
      long[p2pntr] := phsb
    
      ctra := ctrb := 0                                             ' disable counters
    

    This routine is not locked to specific pins or result variables so you can reuse it with multiple pots. For example, if you had a dual-axis on pins 0 and 1, you might call the method like this:
    readpots(0, @xaxis, 1, @yaxis)
    

    Note that you have to pass the address (@) of the result variables you want to use.
  • SiCCSiCC Posts: 21
    edited 2011-01-06 21:51
    thanks guys here is my code. very similar to what jonny posted, it is based off the parallax education pdf. and yes i do pass the addresses of the variables. my code functions great, except that the pots seem to be "touching" each other. when only used with a single POT there is no issue, only when adding a 2nd.
    PUB Main (potPin1,potPin2,potPos1,potPos2)
    
         ctra[30..26] := %01000                   
         ctra[5..0] := potPin1     
                        
         ctrb[30..26] := %01000                    
         ctrb[5..0] := potPin2                 
    
         frqa := 1                               
         frqb := 1
    
         dira[potPin1] := outa[potPin1] := 1        
         dira[potPin2] := outa[potPin2] := 1
    
         waitcnt(clkfreq/100_000 + cnt)  
    
         phsa~                                  
         dira[potPin1]~                              
    
         phsb~
         dira[potPin2]~
    
         waitcnt(clkfreq/60 + cnt)
     
         long[potPos1] := (phsa - 624) #> 0
         long[potPos2] := (phsb - 624) #> 0
    
         dira[potPin1] := outa[potPin1] := 0
         dira[potPin2] := outa[PotPin2] := 0  
    

    i used the schematic off of the stamps in class pdf, page 151. except my setup has 2 seperate sets, not sure how to copy that image onto here.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-01-06 22:15
    This may seem like a stupid question, but are the variables pointed to by potPos1 and potPos2 both longs? What does your call to Main look like?

    -Phil
  • SiCCSiCC Posts: 21
    edited 2011-01-06 22:23
    dont worry, im sure my original question is the one that stupid!

    here is how i call the routine from my program, i just have it repeat for now while testing:

    repeat

    POT.Main(BRAKE_POT,THROTTLE_POT,@potPos1, @potPos2)

    pst.dec(potPos1)
    pst.str(string(","))
    pst.dec(potPos2)
    pst.char($0D)

    waitcnt(clkfreq + cnt)

    when i attach the 2nd POT, it cuts the 1st POT's value in half. its like they are physically attached but they are not. I will try to snap a pic for ref.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-01-06 22:37
    How are potPos1 and potPos2 defined in your main program? Please show your VAR or DAT section -- or better yet, your entire program. BTW, code should be posted in the forum between [noparse]
    and
    
    tags.[/noparse]

    -Phil
  • ferweinsferweins Posts: 1
    edited 2011-01-06 22:40
    stunned)..
  • SiCCSiCC Posts: 21
    edited 2011-01-06 22:49
    ferweins wrote: »
    stunned)..

    thanks ferweins, your 1st post is full of awesome.

    here you go phil. (btw im over in gig harbor, not too far from you.)
    CON
    
      _clkmode = xtal1 + pll16x
     '_xinfreq = 5_000_000
      _clkfreq = 80_000_000
    
      cmd_length        = 256 
    
      GPS_BAUD          = 57600
    
      GPS_RX            = 5
      GPS_TX            = 4
    
      clockDataPin      = 29
      clockClockPin     = 28
      
      cardDataOutPin    = 6
      cardClockPin      = 1
      cardDataInPin     = 2
      cardChipSelectPin = 3             
    
      BRAKE_POT         = 20
      THROTTLE_POT      = 21
    
        
    VAR
    
      long funct     'what are we doing?
    
      long x         'Counter
      long y         'GPS Bytes
      byte z[10]     
    
      long fileNum   'Current log file
    
      long potPos1    'POT Position
      long potPos2
      long potPin    'Current POT
    
      long pot1low
      long pot1high
      long pot2low
      long pot2high
    
      long lapSeconds
      long lapMilli
    
      long leanAngle
       
      
    OBJ
    
      PST    : "Parallax Serial Terminal"
      GPS    : "FullDuplexSerialPlus"
      POT    : "BlakePOT"
      FAT    : "SD2.0_FATEngine.spin"
      NUM    : "Numbers"
    
    PUB Main
    
      GPS.start(GPS_RX, GPS_TX, 0, GPS_BAUD) 'startup GPS serial
    
      FAT.FATEngineStart(cardDataOutPin, cardClockPin, cardDataInPin, cardChipSelectPin, clockDataPin, clockClockPin)
    
      NUM.init
      
      PST.Start(115200)
    
      waitcnt(clkfreq + cnt)
    
      funct       := 56
    
      leanAngle   := 90
    
      lapSeconds  := 0
      lapMilli    := 0
    
    
    
      repeat
    
        if funct == 10                       'read config file
    
            pst.str(string("Firing Up SD Card Reader..."))
            pst.char($0D)  
    
            waitcnt(clkfreq + cnt)
        
            FAT.mountPartition(0, "C")
    
            waitcnt(clkfreq + cnt)
    
            pst.str(string("Mounted File System!"))
            pst.char($0D)
        
              
            FAT.openFile(string("config"), "R")
    
            waitcnt(clkfreq + cnt)
    
            x := 0
    
            repeat while z[x] <> $0D 
    
              z[x] := FAT.readbyte
    
              if z[x] <> $0D
                 x++           
    
            z[x] := $00
    
            filenum:= NUM.fromstr(@z, num#dec)
    
            x := 0
    
            repeat while z[x] <> $0D
    
              z[x] := FAT.readbyte
    
              if z[x] <> $0D
                 x++             
    
            z[x] := $00
    
            pot1low:= NUM.fromstr(@z, num#dec)
    
            x := 0
    
            repeat while z[x] <> $0D
    
              z[x] := FAT.readbyte
    
              if z[x] <> $0D
                 x++             
    
            z[x] := $00
    
            pot1high:= NUM.fromstr(@z, num#dec)
    
            x := 0
    
            repeat while z[x] <> $0D
    
              z[x] := FAT.readbyte
    
              if z[x] <> $0D
                 x++             
    
            z[x] := $00
    
            pot2low:= NUM.fromstr(@z, num#dec)
    
            x := 0
    
            repeat while z[x] <> $0D
    
              z[x] := FAT.readbyte
    
              if z[x] <> $0D
                 x++             
    
            z[x] := $00
    
            pot2high:= NUM.fromstr(@z, num#dec)
            
     
            FAT.closefile
    
            filenum++
    
            pst.str(string("Read Config Complete!"))
            pst.char($0D)
    
            FAT.openFile(string("config"), "W")
    
            waitcnt(clkfreq + cnt)
    
            FAT.writestring(NUM.tostr(filenum, num#dec))
            FAT.writebyte($0D) 
            FAT.writestring(NUM.tostr(pot1low, num#dec))
            FAT.writebyte($0D)
            FAT.writestring(NUM.tostr(pot1high, num#dec))
            FAT.writebyte($0D)
            FAT.writestring(NUM.tostr(pot2low, num#dec))
            FAT.writebyte($0D)
            FAT.writestring(NUM.tostr(pot2high, num#dec))
            FAT.writebyte($0D)
    
            FAT.closefile
    
            pst.str(string("Rewrite Config File Complete!"))
            pst.char($0D)
    
            waitcnt(clkfreq + cnt)
    
            
    
            funct := 3
    
    
    
        elseif funct == 1                        'measure brake pot
    
            pst.str(string("Calibrate Switch Is On!"))
    
            pst.str(string("Calibrating Brake POT..."))
    
            potPin := BRAKE_POT
    
            waitcnt(clkfreq * 2 + cnt)       
    
    '        pot1low := POT.main(potPin)
            
            pst.str(string("Brake Off Value Is "))
            pst.dec(pot1low)
            
            waitcnt(clkfreq * 2 + cnt)
    
            waitcnt(clkfreq * 2 + cnt)
    
    '        pot1high := POT.main(potPin)
    
            pst.str(string("Brake On Value Is "))
            pst.dec(pot1high)
    
            funct := 2
    
              
        
        elseif funct == 2                    'measure throttle POT
    
            pst.str(string("Calibrating Throttle POT...")) 
    
            potPin := THROTTLE_POT
    
            waitcnt(clkfreq * 2 + cnt)
    
            waitcnt(clkfreq * 2 + cnt)
    
    '        pot2low := POT.main(potPin)
    
            pst.str(string("Throttle Off Value is "))
            pst.dec(pot2low)
    
            waitcnt(clkfreq * 2 + cnt)
    
            waitcnt(clkfreq * 2 + cnt)
    
    '        pot2high := POT.main(potPin)
    
            pst.str(string("Throttle On Value is "))
            pst.dec(pot2high)
    
            waitcnt(clkfreq * 2 + cnt)
    
            funct := 3
    
            
    
        elseif funct == 3
        
              
            FAT.openFile(fat.newFile(NUM.tostr(filenum, num#dec)), "W")
    
            pst.str(string("Opened New Log File "))
            pst.dec(filenum)
            pst.str(string("!"))
            pst.char($0D)
    
            waitcnt(clkfreq + cnt) 
                              
    
            funct := 5
            
    
        elseif funct == 5
    
            pst.str(string("Begin Data Logging!"))
            pst.char($0D)
    
            waitcnt(clkfreq + cnt)
            
    
            repeat while ina[7] <> 1
    
                  GPS.getstr(Str1)
    
                  PST.str(Str1)
    
                  FAT.writestring(Str1) 
              
                  FAT.writestring(string(","))
                  pst.char(",")
    
    
    '              POT.RCTime(BRAKE_POT,1,@potPos)        'record current brake POT position
    
    '              potPos := 35000             'set while no pots connected for testing  
    
    '              FAT.writestring(NUM.tostr(potPos, num#dec))
    '              pst.dec(potPos)
    
                  FAT.writestring(string(","))
                  pst.char(",")
    
                  FAT.writestring(NUM.tostr(pot1low, num#dec))
                  pst.dec(pot1low)
    
                  FAT.writestring(string(","))
                  pst.char(",")
    
                  FAT.writestring(NUM.tostr(pot2high, num#dec))
                  pst.dec(pot1high)
    
                  FAT.writestring(string(","))
                  pst.char(",")
                 
    
    '              POT.RCTime(BRAKE_POT,THROTTLE_POT,@potPos1,@potPos2)  'record current throttle POT position
    
    '              potPos := 35000             'set while no pots connected for testing
    
    '              FAT.writestring(NUM.tostr(potPos, num#dec))
    '              pst.dec(potPos)
    
                  FAT.writestring(string(","))
                  pst.char(",")
    
                  FAT.writestring(NUM.tostr(pot2low, num#dec))
                  pst.dec(pot2low)                        
    
                  FAT.writestring(string(","))
                  pst.char(",")
    
                  FAT.writestring(NUM.tostr(pot2high, num#dec))
                  pst.dec(pot2high)  
    
                  FAT.writestring(string(","))
                  pst.char(",")
    
                  FAT.writestring(NUM.tostr(leanAngle, num#dec))
                  pst.dec(leanAngle)
    
                  FAT.writestring(string(","))
                  pst.char(",")
    
                  FAT.writestring(NUM.tostr(lapSeconds, num#dec))          
                  pst.dec(lapSeconds)
    
                  FAT.writestring(string(","))
                  pst.char(",")
    
                  FAT.writestring(NUM.tostr(lapMilli, num#dec))             
                  pst.dec(lapMilli)
    
                  FAT.writebyte($0D)
                  PST.char($0D)
    
           FAT.closefile
    
           funct := 99
    
    
        elseif funct == 98    'Set GPS chip settings.  Hopefully never need to run after initial setup.
    
                  pst.str(string("Firing Up GPS..."))
                  pst.char($0D)
    
                  waitcnt(clkfreq * 2 + cnt)
    
                  gps.str(string("$PMTK314,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*29")) 'set RMC only
                  gps.tx($0D)
                  gps.tx($0A)
                  
                  waitcnt(clkfreq * 2 + cnt)
                  pst.str(string("GPS Set To GPRMC Sentences Only!"))
                  pst.char($0D)
                             
                  gps.str(string("$PMTK220,100*2F")) 'set update rate 10x
                  'gps.str(string("$PMTK220,200*2C")) 'set update rate 5x
                  gps.tx($0D)
                  gps.tx($0A)
    
                  waitcnt(clkfreq * 2 + cnt)
                  pst.str(string("GPS Set To 10hz Update Rate!"))
                  pst.char($0D)
    
                  waitcnt(clkfreq + cnt)
    
                  funct := 10
    
        elseif funct == 97  'just display NMEA output
        
                  
               repeat
    
                  GPS.getstr(Str1)
    
                  PST.str(Str1)
    
                  PST.char($0D)
    
        elseif funct == 56
    
               repeat
    
                   POT.Main(BRAKE_POT,THROTTLE_POT,@potPos1, @potPos2)
    
                   pst.dec(potPos1)
                   pst.str(string(","))
                   pst.dec(potPos2)
                   pst.char($0D)
    
                   waitcnt(clkfreq + cnt) 
    
    
           
    
    
    DAT
    
    Str1 word "1", 0
    Str2 word "1", 0
    Str3 word "1", 0
    
    

    there is plenty of garbage in there, will clean up after everything works. in the above, it starts up my COM's etc and then just repeats funct 56. however i can compile just BlakePOT from the code a few posts ago by hard coding the pins etc, and i get the same results.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-01-06 23:16
    Ha! Neighbors! I'm not seeing it in the program. How sure are you about the pots' ground connection? What happens if you increase the charge time for the cap to, say, 1 ms?

    -Phil
  • ElectricAyeElectricAye Posts: 4,561
    edited 2011-01-07 07:51
    Is this the circuit you are using? Are the component values the same as this?
    570 x 336 - 28K
  • SiCCSiCC Posts: 21
    edited 2011-01-07 10:53
    Is this the circuit you are using? Are the component values the same as this?

    Close, but the first lead from my POT is before the 220ohm, vs after it. That wouldn't cause my problem tho would it? Here is a super crappy cell phone pic, I tried to touch it up some. The 2nd POT setup is on the other half of the board, and is identical.
    640 x 480 - 43K
  • SiCCSiCC Posts: 21
    edited 2011-01-07 10:54
    Ha! Neighbors! I'm not seeing it in the program. How sure are you about the pots' ground connection? What happens if you increase the charge time for the cap to, say, 1 ms?

    -Phil

    I have tried adjusting to much higher than 1ms, no effect.
  • ElectricAyeElectricAye Posts: 4,561
    edited 2011-01-07 11:06
    SiCC wrote: »
    Close, but the first lead from my POT is before the 220ohm, vs after it. That wouldn't cause my problem tho would it? ....

    That 220 ohm resistor is there in case your pot goes to zero ohms. It's a way of ascertaining that the Prop pin doesn't have too much current running through it for whatever reason.

    Have you walked through your circuit with a multimeter to read the voltage values all along the circuit? I'm guessing you're sure to see a voltage sagging or shorting or not grounded somewhere.

    Also, I can't really tell what's going on in your cellphone photo. Can you take another shot?
  • SiCCSiCC Posts: 21
    edited 2011-01-07 11:11
    Will take another shot with a real camera this evening. Ive checked for continuity but havent checked voltage, I will try that.
  • ElectricAyeElectricAye Posts: 4,561
    edited 2011-01-07 11:18
    Some breadboards have a line of holes that are supposed to be used for Power or Ground, etc. Some of them might look like a continuous line but in reality they are not connected all the way across so you sometimes have to jump one side of that line to the other. Be sure these "bus bars," or whatever they are called, are actually connected the way you think they are. Your multimeter will help with that. But that's just a guess on my part.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-01-07 11:21
    Please double-check the grounding of the pots. The only way I can see that you'd get an interaction between them is if their ground leads were connected together but not adequately grounded.

    -Phil
  • StefanL38StefanL38 Posts: 2,292
    edited 2011-01-07 11:21
    Hello and welcome SiCC

    Feel free to post as many simple and basic questions as you like.

    The members in this forum are really friendly and patient even with the
    most basic questions. I often think the propeller-chip is a microcontroller
    that is attractive to people that are very open-minded and therefore patient.

    If you look through the threads of this forum you will find basic questions
    and high advanced questions and threads. So this is a place for everyone.

    From beginners learning how to code for the first time up to assembler-tweaking-freakin-freaks doing things that make the brains of other assembler-tweaking-freaks SPIN in twisted-circles ;-)

    Parallax and the members of this forum always like to improve the
    "feel-at-home-factor" as much as possible.

    You wil NEVER get a "RTFM" (read that f... manual) as an answer.
    You will get good will and direct help or a detailed hints WHERE in the manual more detailed information can be found.


    If you want to accelarate the solution of your problems you should attach your COMPLETE code
    and a SCHEMATIC that shows ALL Pots of your circuitry and how they are connected.
    The picture that you attached does not explain everything. (Except that you use the unusual color red for
    ground. (Usually ground is black or blue and red is +3.3V or +5V (=Vdd)

    Take a look at the attached picture to learn how to archive your SPIN-code with a few mouse-clicks
    and how to upload it to the forum

    Upload a SCHEMATIC the same way. (I mean a symbolic drawing) of your complete circuitry)

    Without this details everything is guessing through the fog.

    best regards

    Stefan
  • Clock LoopClock Loop Posts: 2,069
    edited 2011-01-07 11:43
    I had this same problem with reading 12 pots using the same cog. The way I solved it was by making sure each pot charges and discharges one at a time, and for enough time.

    Use RCTIME to calculate your cap/pot curve.

    I read 12 pots in a single cog, and the values don't cross modify (except a few points)

    I changed the way I wired my pot/rc circuit, and also added a large cap very near the props power pins, i also use tantalum caps in the rc circuit

    You can look at my schematic and code to see how my black box v2.0 works.

    http://forums.parallax.com/showthread.php?115258-TheBlackBox-Release-v2.0-Propeller-HSS-FX-Sequencer-with-Digital-Audio-SPDIF
  • SiCCSiCC Posts: 21
    edited 2011-01-07 18:24
    To slow things down I changed the program to below. It increased the values, but both POTs still chop the other's value.


    Main Program:
               repeat
    
                   POT.Main(BRAKE_POT,@potPos1)
    
                   pst.dec(potPos1)
                   pst.str(string(","))
    
                   waitcnt(clkfreq + cnt)
    
                   POT.Main(THROTTLE_POT,@potPos1)
    
                   pst.dec(potPos1)
    
                   pst.char($0D)
    
    
                   waitcnt(clkfreq + cnt)
    
    

    POT.Main:
    PUB Main (potPin1,potPos1)
    
         ctra[30..26] := %01000                     ' Set mode to "POS detector"
         ctra[5..0] := potPin1                           ' Set APIN to 17 (P17)
    
                              ' Set APIN to 17 (P17)
    
         frqa := 1                            ' Increment phsa by 1 for each clock tick
    
    
    
         dira[potPin1] := outa[potPin1] := 1               ' Set pin to output-high
    
         waitcnt(clkfreq / 5 + cnt)          ' Wait for circuit to charge
    
    
         phsa~                                   ' Clear the phsa register
    
         dira[potPin1]~                               ' Pin to input stops charging circuit
    
    
         waitcnt(clkfreq / 5 + cnt)
     
         long[potPos1] := (phsa - 624) #> 0
    
    
         dira[potPin1] := outa[potPin1] := 0
    
    
  • SiCCSiCC Posts: 21
    edited 2011-01-07 18:29
    Here is a better shot of my board. The blue & white/blue are the Prop Pins, the Red & Red/White are the POT leads and the solid Red wires go to Vss.

    The colors mean nothing. I know they are wrong :)
    868 x 1020 - 800K
    pot.jpg 799.8K
  • SiCCSiCC Posts: 21
    edited 2011-01-07 18:33
    Please double-check the grounding of the pots. The only way I can see that you'd get an interaction between them is if their ground leads were connected together but not adequately grounded.

    -Phil

    Im not really sure how to check this other then I have good cotinuity from any Gnd to any Gnd anywhere in the project. Is there a better test?
    Clock Loop wrote: »
    I had this same problem with reading 12 pots using the same cog. The way I solved it was by making sure each pot charges and discharges one at a time, and for enough time.

    Use RCTIME to calculate your cap/pot curve.

    I read 12 pots in a single cog, and the values don't cross modify (except a few points)

    I changed the way I wired my pot/rc circuit, and also added a large cap very near the props power pins, i also use tantalum caps in the rc circuit

    You can look at my schematic and code to see how my black box v2.0 works.

    http://forums.parallax.com/showthread.php?115258-TheBlackBox-Release-v2.0-Propeller-HSS-FX-Sequencer-with-Digital-Audio-SPDIF

    I glanced at this at work, going to take a better look this evening. Thanks for the info, hopefully Ill find my cure.
  • StefanL38StefanL38 Posts: 2,292
    edited 2011-01-08 01:39
    Hi SiCC,

    OK I will comment on the picture.

    Aha you are using a propeller demo board.
    you are using resistors and capacitors
    the wires have different colors

    I guess the blue-white wire is connected to Vdd not a prop-pin as you wrote

    for the rest. Hey I haven't wired this board. So it is UNCLEAR to me how the whole thing is connected to each other

    You really should provide a SYMBOLIC schematic. Usually I'm a patient guy. But in this case you are not doing yor homework.
    I'm willing to help if you do your homework.

    Your homework is to draw a schematic of how you wired the things together and creating an ARCHIVE of your SPIN-files
    by clicking Mainmenu of the propellertool File - archive - project

    Please explain to me what is so hard about drawang a schematic by hand and take a picture of it?
    What's so hard about creating an archive with the propellertool?

    best regards

    Stefan
  • ElectricAyeElectricAye Posts: 4,561
    edited 2011-01-08 08:06
    SiCC wrote: »
    Im not really sure how to check this other then I have good cotinuity from any Gnd to any Gnd anywhere in the project. Is there a better test? .....

    Yes, there is more to testing than mere continuity. If you have a voltmeter or multimeter, connect its negative lead (usually black) to your ground (Vss) and then use the positive lead (usually red) to probe around and check voltages and to check how those voltages change as you turn your pots or provide commands to your Propeller pins. If you do not have a multimeter, then it's about time you get one, cost maybe $10 to $20 at Radio Shack, even Home Depot sells them, maybe even Walmart. If you do have a multimeter, then now is the time to learn to use it. Just google "How to use a multimeter?"

    Also, drawing schematics helps others help you. It's a very good practice to develop. Sometimes the mere process of drawing your circuit will allow you to see potential problems - no pun intended.

    Good luck!
  • JonnyMacJonnyMac Posts: 9,208
    edited 2011-01-08 10:04
    Deleted by Jon
  • SiCCSiCC Posts: 21
    edited 2011-01-08 12:31
    Also, drawing schematics helps others help you. It's a very good practice to develop. Sometimes the mere process of drawing your circuit will allow you to see potential problems - no pun intended.

    Good luck!

    I figured snapping a pic was better since you had already posted the schematic I was using yesterday. Anyhow, problem resolved. I cannibalized pins 21 & 22 on the demo board since I had run out of Pins [0-8]. They work fine for serial, tested at 115200 baud, but when used for measuring POTs they screw the readings. I rearranged my GPS to use these pins and moved the POTs to pins 4/5. Working great now.

    Thanks for the help everyone. Sorry to have offended you and your patience Stefan, next time I will remember to bring my crayons.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-01-08 12:57
    SiCC wrote:
    I cannibalized pins 21 & 22 on the demo board since I had run out of Pins [0-8]. They work fine for serial, tested at 115200 baud, but when used for measuring POTs they screw the readings.
    Yeah, that was an unfortunate choice of pins, since they already have pathways to ground through LEDs. But they're not connected together in the VGA DAC (as 20 and 21, or 22 and 23 are), so I'm still not quite sure where the dependency came from.

    -Phil

    Correction: I just relooked at your code. You did use 20 and 21, which are joined resistively in the DAC. Case closed.
Sign In or Register to comment.