Shop OBEX P1 Docs P2 Docs Learn Events
Flipping a circuit? — Parallax Forums

Flipping a circuit?

RagtopRagtop Posts: 406
edited 2012-01-27 17:58 in General Discussion
Not sure how to even word the question, but the xbee turns on it's PWM0 pin when receiving. I would rather it light an led when not receiving as a warning you have moved out of range.

What kind of circuit would I need to flip that? So that when that pin goes low it causes led to come on and when it is PWM the pin, to keep the led off.

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-01-27 13:11
    That's the RSSI output. If you want to do something really cool with it, consider using a dual-color red/green LED (common anode). The green segment gets driven directly from the RSSI output, through a resistor. The RSSI output also drives a transistor or logic inverter, the output of which couples to the red segment through a resistor. What you end up with is an LED that glows red when there's no signal, gradually changing to yellow, then green as the received signal strength increases.

    -Phil
  • BitsBits Posts: 414
    edited 2012-01-27 13:30
    Or simply use a hex-inverter.
  • $WMc%$WMc% Posts: 1,884
    edited 2012-01-27 17:58
    Turn the LED around and tie it to the +(Vdd) instead of -(Vss)
    '
    When the I/O pin "PWM0" goes low,It will light the LED.
    '
    ****NOTE****
    A logic value of 0 does not necessarily mean the pin(PWM0) is at or near - voltage(Vss), Nor does a logic 1 mean at or near +(Vdd)---Measure the voltage at PWM0 when you know its at logic 0 to make sure if 0 is - or + with respect to GND (Vss) if your not sure.
    '
    I like Phil's idea of a bi-color LED.
Sign In or Register to comment.