This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Changing port selection structure

Hi,

I'm tring to change the port selection structure to use P1 as bidirectional.
I use the following C instructions.

SYSCON |= 0x40;
IP1 |= 0x80;
DIR1  &= 0x00;
The first instructions executed, I lose the serial connection with the uVision's debugger. I think I have change the mode for all the controller port and then reset the serial port pins.
Can I apply this bidirectional mode only for P1, or is it possible to restore the serial connection ?
(I'm using the autobaud mode 7 when compiling the Mon-51)

Thanks!
Jean-Luc

Parents
  • Thank you for your help.
    I use the SAF-C509-LM.
    I've found that setting the direction register for P3 to use P3.0 (RXD0) as input just after

    SYSCON |= 0x40;
    restore the serial connection. But I can not run the programm step by step before these two instructions are executed. I want to try an other way: modifying the MON51 INSTALL.A51 file to recreate a new MON51.HEX with these options.

Reply
  • Thank you for your help.
    I use the SAF-C509-LM.
    I've found that setting the direction register for P3 to use P3.0 (RXD0) as input just after

    SYSCON |= 0x40;
    restore the serial connection. But I can not run the programm step by step before these two instructions are executed. I want to try an other way: modifying the MON51 INSTALL.A51 file to recreate a new MON51.HEX with these options.

Children