<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>sujet Re: microcontroller 8052 serial interrupt timer1/2 problems dans Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/microcontroller-8052-serial-interrupt-timer1-2-problems/m-p/989907#M27764</link>
    <description>Hi,&lt;BR /&gt;At me is the same problem (I'm work with AT89C55WD - ATMEL).&lt;BR /&gt;Baud generator is Timer 1 (10400Hz@16Mhz, constant FCh).&lt;BR /&gt;After 1st character transmision aborted.&lt;BR /&gt;Whether you have found the decision by this problem?&lt;BR /&gt;I'll be grateful if you mail me.&lt;BR /&gt;Thanks in advance.&lt;BR /&gt;&lt;BR /&gt;Best regards</description>
    <pubDate>Sun, 03 Aug 2003 12:14:50 GMT</pubDate>
    <dc:creator>ditex</dc:creator>
    <dc:date>2003-08-03T12:14:50Z</dc:date>
    <item>
      <title>microcontroller 8052 serial interrupt timer1/2 problems</title>
      <link>https://community.intel.com/t5/Software-Archive/microcontroller-8052-serial-interrupt-timer1-2-problems/m-p/989905#M27762</link>
      <description>Hi, &lt;BR /&gt;I'm not sure whether this is the right place for my question, but I'd post it anyway. I have a 24 byte tx buffer. When i send the buffer from a uM to pc in a polled manner, timer 2 works fine with the following setting: &lt;BR /&gt;&lt;BR /&gt;mov SCON, #01010000b &lt;BR /&gt;mov RCAP2L, #0DCh &lt;BR /&gt;mov RCAP2H, #0FFh &lt;BR /&gt;mov T2CON, #00110100b &lt;BR /&gt;&lt;BR /&gt;but if i try to use serial interrupt (to receive some chars and do some other calculations) then the send is hanged after the 1st char.... &lt;BR /&gt;my send codes are (with 30h as the beginning of the tx buffer): &lt;BR /&gt;&lt;BR /&gt;Send: &lt;BR /&gt;mov R0, #30h &lt;BR /&gt;Main: &lt;BR /&gt;clr TI &lt;BR /&gt;mov SBUF, @R0 &lt;BR /&gt;Wait: jnb TI, Wait &lt;BR /&gt;inc R0 &lt;BR /&gt;cjne R0,#48h, Main &lt;BR /&gt;&lt;BR /&gt;However, if the baudrate was set by using timer 1 then the code will work fine....timer 1 setting: &lt;BR /&gt;&lt;BR /&gt;mov TMOD,#20h &lt;BR /&gt;mov PCON,#80h &lt;BR /&gt;mov TH1,#250 &lt;BR /&gt;mov TCON,#40h &lt;BR /&gt;mov SCON,#50h &lt;BR /&gt;&lt;BR /&gt;what was wrong?? &lt;BR /&gt;pls help, thanks!! &lt;BR /&gt;&lt;BR /&gt;I use a 11.0592 xtal set to generate a baud of 9600. My code which works with timer1 is (but not when timer2 was used): &lt;BR /&gt;&lt;BR /&gt;.equ TxNow, 01h &lt;BR /&gt;&lt;BR /&gt;.equ StackBase,50h &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;.ORG 0 &lt;BR /&gt;ajmp Init &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;.ORG 23h &lt;BR /&gt;ajmp SerInt &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;;[]------------------------[] &lt;BR /&gt;;| Interrupt Routines | &lt;BR /&gt;;[]------------------------[] &lt;BR /&gt;&lt;BR /&gt;SerInt: &lt;BR /&gt;push PSW &lt;BR /&gt;push ACC &lt;BR /&gt;push 00h &lt;BR /&gt;jbc TI,SerOut &lt;BR /&gt;jbc RI,SerRx &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;SerRx: &lt;BR /&gt;mov P0,SBUF &lt;BR /&gt;&lt;BR /&gt;SerOut: &lt;BR /&gt;pop 00h &lt;BR /&gt;pop ACC &lt;BR /&gt;pop PSW &lt;BR /&gt;reti &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;CheckRdy: &lt;BR /&gt;mov A,P0 &lt;BR /&gt;cjne A,#'U',cTxNow &lt;BR /&gt;setb TxNow &lt;BR /&gt;mov P0,#0h &lt;BR /&gt;ret &lt;BR /&gt;cTxNow: &lt;BR /&gt;clr TxNow &lt;BR /&gt;ret &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;;[]------------------------[] &lt;BR /&gt;;| Setup | &lt;BR /&gt;;[]------------------------[] &lt;BR /&gt;&lt;BR /&gt;Init: &lt;BR /&gt;&lt;BR /&gt;mov TMOD,#20h &lt;BR /&gt;mov PCON,#80h &lt;BR /&gt;mov TH1,#250 &lt;BR /&gt;mov TCON,#40h &lt;BR /&gt;mov SCON,#50h &lt;BR /&gt;setb ES &lt;BR /&gt;setb EA &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;;[]------------------------[] &lt;BR /&gt;;| Main Program | &lt;BR /&gt;;[]------------------------[] &lt;BR /&gt;&lt;BR /&gt;mov 30h, #'H' &lt;BR /&gt;mov 31h, #'e' &lt;BR /&gt;mov 32h, #'l' &lt;BR /&gt;mov 33h, #'l' &lt;BR /&gt;mov 34h, #'o' &lt;BR /&gt;mov 35h, #'!' &lt;BR /&gt;mov 36h, #' ' &lt;BR /&gt;mov 37h, #'T' &lt;BR /&gt;mov 38h, #'x' &lt;BR /&gt;mov 39h, #'R' &lt;BR /&gt;mov 3Ah, #'x' &lt;BR /&gt;mov 3Bh, #' ' &lt;BR /&gt;mov 3Ch, #'s' &lt;BR /&gt;mov 3Dh, #'u' &lt;BR /&gt;mov 3Eh, #'c' &lt;BR /&gt;mov 3Fh, #'c' &lt;BR /&gt;mov 40h, #'e' &lt;BR /&gt;mov 41h, #'s' &lt;BR /&gt;mov 42h, #'s' &lt;BR /&gt;mov 43h, #'!' &lt;BR /&gt;mov 44h, #' ' &lt;BR /&gt;mov 45h, #':' &lt;BR /&gt;mov 46h, #')' &lt;BR /&gt;mov 47h, #' ' &lt;BR /&gt;Main1: &lt;BR /&gt;lcall CheckRdy &lt;BR /&gt;jnb TxNow, Main1 &lt;BR /&gt;jbc TxNow, Send &lt;BR /&gt;&lt;BR /&gt;Send: &lt;BR /&gt;mov R0, #30h &lt;BR /&gt;Main: &lt;BR /&gt;clr TI &lt;BR /&gt;mov SBUF, @R0 &lt;BR /&gt;Wait: jnb TI, Wait &lt;BR /&gt;inc R0 &lt;BR /&gt;cjne R0,#48h, Main &lt;BR /&gt;clr TxNow &lt;BR /&gt;ajmp Main1 &lt;BR /&gt;&lt;BR /&gt;.END &lt;BR /&gt;&lt;BR /&gt;When timer2 was used, it would just hang after sending 'H'..... &lt;BR /&gt;</description>
      <pubDate>Wed, 07 May 2003 16:23:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/microcontroller-8052-serial-interrupt-timer1-2-problems/m-p/989905#M27762</guid>
      <dc:creator>daima</dc:creator>
      <dc:date>2003-05-07T16:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: microcontroller 8052 serial interrupt timer1/2 problems</title>
      <link>https://community.intel.com/t5/Software-Archive/microcontroller-8052-serial-interrupt-timer1-2-problems/m-p/989906#M27763</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;This inquiry is beyond the scope of what we are able to address in the Intel Developer Services forums. Also, the Intel 8052 Microcontroller is a mature product not currently supported by Intel Customer Support. &lt;BR /&gt;&lt;BR /&gt;To submit issues on currently available Intel Microcontrollers, please use the form at: &lt;BR /&gt;&lt;A href="http://developer.intel.com/design/support/faq/microcontrollers/support_disclaimer.htm" target="_blank"&gt;http://developer.intel.com/design/support/faq/microcontrollers/support_disclaimer.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;To review documentation on currently available Intel Microcontrollers, please visit Intel's Developer Web Site at:&lt;BR /&gt;&lt;A href="http://developer.intel.com/design/embcontrol/index.htm" target="_blank"&gt;http://developer.intel.com/design/embcontrol/index.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;To locate documentation or message boards specific to the Intel 8052 Microcontroller, you may want to try using a search engine to look for the keywords "microcontroller forum" or "Intel 8052 microcontroller".&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Lexi S.&lt;BR /&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Arial" color="black" size="2"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"&gt;IntelSoftware NetworkSupport&lt;/SPAN&gt;&lt;/FONT&gt;&lt;NAMESPACE prefix="o" ns="urn:schemas-microsoft-com:office:office"&gt;&lt;P&gt;&lt;/P&gt;&lt;/NAMESPACE&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Arial" color="black" size="2"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"&gt;&lt;A href="http://www.intel.com/software" target="_blank"&gt;http://www.intel.com/software&lt;/A&gt; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Arial" color="black" size="2"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"&gt;&lt;A href="http://www.intel.com/cd/ids/developer/asmo-na/eng/58987.htm" target="_blank"&gt;Contact us&lt;/A&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Message Edited by intel.software.network.support on &lt;SPAN class="date_text"&gt;12-07-2005&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;04:12 PM&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 10 May 2003 03:25:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/microcontroller-8052-serial-interrupt-timer1-2-problems/m-p/989906#M27763</guid>
      <dc:creator>Intel_Software_Netw1</dc:creator>
      <dc:date>2003-05-10T03:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: microcontroller 8052 serial interrupt timer1/2 problems</title>
      <link>https://community.intel.com/t5/Software-Archive/microcontroller-8052-serial-interrupt-timer1-2-problems/m-p/989907#M27764</link>
      <description>Hi,&lt;BR /&gt;At me is the same problem (I'm work with AT89C55WD - ATMEL).&lt;BR /&gt;Baud generator is Timer 1 (10400Hz@16Mhz, constant FCh).&lt;BR /&gt;After 1st character transmision aborted.&lt;BR /&gt;Whether you have found the decision by this problem?&lt;BR /&gt;I'll be grateful if you mail me.&lt;BR /&gt;Thanks in advance.&lt;BR /&gt;&lt;BR /&gt;Best regards</description>
      <pubDate>Sun, 03 Aug 2003 12:14:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/microcontroller-8052-serial-interrupt-timer1-2-problems/m-p/989907#M27764</guid>
      <dc:creator>ditex</dc:creator>
      <dc:date>2003-08-03T12:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: microcontroller 8052 serial interrupt timer1/2 problems</title>
      <link>https://community.intel.com/t5/Software-Archive/microcontroller-8052-serial-interrupt-timer1-2-problems/m-p/989908#M27765</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;Hi!&lt;/DIV&gt;
&lt;DIV&gt;I read the code you had writed follow&lt;/DIV&gt;
&lt;DIV&gt;.....&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;mov TH1,#250 &lt;BR /&gt;mov TCON,#40h &lt;BR /&gt;mov SCON,#50h &lt;/DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;at a glance, i see that you had meet somes wrong follow so that you can't send data from uM to PC.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;1. you calculate wrong the reload value for timer 1. It must be 252 instead 250&lt;/DIV&gt;
&lt;DIV&gt;2. To can transmitingdata from uM to PC, the first of all you must set TI bit in SCON register to 1 to ensure that the transfer buffer is empty. So the value you have to set for SCON register must be 52H instead 50H.&lt;/DIV&gt;
&lt;DIV&gt;3.I think you should set the rightvalue for TH1 and SCON register and then set value for TCON. I mean after you init serial port and set the value reload for timer 1 then set TR1 by set value for TCON.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;so the true code you should rewrite follow:&lt;/DIV&gt;
&lt;DIV&gt;....&lt;/DIV&gt;
&lt;DIV&gt;mov TH1,#252 &lt;BR /&gt;mov SCON,#52h &lt;/DIV&gt;
&lt;DIV&gt;mov TCON,#40h &lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 10 Feb 2004 09:19:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/microcontroller-8052-serial-interrupt-timer1-2-problems/m-p/989908#M27765</guid>
      <dc:creator>lepbinh</dc:creator>
      <dc:date>2004-02-10T09:19:57Z</dc:date>
    </item>
  </channel>
</rss>

