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

Parents
  • Hi Joao,

    sorry that my answer come now and not early. I was on biz trip.
    OK - I do contact support directly and was right with thinking about different sources. Now I got a new code and additionally we hav e to use an simulator *.ini file.
    I do a test NOW. Than I'll lock back at the site and if you was here please take your e-mail here than I will send the original code from KEIL .

    And we will solve this

    Stefan
    (I worte directly a terminal program and with this it's working).

Reply
  • Hi Joao,

    sorry that my answer come now and not early. I was on biz trip.
    OK - I do contact support directly and was right with thinking about different sources. Now I got a new code and additionally we hav e to use an simulator *.ini file.
    I do a test NOW. Than I'll lock back at the site and if you was here please take your e-mail here than I will send the original code from KEIL .

    And we will solve this

    Stefan
    (I worte directly a terminal program and with this it's working).

Children