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
Hi Joao, I tested the support file and it works!! So you can now use the ASC1 interface with simulator/debugger. At this time it is only tested for simulator - but that is not a problem since you can use a terminal program for test under hardware conditions, as we discussed. If you let your mail here - I send you the code and you can adapt as you need. Stefan
Hi Joao, it is solved now by KEIL's support. For a more detailed explanation have a look at: http://www.keil.com/support/docs/2602.htm and http://www.keil.com/support/docs/2601.htm where the first document answers this problem in general and second one is related to use ASc1 directly in µVision2 simulator/debugger. At this way "many thanks to HS from the KEIL support team for a very excellent well done job" Stefan