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

XC161CJ ASC1

Hi,

Does anyone has ever see the XC161CJ ASC1 working on the KEIl debug window?

I can not "printf" nothing!

here is changed HELLO:

P3 |= 0x0401; /* SET PORT 3.10 OUTPUT LATCH (TXD) */
DP3 |= 0x0401; /* SET PORT 3.10 DIRECTION CONTROL (TXD OUTPUT) */
DP3 &= 0xF7FD; /* RESET PORT 3.11 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 |= 0x0C01; /* Configure port pins for serial interface 1 */

printf ("Hello World\n");while(1);


and the putchar:

while (!( ASC1_TIC == (ASC1_TIC | 0x80)) );
ASC1_TIC &= ~0x80;
return (ASC1_TBUF = c);




Any comments will be welcomed of course.

Thanks,
joao