<?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/11156" />

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2019-02-04T20:04:47+02:00</updated>

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

		<entry>
		<author><name><![CDATA[AudyIltis]]></name></author>
		<updated>2019-02-04T20:04:47+02:00</updated>

		<published>2019-02-04T20:04:47+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=11156&amp;p=35501#p35501</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=11156&amp;p=35501#p35501"/>
		<title type="html"><![CDATA[Re: ATmega328p with internal RC oscillator?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=11156&amp;p=35501#p35501"><![CDATA[
Hi...I used it before on an ATmega8 with heavy serial port needs... No problems whatsoever. This was almost ten years ago too, not sure if the internal oscillator in AVRs has changed much lately.You can now use the oscillator pins as a RTC and save the external chip.<br />I'm testing it out on an old ATmega16, and maybe create a library if it works out ok.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=30993">AudyIltis</a> — Mon Feb 04, 2019 8:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[lgberro]]></name></author>
		<updated>2019-01-25T03:57:38+02:00</updated>

		<published>2019-01-25T03:57:38+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=11156&amp;p=35461#p35461</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=11156&amp;p=35461#p35461"/>
		<title type="html"><![CDATA[Re: ATmega328p with internal RC oscillator?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=11156&amp;p=35461#p35461"><![CDATA[
<blockquote><div><cite>AHorneffer wrote:</cite>Hi<br /><br /><blockquote><div><cite>lgberro wrote:</cite>I am trying to make atmega328pb run with internal oscillator at 12.8MHz. We could share our achievements.</div></blockquote><br /><br />A bit late, but just FYI: I gave up trying to use VUSB on the ATmega328p with the internal oscillator.<br />I use it with 12MHz or 16MHz crystals.</div></blockquote><br />and I did make it work with internal oscillator at 12.8 MHz...  <img class="smilies" src="./../../../images/smilies/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green" /><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=23289">lgberro</a> — Fri Jan 25, 2019 3:57 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[AHorneffer]]></name></author>
		<updated>2018-12-06T13:39:33+02:00</updated>

		<published>2018-12-06T13:39:33+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=11156&amp;p=35174#p35174</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=11156&amp;p=35174#p35174"/>
		<title type="html"><![CDATA[Re: ATmega328p with internal RC oscillator?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=11156&amp;p=35174#p35174"><![CDATA[
Hi<br /><br /><blockquote><div><cite>lgberro wrote:</cite>I am trying to make atmega328pb run with internal oscillator at 12.8MHz. We could share our achievements.</div></blockquote><br /><br />A bit late, but just FYI: I gave up trying to use VUSB on the ATmega328p with the internal oscillator.<br />I use it with 12MHz or 16MHz crystals.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=23245">AHorneffer</a> — Thu Dec 06, 2018 1:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[horo]]></name></author>
		<updated>2018-01-11T17:15:48+02:00</updated>

		<published>2018-01-11T17:15:48+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=11156&amp;p=33623#p33623</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=11156&amp;p=33623#p33623"/>
		<title type="html"><![CDATA[Re: ATmega328p with internal RC oscillator?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=11156&amp;p=33623#p33623"><![CDATA[
<blockquote><div><cite>AHorneffer wrote:</cite>Where do you get that doubling of the frequency? The internal RC oscillator of the ATmegas is specified for 8 MHz. The with the OSCCAL register one can push it to around 13 MHz, but that's about it. <br /><br />In general: micronucleus has some code that tries to calibrate the OSCCAL on the frame time of the USB bus. I can see it speeding up the MCU when it is connected to the USB, so it does something. But it doesn't seem to be good enough.<br /><br />P.S. I didn't find any mention of using V-USB on the ATmega328p with the internal oscillator, so I guess that just doesn't work.</div></blockquote><br /><br />Sorry, the frequency doubling is a feature of ATtiny25/45/85 (-&gt; Fig. 6-2 of the data sheet) that is not available on ATmega <img class="smilies" src="./../../../images/smilies/icon_sad.gif" alt=":(" title="Sad" /><br />ATtiny is able to select a path from the 8 MHz RC oscillator through an 8x PLL with a following 1/4 freq divider to get 16 MHz system clock. So the 16.5 MHz approach is only usable on an ATtiny.<br /><br />Ciao, Martin<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=891">horo</a> — Thu Jan 11, 2018 5:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[lgberro]]></name></author>
		<updated>2017-12-29T21:20:55+02:00</updated>

		<published>2017-12-29T21:20:55+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=11156&amp;p=33572#p33572</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=11156&amp;p=33572#p33572"/>
		<title type="html"><![CDATA[Re: ATmega328p with internal RC oscillator?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=11156&amp;p=33572#p33572"><![CDATA[
Hi AHorneffer!<br /><br />I am trying to make atmega328pb run with internal oscillator at 12.8MHz. We could share our achievements.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=23289">lgberro</a> — Fri Dec 29, 2017 9:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[AHorneffer]]></name></author>
		<updated>2017-12-21T13:36:52+02:00</updated>

		<published>2017-12-21T13:36:52+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=11156&amp;p=33547#p33547</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=11156&amp;p=33547#p33547"/>
		<title type="html"><![CDATA[Re: ATmega328p with internal RC oscillator?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=11156&amp;p=33547#p33547"><![CDATA[
<blockquote class="uncited"><div>Did you also try the 16.5 MHz version? If I look at the F vs. OSCCAL drawing on p. 607 of the datasheet* with split OSCCAL and you use the default starting value of 128 you're in the upper half that starts with 6..6.5 MHz (-&gt; clock frequency 12..13 MHz) and grows.<br /></div></blockquote><br /> <br />[I guess you mean figure 33-39 of the datasheet. At least that's what I'm referring to.]<br />Where do you get that doubling of the frequency? The internal RC oscillator of the ATmegas is specified for 8 MHz. The with the OSCCAL register one can push it to around 13 MHz, but that's about it. <br /><br />In general: micronucleus has some code that tries to calibrate the OSCCAL on the frame time of the USB bus. I can see it speeding up the MCU when it is connected to the USB, so it does something. But it doesn't seem to be good enough.<br /><br />P.S. I didn't find any mention of using V-USB on the ATmega328p with the internal oscillator, so I guess that just doesn't work.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=23245">AHorneffer</a> — Thu Dec 21, 2017 1:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[horo]]></name></author>
		<updated>2017-12-14T11:10:23+02:00</updated>

		<published>2017-12-14T11:10:23+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=11156&amp;p=33506#p33506</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=11156&amp;p=33506#p33506"/>
		<title type="html"><![CDATA[Re: ATmega328p with internal RC oscillator?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=11156&amp;p=33506#p33506"><![CDATA[
Hi,<br /><br />Did you also try the 16.5 MHz version? If I look at the F vs. OSCCAL drawing on p. 607 of the datasheet* with split OSCCAL and you use the default starting value of 128 you're in the upper half that starts with 6..6.5 MHz (-&gt; clock frequency 12..13 MHz) and grows. Better use the lower half, starting value e.g. 64..80. for 12.8 MHz clock frequency.<br /><br />Ciao, Martin<br /><br />* <!-- m --><a class="postlink" href="http://www.atmel.com/Images/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf">http://www.atmel.com/Images/Atmel-42735 ... asheet.pdf</a><!-- m --><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=891">horo</a> — Thu Dec 14, 2017 11:10 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[AHorneffer]]></name></author>
		<updated>2017-12-13T11:30:56+02:00</updated>

		<published>2017-12-13T11:30:56+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=11156&amp;p=33495#p33495</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=11156&amp;p=33495#p33495"/>
		<title type="html"><![CDATA[Re: ATmega328p with internal RC oscillator?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=11156&amp;p=33495#p33495"><![CDATA[
I understand that V-USB requires a precise clock. But for micronucleus it doesn't have to be stable for long times, only a minute or so, then all the transfer is done.<br /><br />I understood it that the 12.8 MHz mode was made to work with the internal RC oscillator of some of the chips. So I'm wondering if it should also work on the ATmega328p, or if its internal oscillator doesn't cut it.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=23245">AHorneffer</a> — Wed Dec 13, 2017 11:30 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ulao]]></name></author>
		<updated>2017-12-11T19:43:39+02:00</updated>

		<published>2017-12-11T19:43:39+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=11156&amp;p=33486#p33486</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=11156&amp;p=33486#p33486"/>
		<title type="html"><![CDATA[Re: ATmega328p with internal RC oscillator?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=11156&amp;p=33486#p33486"><![CDATA[
The 328's internal clock is not very accurate. v-usb requires a solid clock. You may get it to work by   adjust the internal RC oscillator but this is going to take a lot of critical timing.. More on that here. <!-- l --><a class="postlink-local" href="https://forums.obdev.at/viewtopic.php?t=8819">viewtopic.php?t=8819</a><!-- l --><br /><br />or go int free<br /><br /><!-- m --><a class="postlink" href="https://cpldcpu.wordpress.com/2014/03/02/interrupt-free-v-usb/">https://cpldcpu.wordpress.com/2014/03/0 ... ree-v-usb/</a><!-- m --><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1281">ulao</a> — Mon Dec 11, 2017 7:43 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[AHorneffer]]></name></author>
		<updated>2017-12-10T16:40:07+02:00</updated>

		<published>2017-12-10T16:40:07+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=11156&amp;p=33481#p33481</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=11156&amp;p=33481#p33481"/>
		<title type="html"><![CDATA[ATmega328p with internal RC oscillator?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=11156&amp;p=33481#p33481"><![CDATA[
Hi<br /><br />I'm working on using micronucleus with the ATmega328p. It works fine with an external 16MHz crystal, but when I try using the internal RC oscillator, then the host doesn't recognize the USB device. In the syslog (on Ubuntu Linux 16.04) I get:<br /><blockquote class="uncited"><div>Dec 10 15:33:09 cypresse kernel: [17708.254022] usb 1-7: new low-speed USB device number 87 using xhci_hcd<br />Dec 10 15:33:09 cypresse kernel: [17708.462266] usb 1-7: device descriptor read/64, error -71<br />Dec 10 15:33:10 cypresse kernel: [17708.749926] usb 1-7: device descriptor read/64, error -71<br />Dec 10 15:33:10 cypresse kernel: [17709.037867] usb 1-7: new low-speed USB device number 88 using xhci_hcd<br />Dec 10 15:33:10 cypresse kernel: [17709.245908] usb 1-7: device descriptor read/64, error -71<br />Dec 10 15:33:11 cypresse kernel: [17709.534086] usb 1-7: device descriptor read/64, error -71<br />Dec 10 15:33:11 cypresse kernel: [17709.825904] usb 1-7: new low-speed USB device number 89 using xhci_hcd<br />Dec 10 15:33:11 cypresse kernel: [17709.853330] usb 1-7: Device not responding to setup address.<br />Dec 10 15:33:11 cypresse kernel: [17710.086536] usb 1-7: Device not responding to setup address.<br />Dec 10 15:33:11 cypresse kernel: [17710.293854] usb 1-7: device not accepting address 89, error -71<br />Dec 10 15:33:11 cypresse kernel: [17710.474133] usb 1-7: new low-speed USB device number 90 using xhci_hcd<br />Dec 10 15:33:11 cypresse kernel: [17710.502095] usb 1-7: Device not responding to setup address.<br />Dec 10 15:33:12 cypresse kernel: [17710.737315] usb 1-7: Device not responding to setup address.<br />Dec 10 15:33:12 cypresse kernel: [17710.942111] usb 1-7: device not accepting address 90, error -71<br />Dec 10 15:33:12 cypresse kernel: [17710.942149] usb usb1-port7: unable to enumerate USB device<br /></div></blockquote><br /><br />Has anyone used V-USB on the ATmega328p with the internal RC oscillator? What configuration did you use?<br /><br />P.S. Feel free to join our discussion on the micronucleus pages: <!-- m --><a class="postlink" href="https://github.com/micronucleus/micronucleus/issues/107">https://github.com/micronucleus/micronucleus/issues/107</a><!-- m --><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=23245">AHorneffer</a> — Sun Dec 10, 2017 4:40 pm</p><hr />
]]></content>
	</entry>
	</feed>
