Shop OBEX P1 Docs P2 Docs Learn Events
Just Playing around with objects — Parallax Forums

Comments

  • RaymanRayman Posts: 14,877
    edited 2012-09-09 17:53
    looks like a nice tester. For precision, I would worry about the tolerance on that 3.3k resistor, the actual Vdd (I've seen it be a little off), and the on-state impedance of the output pin (I think it's about 30 Ohms or so). But, for 10% tolerance, it should work in any setup...
  • TappermanTapperman Posts: 319
    edited 2012-09-09 18:13
    Rayman wrote: »
    looks like a nice tester. For precision, I would worry about the tolerance on that 3.3k resistor, the actual Vdd (I've seen it be a little off), and the on-state impedance of the output pin (I think it's about 30 Ohms or so). But, for 10% tolerance, it should work in any setup...

    I should have probably mentioned that the thing works best with an RCTime constant that returns values greater than 160_000 work best. Much lower, and the SCALE object starts to produce large errors. A bug I'll probably look at later.

    And an additional demo line:
    Y.Start(-1,400,2000)                ' for servo use
    
      ' followed in main loop by:
    
      PWM.Servo(Servo_Pin,Y.GetScaled(Pot_Y))
    

    ... Tim
  • TappermanTapperman Posts: 319
    edited 2012-09-10 15:05
    I was hoping someone would have noticed this line:
    DutyCycle := Y.GetScaled(Word[Z.GetScaled(Pot_Y)<<1])
    
    

    And then asked about it ... (looking disappointed), oh well.

    ... Tim
Sign In or Register to comment.