|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Inversion of the digital IO pins
I was hoping to use an external EEPROM to store data for our autonomous routine, it uses an I2C interface, but I have code written to bit-bang, so that is ok, but here is my question. I know the pins are inverted as an input, since when they are low, you get a 1 in software, and when they are high, you get a 0. But are they inverted as outputs too?
Thanks |
|
#2
|
|||||
|
|||||
|
Re: Inversion of the digital IO pins
Quote:
|
|
#3
|
||||
|
||||
|
Re: Inversion of the digital IO pins
Quote:
|
|
#4
|
|||||
|
|||||
|
Re: Inversion of the digital IO pins
Quote:
|
|
#5
|
|||||
|
|||||
|
Re: Inversion of the digital IO pins
A pullup does not imply inversion. It just means that when you leave it floating, you will get a logic one on the input. If you have an input connected to it that will pull the input down, then you will get a logic zero as the input.
Matt |
|
#6
|
|||
|
|||
|
Re: Inversion of the digital IO pins
Nevermind, limit switches, use OPEN and CLOSED, not a bit test... bah sorry
Its been a long 6 weeks... (*mutters on about being designer, team leader, and programmer...*) I thought that they made it so that when the switch was closed, the bit read 1, and when it was open it read 0. in user_routines.h Code:
#define OPEN 1 /* Limit switch is open (input is floating high). */ #define CLOSED 0 /* Limit switch is closed (input connected to ground). */ |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Digital Caliper as a Digital Readout on Small Mill | sanddrag | Technical Discussion | 9 | 13-10-2005 22:51 |
| Dynamic Input/Output Changing | Paolo | Control System | 6 | 23-09-2004 19:09 |
| [ECDU]: CHAT-7/19 | Corey Balint | FIRST-related Organizations | 5 | 19-07-2004 23:44 |
| heres the code. y this not working | omega | Programming | 16 | 31-03-2004 15:18 |
| digital inputs not valid just after initialization? | WizardOfAz | Programming | 2 | 26-01-2004 13:21 |