cmucam3-hardware (#1) - Expansion Port GPIO RX2, TX2, MOSI, CS, MISO (#199) - Message List

Expansion Port GPIO RX2, TX2, MOSI, CS, MISO

Hi,

I need help to set-up those pin ( 0.5, 0.6, 0.8, 0.9, 0.14 ) on Expnsn GPIO pin. At the momment i only have RX2 and TX2 address. Please let me know how to program the rest of the pin.

i did program RX2 n TX2, unfortunetely RX2 doesnt doing as it suppose to do. I did everything shown in this link below:- http://www.cmucam.org/discussion/1/50

i manage to get TX2 working properly but not RX2. Is the address correct? #define RX2_PIN 0x00000100. Please let me know where i can find those address on the datasheet. I look in LPC2106 but out of luck.

Any hints would be apprieciated. Thanks

Here how i program the code

// in cc3_pin_defines.h i add --------------------------------------

#define _CC3_GPIO_RX_2 0x00000100 // GPIO RX2

#define _CC3_GPIO_TX_2 0x00000080 // GPIO TX2

// in cc3.c -----------------------------------------

REG (PCB_PINSEL0) = (REG (PCB_PINSEL0) & 0xFFFF0000) | UART0_PCB_PINSEL_CFG; //| 0x50;

.

.

REG (GPIO_IODIR) = _CC3_DEFAULT_PORT_DIR | _CC3_GPIO_RX_2 | _CC3_GPIO_TX_2;

.

.

.

.

void cc3_gpio_set_state (uint8_t select, bool state) {

if (state) {

switch (select) { case 0:

REG (GPIO_IOSET) = _CC3_GPIO_RX_2; break;

case 1:

REG (GPIO_IOSET) = _CC3_GPIO_TX_2; break;

}

} else {

switch (select) { case 0:

REG (GPIO_IOCLR) = _CC3_GPIO_RX_2; break;

case 1:

REG (GPIO_IOCLR) = _CC3_GPIO_TX_2; break;

}

}

}

// in cc3.h, i add ------------------------------------------

void cc3_gpio_set_state (uint8_t gpio, bool state);

// in main.c i wrote ----------------------------------------

cc3_gpio_set_state(0, true);

cc3_gpio_set_state(1, true);

i have compile ( make in hal folder directory before make in project folder ) and no error shown. I run the hex file and check the voltage on both pin. Unfortunetel RX2 doesnt goes 3V but TX2 did shows 3V.

Please help me :(

thanks in advance...