<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>XC161CJ ASC1</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/16328/xc161cj-asc1</link><description> Hi, 
 
Does anyone has ever see the XC161CJ ASC1 working on the KEIl debug window? 
 
I can not &amp;quot;printf&amp;quot; nothing! 
 
here is changed HELLO: 
 
P3 |= 0x0401; /* SET PORT 3.10 OUTPUT LATCH (TXD) */ 
 DP3 |= 0x0401; /* SET PORT 3.10 DIRECTION CONTROL (TXD</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: XC161CJ ASC1</title><link>https://community.arm.com/thread/134189?ContentTypeID=1</link><pubDate>Fri, 13 Jun 2003 00:23:56 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:0c0d8af0-d7e2-4aa9-baa1-52494a462470</guid><dc:creator>Stefan  Fricke</dc:creator><description>&lt;p&gt;Hi Joao,&lt;br /&gt;
&lt;br /&gt;
it is solved now by KEIL&amp;#39;s support.&lt;br /&gt;
For a more detailed explanation have a look at:&lt;b&gt;&lt;br /&gt;
&lt;a href="http://www.keil.com/support/docs/2602.htm"&gt;http://www.keil.com/support/docs/2602.htm&lt;/a&gt;&lt;br /&gt;
&lt;/b&gt;and&lt;b&gt;&lt;br /&gt;
&lt;a href="http://www.keil.com/support/docs/2601.htm"&gt;http://www.keil.com/support/docs/2601.htm&lt;/a&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
where the first document answers this problem in general and second one is related to use ASc1 directly in µVision2 simulator/debugger.&lt;br /&gt;
&lt;br /&gt;
At this way &amp;quot;many thanks to HS from the KEIL support team for a very excellent well done job&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Stefan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: XC161CJ ASC1</title><link>https://community.arm.com/thread/122000?ContentTypeID=1</link><pubDate>Thu, 12 Jun 2003 08:40:07 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:416178d5-a2e0-4378-9c0d-b9c4337ce85e</guid><dc:creator>Stefan  Fricke</dc:creator><description>&lt;p&gt;Hi Joao,&lt;br /&gt;
&lt;br /&gt;
I tested the support file and it works!! So you can now use the ASC1 interface with simulator/debugger.&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you let your mail here - I send you the code and you can adapt as you need.&lt;br /&gt;
&lt;br /&gt;
Stefan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: XC161CJ ASC1</title><link>https://community.arm.com/thread/110361?ContentTypeID=1</link><pubDate>Thu, 12 Jun 2003 07:02:17 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:cdc011b5-a787-4f01-97e3-f0d70eab67a5</guid><dc:creator>Stefan  Fricke</dc:creator><description>&lt;p&gt;Hi Joao,&lt;br /&gt;
&lt;br /&gt;
sorry that my answer come now and not early. I was on biz trip.&lt;br /&gt;
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.&lt;br /&gt;
I do a test NOW. Than I&amp;#39;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 .&lt;br /&gt;
&lt;br /&gt;
And we will solve this&lt;br /&gt;
&lt;br /&gt;
Stefan&lt;br /&gt;
(I worte directly a terminal program and with this it&amp;#39;s working).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: XC161CJ ASC1</title><link>https://community.arm.com/thread/95540?ContentTypeID=1</link><pubDate>Tue, 03 Jun 2003 05:11:24 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:97964886-084c-4a11-b7f4-558508f91a4f</guid><dc:creator>Stefan  Fricke</dc:creator><description>&lt;p&gt;Hi Joao,&lt;br /&gt;
&lt;br /&gt;
I do a test and you are right.&lt;br /&gt;
It seems the library was created with different code, since I see in disassembly window ASC0_TIR instead ASC0_TIC_IR.&lt;br /&gt;
&lt;br /&gt;
I had create a own file and translate as object and than link it as I told you,&lt;br /&gt;
the routine is called, but with same result:&lt;br /&gt;
&lt;br /&gt;
Blocking in the while-Loop waiting for the flag.&lt;br /&gt;
As workaround you may debug with aterminal program ?&lt;br /&gt;
This works as you think with a direct write to ASC1_TBUF.&lt;br /&gt;
&lt;br /&gt;
For simulator I can not solve it at the moment. Sorry !&lt;br /&gt;
&lt;br /&gt;
I am back next week. If you have time or solution I will look back for my or your solution.&lt;br /&gt;
&lt;br /&gt;
Stefan&lt;br /&gt;
&lt;br /&gt;
Otherwise can you directly ask the support, why the disassemblys are different ?&lt;br /&gt;
May be we can get the code of the printf/putchar for Xc16x devices to rebuild the library.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: XC161CJ ASC1</title><link>https://community.arm.com/thread/71514?ContentTypeID=1</link><pubDate>Tue, 03 Jun 2003 04:32:53 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b8966ba1-5694-413d-8035-f23fe02b2e5e</guid><dc:creator>joao martins</dc:creator><description>&lt;p&gt;Thanks Stefan,&lt;br /&gt;
&lt;br /&gt;
About the pins: It is OK, sorry about the comments but has you probaby noted I have changed the HELLO WORLD example from KEIL.&lt;br /&gt;
&lt;br /&gt;
I believe that the difference between your startup code and my is that you use the fractional divider and I do not.&lt;br /&gt;
&lt;br /&gt;
Nevertheless I copied your code to try it. No success.&lt;br /&gt;
&lt;br /&gt;
About the putchar: Yes I know that the original putchar uses ASC0.&lt;br /&gt;
I have changed to :&lt;br /&gt;
&lt;br /&gt;
signed char putchar (signed char c)&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
  while (!ASC1_TIC_IR);&lt;br /&gt;
  //while (!( ASC1_TIC == (ASC1_TIC | 0x80)) );&lt;br /&gt;
  //ASC1_TIC &amp;amp;= ~0x80;&lt;br /&gt;
&lt;br /&gt;
  ASC1_TIC_IR=0;&lt;br /&gt;
  ASC1_TBUF = c;&lt;br /&gt;
&lt;br /&gt;
  return (c);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Now I see that the ASC1_TBUF=c is executed but I see nothing on the debug serial2 window!&lt;br /&gt;
After this the code is blocked on the while (!ASC1_TIC_IR);&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: XC161CJ ASC1</title><link>https://community.arm.com/thread/40330?ContentTypeID=1</link><pubDate>Tue, 03 Jun 2003 01:03:10 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:d1cddaba-2733-473f-91fc-ec238b2b977f</guid><dc:creator>Stefan  Fricke</dc:creator><description>&lt;p&gt;Hi Joao,&lt;br /&gt;
&lt;br /&gt;
the first what is wrong in this code is the pin selection you have taken.&lt;br /&gt;
These are the pins for ASC0 (assuming you have no mistake in writing here).&lt;br /&gt;
&lt;b&gt;ASC1 pins are 3.0 and 3.1 instead of 3.10 and 3.11&lt;/b&gt;.&lt;br /&gt;
Second the printf() is build for &lt;b&gt;using ASC0 as standart&lt;/b&gt;.&lt;br /&gt;
If you run the simulator/debugger you and than stop you will find in disassembly&lt;br /&gt;
an assembler jump like this:&lt;br /&gt;
&lt;pre&gt; JNB ASC0_TIR,0xC00428 &lt;/pre&gt;.&lt;br /&gt;
What indicates the putchar uses the ASC0.&lt;br /&gt;
You have to modify the putchar() function&lt;br /&gt;
in this way that you replace the  ASC0 with the entries for ASC1.&lt;br /&gt;
The source you can find in LIB-directory.&lt;br /&gt;
Than build an OBJ-file and linke this&lt;br /&gt;
to your project instead the original.&lt;br /&gt;
&lt;br /&gt;
May be you only take the wrong pin selection,&lt;br /&gt;
since I not proved your putchar function.&lt;br /&gt;
&lt;br /&gt;
My init code look like this:&lt;br /&gt;
&lt;pre&gt;
ASC1_FDV = 0x00E8;
ASC1_BG  = 0x003A;//9600baud with fract. div.
ASC1_CON = 0x0811
ASC1_RXFCON = 0x0102;
ALTSELOP3 |= 0x0001;
P3  |= 0x0001;
DP3 |= 0x0001;
ASC1_TIC_IR = 1; // for printf();
ASC1_CON |= 0x8000; // Enable baudrate gen.
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
Hope this helps&lt;br /&gt;
Stefan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>