<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forums.obdev.at/app.php/feed/topic/1689" />

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2008-09-09T08:42:08+02:00</updated>

	<author><name><![CDATA[Objective Development Forums]]></name></author>
	<id>https://forums.obdev.at/app.php/feed/topic/1689</id>

		<entry>
		<author><name><![CDATA[henni]]></name></author>
		<updated>2008-09-09T08:42:08+02:00</updated>

		<published>2008-09-09T08:42:08+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1689&amp;p=6157#p6157</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1689&amp;p=6157#p6157"/>
		<title type="html"><![CDATA[Are Timers used?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1689&amp;p=6157#p6157"><![CDATA[
&gt; The plan is to establish a 10400 baud serial communication (car OBD2).<br />&gt; This will result in sending one bit every 96µs.<br />&gt; ...<br />&gt; UART ... I did not see a way to disable the stop-bit...<br /><br />You need a stop bit, otherwise, the start bit makes no sense!<br />The UART receiver is awaiting a 1-&gt;0 transition to detect a start bit.<br />Maybe, you can live with 7-bit transmission and one stop bit.<br />Or you should use the USI/SPI instead (no start bit in this case too).<br /><br />Note that AVRUSB and fast+fluent (non-interrupting) serial communication cannot be implemented, as AVRUSB may disable interrupts for up to 75 µs (1 bulk packet with 8 data bytes) or even more for contiguous SETUP+DATA transmissions.<br /><br />If you really need less interruptions, consider to use two Atmel processors (as multi-CPU microcontrollers don't exist yet:-) or a dedicated USB controller chip (e.g. FT245).<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1319">henni</a> — Tue Sep 09, 2008 8:42 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2008-09-06T11:50:16+02:00</updated>

		<published>2008-09-06T11:50:16+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1689&amp;p=6146#p6146</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1689&amp;p=6146#p6146"/>
		<title type="html"><![CDATA[Are Timers used?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1689&amp;p=6146#p6146"><![CDATA[
Dear Grendl,<br /><br />you are absolutely right! There is a mistake in my comments.<br /><br />The plan is to establish a 10400 baud serial communication (car OBD2). This will result in sending one bit every 96µs. At 12MHz I would need an interrupt every 1154 cycles.<br /><br />I already thought of using the UART to shift this data but I did not see a way to disable the stop-bit to get a pure 8 bit communication (the second thing was I did not find the settings for 10400 baud). <br />A timer interrupt every 96µs is the only idea I had trying to establish this serial communication.<br /><br />Thank you, I appreciate every hint!<br />MaxWax<p>Statistics: Posted by Guest — Sat Sep 06, 2008 11:50 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Grendel]]></name></author>
		<updated>2008-09-06T02:38:55+02:00</updated>

		<published>2008-09-06T02:38:55+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1689&amp;p=6145#p6145</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1689&amp;p=6145#p6145"/>
		<title type="html"><![CDATA[Are Timers used?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1689&amp;p=6145#p6145"><![CDATA[
You are over running the CPU. 1/100ns = 10MHz, ie. 1.2 clock cycles per IRQ... Once the time is started the CPU is locked into the ISR routine.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=101">Grendel</a> — Sat Sep 06, 2008 2:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2008-09-06T02:13:41+02:00</updated>

		<published>2008-09-06T02:13:41+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1689&amp;p=6144#p6144</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1689&amp;p=6144#p6144"/>
		<title type="html"><![CDATA[Are Timers used?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1689&amp;p=6144#p6144"><![CDATA[
Dear all,<br /><br />I try to toggle a PIN on a ATMega8@12MHz every 100ns using the HID-data template.<br /><br />The code works fine until I enable Timer1.<br />Is the timer used otherwise?<br /><br />The following code was added:<br /><br /><br /><div class="codebox"><p>Code: </p><pre><code>void TimerInit&#40;void&#41;&#123;<br /><br />   TCNT1=0x0000;//set timer counter initial value<br />   OCR1A=0x04B0; //Set timer output compare registerA to 1200 -&gt; 100ns <br />   <br />   TCCR1B |= &#40;1&lt;&lt;CS10 | 1&lt;&lt;WGM12&#41;;  // No prescaling -&gt; 12MHz; Enable CTC<br />   TIMSK  |= &#40;1&lt;&lt;OCIE1A&#41;;// Enable Compare Match ISR<br /><br />&#125;<br /><br />ISR&#40;TIMER1_CAPT_vect&#41;&#123;<br />   PORTC ^= _BV&#40;PIN5&#41;;<br />&#125;<br /></code></pre></div><p>Statistics: Posted by Guest — Sat Sep 06, 2008 2:13 am</p><hr />
]]></content>
	</entry>
	</feed>
