This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to change the voltage level on GPIO

Other Parts Discussed in Thread: CC2540

Hi,

   Thanks for the help, and I was able to program the GPIO and turn the voltage on and off. However, I was only getting 1.4V on P2.0 which connected to P10.1 on the board. I need a higher voltage level to trigger my relay, is there a way to change the voltage level to 3.3v?  How do I do that? thanks.

  • Hi,

    For P2.0 interconnection please refer to CC2530ZDK User’s Guide (Rev. B), Appendix A, 

    Sheet 1(1) - Connector P2.19, Sheet 1(7) P10.1 and P10.2, Sheet 3(7) Connector P6.19

    and P20.19, Sheet 7(7) output of the cascaded AND gates.

    Are you getting the 1.4V on P10.1 (P2.0) when you connecting the relay?

    The output voltage should be very close to the supply voltage (in your case is 3.3V, from what I understand)?

    Getting 1.4V on output suggest that you have a ~1K "pull-down" resistor that is connected between P2.0 and

    ground. Also, it may be that this resistance is relay internal (relay's input resistance), in that case you need to

    place buffer between P2.0 and P10.1 (I believe that P10.1 eventually connected to relay).

  • Hi, thanks for your reply. When I took the measurement of the voltage level for the pin, it wasn't connected to the relay, there shouldn't be any pull-down, unless its internal to the board. I was surprised why it didn't get supply voltage on the SmartRF, which is 3.3V.

    We tried to use battery as power source, and usb as power source, we consistently got 1.4v.

    I don't think it will make a difference, but I am using a CC2540, and a SmartRF EB 05, 1.8.1 revision.

  • Xin Sun1 said:
    I don't think it will make a difference, but I am using a CC2540, and a SmartRF EB 05, 1.8.1 revision.

    Well, you are right, it makes no difference. If you have smartRF05BB, you can test it there,

    next step would be to take CC2540EM as is (without mounting it on smartRF05EB/BB), connect it to 3.3V power

    supply, and measure the voltage on P2.0, it is the most accurate way, since you have nothing connected to the pin.

  • Don't need to program the CPU to make the p2.0 GPIO and output and make it high? If i don't connect it to any board, I am not sure how I can enable that?

    TIABO, what are you thoughts on this? Why do i see 1.4V voltage instead of 3.3v?

  • Xin Sun1 said:
    Don't need to program the CPU to make the p2.0 GPIO and output and make it high? If i don't connect it to any board, I am not sure how I can enable that?

    Excuse me, I was making assumptions once again. :)

    First, add some code that sets this pin high followed by infinite loop, i.e while() , then download it to your target,

    while it's mounted on smartRF05EB. Then disconnect the cc2540EM, connect it to power supply, and measure

    the voltage.