We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I am trying to write code for the second serial port on the C167. I seem to be having major trouble. I have read that port pins 3.0 and 3.1 are Tx and Rx respectively and then from other sources that 3.8 and 3.9 are tx and rx respectively. Can anyone help? P3 |= 0x0001; /* SET PORT 3.0 OUTPUT LATCH (TXD) */ DP3 |= 0x0001; /* SET PORT 3.0 DIRECTION CONTROL (TXD OUTPUT) */ DP3 &= 0xFFFD; /* RESET PORT 3.1 DIRECTION CONTROL (RXD INPUT) */ ASC1_TIC = 0x80; /* SET TRANSMIT INTERRUPT FLAG */ ASC1_RIC = 0x00; /* DELETE RECEIVE INTERRUPT FLAG */ ASC1_BG = 0x40; /* SET BAUDRATE TO 9600 BAUD @ 20MHz */ ASC1_CON = 0x8011; /* SET SERIAL MODE */ ALTSEL0P3 |= 0x0003; /* Configure port pins for serial interface 1 */ #endif