<?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>LPC2104 buzzer control</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/40374/lpc2104-buzzer-control</link><description> 
Hello, 

 
Can anyone explain to me how to control buzzer via timer
interrupts? I want to play different tones on a buzzer using timer
interrupts. So far I have this code: 

 
Init timer: 

 
 //initialize and start Timer #0
 T1TCR = 0x00000002; //disable</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: LPC2104 buzzer control</title><link>https://community.arm.com/thread/137057?ContentTypeID=1</link><pubDate>Tue, 05 Nov 2013 13:14:57 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:99b36b59-8841-4841-9982-e8daa48acdfe</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
But if it&amp;#39;s a school project, then there isn&amp;#39;t a need for a clean
sound - it&amp;#39;s enough that you can hear that the processor is properly
changing modulation frequency.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LPC2104 buzzer control</title><link>https://community.arm.com/thread/128368?ContentTypeID=1</link><pubDate>Tue, 05 Nov 2013 10:20:10 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:11ab745d-a6f5-4de4-a7b2-d7d9e4b7c4b9</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;b&gt;&lt;br /&gt;
So why aren&amp;#39;t you discussing this with your teachers?&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
They will know exactly what board you have and, thus, what components
are on it - including that &amp;quot;buzzer&amp;quot; thing. They will be able to tell
you immediately whether or not it is suitable&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LPC2104 buzzer control</title><link>https://community.arm.com/thread/117422?ContentTypeID=1</link><pubDate>Mon, 04 Nov 2013 00:09:19 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b65550fe-263e-4e79-b54d-200d217734df</guid><dc:creator>Tom Smith</dc:creator><description>&lt;p&gt;&lt;p&gt;
Yup, with loudspeaker it would be better, but it&amp;#39;s a school
project and I&amp;#39;m limited to this board :(&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LPC2104 buzzer control</title><link>https://community.arm.com/thread/107367?ContentTypeID=1</link><pubDate>Sun, 03 Nov 2013 15:49:30 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:13926b19-44e9-427d-a76b-e5cc40726f7c</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
But you are aware that if it is a normal piezo buffer, then you
are creating an interference pattern since in your 262Hz &amp;quot;on&amp;quot; period,
the piezo wants to jump up to one or more kHz. With a loudspeaker,
you get the frequency you request without any extra oscillation.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LPC2104 buzzer control</title><link>https://community.arm.com/thread/107372?ContentTypeID=1</link><pubDate>Sun, 03 Nov 2013 10:50:49 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:05f60b7b-8039-4112-8b46-82f8b9742ead</guid><dc:creator>HansBernhard Broeker</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;Isn&amp;#39;t there any way to play different tones on it using
timer/timer interrupts?&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
I wonder how you managed to arrive at the conclusion that you
should use that buzzer, but without learning enough about it along
the way to let you answer this question yourself.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LPC2104 buzzer control</title><link>https://community.arm.com/thread/107370?ContentTypeID=1</link><pubDate>Sat, 02 Nov 2013 07:45:33 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:bc0b1f8d-069c-4764-b220-72f06f40bcc9</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
Not if it is the type where you just give it a supply, and it
generates the tone itself.&lt;/p&gt;

&lt;p&gt;
You need a &lt;i&gt;&lt;b&gt;speaker&lt;/b&gt;&lt;/i&gt; - not a buzzer (piezoelectric or
otherwise).&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LPC2104 buzzer control</title><link>https://community.arm.com/thread/81545?ContentTypeID=1</link><pubDate>Sat, 02 Nov 2013 06:58:11 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:07f6d1b2-5a38-4f7d-bc32-462477532bc2</guid><dc:creator>Tom Smith</dc:creator><description>&lt;p&gt;&lt;p&gt;
Yep, it&amp;#39;s piezoelectric buzzer. Isn&amp;#39;t there any way to play
different tones on it using timer/timer interrupts?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LPC2104 buzzer control</title><link>https://community.arm.com/thread/68435?ContentTypeID=1</link><pubDate>Sat, 02 Nov 2013 06:50:44 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b5a3e8d7-720e-4f1f-9b94-d681ea978197</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
You say buzzer.&lt;/p&gt;

&lt;p&gt;
Do you mean a piezoelectric buzzer?&lt;/p&gt;

&lt;p&gt;
They are designed to be fed DC and generate their own
frequency.&lt;/p&gt;

&lt;p&gt;
A small loudspeaker, on the other hand, is designed to get AC or
pulses and sound at the frequency of the AC or the pulse
frequency.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>