ARM Technical Support Knowledge Articles

USING BOTH ASC0 AND ASC1 ON THE INFINEON C161CS

Applies to: C166 C Compiler

Answer


Information in this article applies to:


QUESTION

How can I use both The Infineon C161CS's ASC0 and ASC1 with printf in my program?

ANSWER

ASC1 is functionally compatible with the ASC0 except that its registers are NOT bit-addressable (because it is an XBus Peripheral) and it provides only three interrupts. Additionally, the Transmit buffer full interrupt is not implemented on the ASC1.

To output characters, the putchar function (PUTCHAR.C) must be modified to work with ASC0 and ASC1.

One way to accomplish this is to use a global flag to indicate which serial interface (ASC0 or ASC1) to use. You may start by using the existing ASC0 code and then add code for ASC1 using the following guidelines:

  1. Change the SFR's to reflect ASC1 and XBus peripheral byte addressable.
  2. Change the code to reflect that no ASC1 Transmit Buffer Full interrupt exists as in the ASC0.
  3. Include the new modified PUTCHAR.C in your C161CS source code for the project.
  4. Modify your ASC1 initialization code in the main program to be byte addressable.
  5. Re-build all the code now to use ASC1 versus ASC0.

Refer to the Infineon C161CS Data Sheet for more information about ASC0 and ASC1.

SEE ALSO

Article last edited on: 2006-08-28 14:41:49

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential