I use P0.29 as an Output pin. I also set P0.30 to be an Output pin, although I don't use P0.30.
I use P1.29 as an I2C Data Output pin. I pass that pin in the I2COUT procedure from Cor_bitbang.c.
I2COUT (29, 26, 0xE0, 1, list1);
Pin P1.29 is the I2C SDA pin, and Pin P1.26 is the SCL pin.
How do I call P1.29 in I2COUT, and not P0.29?
P0.29 vs P1.29
Re: P0.29 vs P1.29
This should be the right code in Cor_bitbang.c.
#define SET_SCL_HIGH INPUT1(scl_pin)
#define SET_SDA_HIGH INPUT1(sda_pin)
#define SET_SCL_LOW {OUTPUT1(scl_pin);LOWx(scl_pin);}
#define SET_SDA_LOW {OUTPUT1(sda_pin);LOWx(sda_pin);}
That works for the I2C interface, but P0.29 will not go high (HIGH(29);) in my Main program.
#define SET_SCL_HIGH INPUT1(scl_pin)
#define SET_SDA_HIGH INPUT1(sda_pin)
#define SET_SCL_LOW {OUTPUT1(scl_pin);LOWx(scl_pin);}
#define SET_SDA_LOW {OUTPUT1(sda_pin);LOWx(sda_pin);}
That works for the I2C interface, but P0.29 will not go high (HIGH(29);) in my Main program.
Re: P0.29 vs P1.29
wouldn't you have to do an offset of 32 or 64 added to the pin number to
come up with the correct IO(pin) value ?? -- Like in the BASIC ??
Just an idea - haven't done much C on the Coridium boards.
olzeke51
come up with the correct IO(pin) value ?? -- Like in the BASIC ??
Just an idea - haven't done much C on the Coridium boards.
olzeke51
Re: P0.29 vs P1.29
The bit banged routines in C as well as BASIC use "pins" 32 through 63 for P1.0 through P1.31
The INx, OUTx, ... are used in the i2c code in C (in cor_bitbang.c) and are defined in coridium_pcb.c
The INx, OUTx, ... are used in the i2c code in C (in cor_bitbang.c) and are defined in coridium_pcb.c
Re: P0.29 vs P1.29
Something is wrong with the I/O. P0.29, P0.10, P0.16, & P2.8 seem to be stuck Low. The rest of the I/O appears to be OK.
Re: P0.29 vs P1.29
You should check what you have connected to those pins. With almost 1500 in the field now, no one else is reporting this.
Re: P0.29 vs P1.29
This is a new problem, they used to work. I have nothing connected to those pins now. I am testing the I/O outputs with the board disconnected from anything but the USB cable.
Is there a common failure mode for just those pins?
Is there a common failure mode for just those pins?
Re: P0.29 vs P1.29
NoIs there a common failure mode for just those pins?
P0.29 and P0.30 have to be both inputs or outputs, mixing input and output on those 2 pins is unpredictable -- NXP "feature"
Re: P0.29 vs P1.29
P0.29, and P0.30 are both set as outputs.
What would cause these outputs to fail in a Low state?
What would cause these outputs to fail in a Low state?
Re: P0.29 vs P1.29
It's something in my program. I commented out most of the program, and now P0.29 does go High.