by i-Bot » Fri Oct 26, 2007 12:51 pm
by i-Bot
Fri Oct 26, 2007 12:51 pm
I asume you mean the PWM ports at the top of the C3024, not servo ports. These can be changed from 0 to 100% duty cycle with the PWM command.
If you just want on or off, then you can address them as ports with the IN and OUT instruction. I think they are ports 46 and 47.
To drive a low current LED then use a resistor on the output to limit the current. For a higher current LED, you will need to drive an N MOSFET, transistor, or low side driver.
The maximum voltage on the C3024 pins is 5V, so you cannot pull up to 6V directly. If you want to switch power it depends if you need to switch the 6v, or can switch the ground. If you switch the ground the above low side drive will work OK. If you must switch the 6V, you need a high side driver or a P MOSFET. The P MOSFET will need to be driven by a transistor or N MOSFET to drive the gate of the P MOSFET.
I asume you mean the PWM ports at the top of the C3024, not servo ports. These can be changed from 0 to 100% duty cycle with the PWM command.
If you just want on or off, then you can address them as ports with the IN and OUT instruction. I think they are ports 46 and 47.
To drive a low current LED then use a resistor on the output to limit the current. For a higher current LED, you will need to drive an N MOSFET, transistor, or low side driver.
The maximum voltage on the C3024 pins is 5V, so you cannot pull up to 6V directly. If you want to switch power it depends if you need to switch the 6v, or can switch the ground. If you switch the ground the above low side drive will work OK. If you must switch the 6V, you need a high side driver or a P MOSFET. The P MOSFET will need to be driven by a transistor or N MOSFET to drive the gate of the P MOSFET.