On the R6000, I use PC3 as the serial TXC port. PC2 is set as normal function. However, when the serial port C is opened, PC2 suddenly becomes TXC. What’s going on? Anyone seen this happen?
The code:
WrPortI (PCDDR, &PCDDRShadow, PCDDRShadow | 0x0F); //PC[3:0] outputs.
WrPortI (PCDCR, &PCDCRShadow, PCDCRShadow & 0xF0); //PC[3:0] totem pole outputs.
WrPortI (PCALR, &PCALRShadow, PCALRShadow & 0x3F); //PC[3] is TXC.
BitWrPortI (PCFR, &PCFRShadow, 1, 3); //PC[3] is alternate function.
//Okay to here, PC2 can be toggled. Then…
serCopen (9600); //and PC2 becomes TXC.