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

configuration/downloading help

Having problems when debugging. Stepping halts when a line of code with port 3 is encountered (ie P3 = 0x07). I'm getting timeout error messages. Also, P1.7 stays on constantly, is this due to A17 being configured for this port bit? Are both problems due to board configuration? Any help with downloading my program into an external eprom is also appreciated. The microcontroller is a 80C251SB. I'm new at this and totally in the dark.

  • 1. If you configure P1.7 for A17 use, then you can't use it as a general purpose I/O pin. Since it's configured as an address line, it probably is wigglin' real fast and the LED just "appears" to stay on.

    2. If you use the on-chip serial port (on P3), writing a value to P3 interrupts the serial communication and probably makes you lose connection with the PC when debugging. To solve this problem, make sure you don't affect the serial port lines when you write to P3.

    Jon

  • Thanks for the reply. I am using the external UART so I am thinking this should not affect port 3. I would like to use all of port 1 and port 3 as general I/O. The manuals suggest that P1.7 comes factory configured as A17. I would like to change this to a regular I/O but haven't been able to figure out how to reconfigure the ports. Any suggestions?

  • Take a look at the configuration bytes. They control how P1.7/A17 is used.

    Jon

  • With port 1, I guess I will need to reconfigure the configuration bytes to make P1.7 an I/O pin. With port 3, I'm still kinda baffled. I need 4 pins from port 3 to control an 8255, can this be done? Can pins from port 3 be used as general I/O pins rather than RXD, TXD, RD, WR etc.?

  • Can pins from port 3 be used as general I/O pins rather than RXD, TXD, RD, WR etc.?

    /RD and /WR can be used if you don't have external RAM/ROM. However, if that's the case, P0 and P2 can be used as well.

    Jon