|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
rc_dig_in help?
our digital imputs are always set to one no matter what we do. We even defined them as zero right before the code that we were testing and they were still set to one and.. thats not suppost to happen. has anyone else had similar problems?
|
|
#2
|
|||
|
|||
|
Re: rc_dig_in help?
what kind of input are you using, i have been trying to get the gear tooth sensor working but i have no printf right now so i cant see whats going on.
|
|
#3
|
|||||
|
|||||
|
Re: rc_dig_in help?
How are you trying to define an input as zero? What circuitry are you connecting to the input pin?
When you read a digital input, the value you get depends on the voltage on the pin. Ground gives you a zero, and +5 volts gives you a one. The RC input pins have pullup resistors built in, so a pin with no connection is the same as a pin with +5 volts supplied to it. |
|
#4
|
|||||
|
|||||
|
Re: rc_dig_in help?
You don't set digital inputs in the code, so you can try to assign values to them all you want, but .00002 sec. later it will be overwritten by the hardware and nothing will ever take. As Alan said, the digital input values only reflect the voltage seen at the hardware pins.
Last edited by Mark McLeod : 18-01-2008 at 11:49. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Grab Frame - Help Help Help... | nmihailidis | Programming | 2 | 04-03-2007 14:44 |
| section 'InterruptVectorLow' type is non-overlay (was: HELP HELP HELP!!!!!) | naor52 | Programming | 14 | 24-02-2007 01:19 |
| Help: How do we get a teacher to help? (was: Help) | ChaosAlchimey | General Forum | 13 | 21-01-2007 11:57 |