Just got an announcement from DigiKey.
ATmega4809 98 units on hand, 1.55 USD for single item
ATmega4809 Xplained Pro 5 on hand, 38.00 USD single item
Jim
Just got an announcement from DigiKey.
ATmega4809 98 units on hand, 1.55 USD for single item
ATmega4809 Xplained Pro 5 on hand, 38.00 USD single item
Jim
Seems a great chip EXCEPT!! it can't run form a "normal" crystal at anything above 32KHz and we know how accurate those types of clocks are(!).
Why or why, with all the junk available on the chip, they could not provide a standard crystal oscillator mode? But what do I care?
Seems a great chip EXCEPT!! it can't run form a "normal" crystal at anything above 32KHz and we know how accurate those types of clocks are(!).
Why or why, with all the junk available on the chip, they could not provide a standard crystal oscillator mode? But what do I care?
Exactly..
One wonders if the fact Microchip makes Oscillators, but does not make Crystals, has anything to do with this ?
Problem there is multiple..
* Crystals are still much cheaper than oscillators
* Microchip oscillators are not available in 5V models (in fact, few do 5V oscillators)
* If you want to use the very accurate low cost GPS clipped-sine TCXO sources, those need an amplifier... which the Xtal stage nicely provided.
There even is scope for MCUs to include a self-biasing 1 pin EXTCLK choice, to manage these low cost Clipped Sine Oscillators.
End outcome is a highly flexible microcontrolller, that is suddenly rather less flexible...
... they could not provide a standard crystal oscillator mode?
At a constant Vdd, mega4809's 20MHz RC frequency varies by temperature by 1% typical; a USB UART ideally should sync to the USB SOF so that end of the communication link is better than 1%.
But, the clock calibration app note hasn't been updated for megaAVR 0-series.
In the meantime, some USB UART can provide a clock from a fractional BRG or its crystal oscillator.
Microchip Technology
Application Notes
AN_2555 AVR053: Calibration of the internal RC oscillator
http://www.microchip.com//wwwAppNotes/AppNotes.aspx?appnote=en591393
(PDF)
1.6. RC Oscillator Revision History
(version 5.0 (PicoPower), 8.0MHz)
5. Revision History
09/2016
Microchip
Atmel Studio
Programming Dialog
Oscillator Calibration
https://www.microchip.com/wwwproducts/en/ATMEGA4809
https://www.exar.com/products/interface/uarts/usb-uarts (Exar USB UARTs, parametric search)
https://www.olimex.com/Products/Breadboarding/BB-CH340T/resources/CH340DS1.PDF (USB UART CH340, search for CKO)
P.S.
Exar USB UARTs do not have 5V I/O.
Microchip USB UART MCP2221A has 5V I/O when USB VBUS powered, 13mA typ with USB suspend per USB spec (0.5mA), and a 2500ppm (0.25%) max clock output at :
http://www.microchip.com/wwwproducts/en/MCP2221A
Edit: MCP2221A
But what do I care?
Though I will probably keep using some AVR's for the existing (hobby) projects I have and for projects with similar functionality for which my own libraries fit.
You care more than I do
I don't think so. Remember I'm semi retired so all I do is for fun, if I can't do it with a "normal" AVR, maybe Xmega (preferably with AS4.18 and assembler..... but I'll lower myself to C and AS7.....) then I don't do it.
I guess that the main problem is/was that the new/cheap production line don't work with full swing OSC. (see 328PB!)
So this is for me a hobby controller !
And the fact that the missing memory mapping of registers do that a lot of my ASM code have to be rewritten/restructured make me stay
(same reason I never went for xmegas.)
And I guess that Microchip better update a lot of tut's for the new chips to fly :(
* Crystals are still much cheaper than oscillators
Much cheaper? I pay around 0.25 for a crystal in small quantities (GBP/EUR/USD, it doesn't really matter). I can get an oscillator for around 0.50. OK, so in percentage terms that's double, but in cash terms it's not that much more.
I can get an oscillator for around 0.50. OK
Where do you get a 5V 20MHz version for that price? (<10 at the time)
Did a simple search on Octopart for 20MHz oscillators.
https://octopart.com/search?q=20MHz%20oscillator&start=0&sort=median_price_1000&sort-dir=asc
On the first page I found one from Abracom
https://datasheet.octopart.com/ASFLM1-20.000MHZ-L-C-T-Abracon-datasheet-10050101.pdf
<10 prices are not listed, but 1000+ prices are 12ct or 10ct @ "Verical" and "Newark".
On another oscillator I clicked through to newark:
http://www.newark.com/txc/8w-20-000mbc-t/oscillator-20mhz-2-5-x-2mm-cmos/dp/29X6525?CMP=AFC-OP
I do not really know what to think of that.
They seem to cost USD2.08 (10 up) but also at the 12 ct price octopart suggested.
Weird. True, or clickbait?
Edit:
Oops, that one is only 3V3.
But you can find so many, from different places via octopart. Give it a try.
The 12c price is for China......
The 12c price is for China......
yes, and also stock clearance prices can distort the disti searches.
If you want to match the Vcc range of an AVR, the choices are few...
KC5032A20.0000CMGE00 Kyocera International XO 20.000MHZ CMOS SMD 1,355 - Immediate $1.63 /1 CMOS 1.6 V ~ 5.5 V ±50ppm -40°C ~ 85°C 7mA
I rather despise these split datasheets...they start out good then coagulate until they are no longer good...then after awhile you have to figure out which "datasheet pieces" belong with which chip.
This is the manual for mega-0 parts (except for the mega8467, and the adc section of the mega6428) Only the mega2428 supports the wifi peripheral in all modes.
Just give me one datasheet for one chip!
* Microchip oscillators are not available in 5V models ...
... (in fact, few do 5V oscillators)
http://www.microchip.com/design-centers/clock-and-timing/oscillators (MEMS, 1.3mA typ at 1.8V, DSC60XX)
http://www.onsemi.com/PowerSolutions/product.do?id=NLSX4378 (24Mbps, 10K passive pull-up after active pull-up)
http://www.analog.com/en/products/clock-and-timing/silicon-oscillators/ltc1799.html (LTC1799, 1kHz to 33MHz Resistor Set SOT-23 Oscillator)
ATmega4809 98 units on hand, 1.55 USD for single item
http://new.microchipdirect.com/product/ATMEGA4809?keywords=ATMEGA4809-MFR
could level translate to 5V; additional estimated current is about one fifth of a mega4809 at 20MHz (approx 10mA typ)
True, for even more cost, (33c/3k is more than small MCUs !) and another part on the BOM and to place....
Analog Devices/Linear Technology silicon oscillators is one source; 3mA typ and 2.5% max frequency error.
http://www.analog.com/en/products/clock-and-timing/silicon-oscillators/ltc1799.html (LTC1799, 1kHz to 33MHz Resistor Set SOT-23 Oscillator)
I'll admit I'd forgotten about those, given the poor precision and very high price.... LTC1799CS5#TR 2500 $2.670 - does anyone buy those today ?
What is the problem with calibrating from a 32KHz crystal? Or, does that not work with this family? #5 suggests that it does work.
Jim
What is the problem with calibrating from a 32KHz crystal? Or, does that not work with this family? #5 suggests that it does work.
Nothing wrong with calibration, as far as that goes...
The step-granularity is usually the limiting factor, plus the jitter present in RC Oscillators as well.
So you get nothing like a Crystal in final stability.
For many low-spec apps, that may be 'good enough' but it means the MCU cannot be (as easily) used for higher spec designs, as earlier MCU models.
Or, does that not work with this family?
For megaAVR 0-series, Atmel-ICE can still generate the calibration clock but calibration complete is TBD.
(page 7)
2.1. Calibration Protocol
(third paragraph)
The overall concept is that the programming tool generates the calibration clock (C-clock), and the device uses this as a reference to calibrate its internal RC oscillator. When the device has completed the calibration it signals “OK” to the programming tool on the (ISP MISO or JTAG TDO)
...
Ahh, a little different from the "classic" calibration.
Thanks
Jim
One 1M resistor and one 74HC1GU04 one-gate sot23-5 (or even smaller sc88) 5pin unbuffered inverter. That's all it takes. Or if you want to play with power/swing levels you can use an additional series resistor (220R...2K2) and play with the 1M resistor (I've seen values from 220K to 4M7 - usually 2M2).
This is what I'm using with ATmega88PB in lots of designs. In fact I have two designs types:
- one for a 3pin rezonator (with integrated capacitors) with 1M resistor.
- one for a crystal with 1M8 resistor and a series 1K resistor (with external capacitors of course, 27pF).
Works like a charm.
One 1M resistor and one 74HC1GU04 one-gate sot23-5 (or even smaller sc88) 5pin unbuffered inverter. That's all it takes. Or if you want to play with power/swing levels you can use an additional series resistor (220R...2K2) and play with the 1M resistor (I've seen values from 220K to 4M7 - usually 2M2).
This is what I'm using with ATmega88PB in lots of designs. In fact I have two designs types:
- one for a 3pin rezonator (with integrated capacitors) with 1M resistor.
- one for a crystal with 1M8 resistor and a series 1K resistor (with external capacitors of course, 27pF).
Works like a charm.
Sure, there are even parts like 74LVC1GX04, that are designed for Oscillator use. Also useful are the 74AHC1G42xx series - I'm told a range of dividers are 'coming'.
The point is, if you are buying a general purpose microcontroller, you should not have to be doing these work-around dances of adding-more-parts at all :)
The point is, if you are buying a general purpose microcontroller, you should not have to be doing these work-around dances of adding-more-parts at all :)
- why putting a crystal at all? There are LOTS of micros with 1%, 1.5%, 2% over the entire temperature range already. Not Atmel's/Microchip though.
- why needing specific frequency at all? At least for UARTs when ST for example had fractional baud generators for years. Atmel/Microchip seems to realize this only lately.
And these are related only with the clocks.
In the 90s we were used to put reset generators and watchdogs externally, and that seemed normal. Not today, of course. But I still have a design in production even today in 2018, using an old romless 8051 with external everything... Working just great for that application
There are LOTS of micros with 1%, 1.5%, 2% over the entire temperature range already. Not Atmel's/Microchip though.
If I read the 4809 datasheet correctly then the key points are...
factory calibration of 16/20MHz is +/-0.75%
calibration step size is 0.75%
drift over normal operating range is +/-1.5%
total error over full operating range is +/-3%
Those all compare quite well with other 8-bit general purpose micros
rammon wrote:There are LOTS of micros with 1%, 1.5%, 2% over the entire temperature range already. Not Atmel's/Microchip though.
If I read the 4809 datasheet correctly then the key points are...
factory calibration of 16/20MHz is +/-0.75%
calibration step size is 0.75%
drift over normal operating range is +/-1.5%
total error over full operating range is +/-3%
Those all compare quite well with other 8-bit general purpose micros
That's not the point. I do what I have to do. Using external HCU gate for oscillator on the PB parts. Not complaining. (Remember, PB parts do have internal crystal osc. but the chip is very very susceptible to noise with it). I compared the ATmega88P with ATmega88PB prices.... Decided that a small additional single-gate part woths the effort.
Maybe Microchip needs to make an application note about using external oscillators for their chips. And maybe also explain why they don't have an internal one for the 0/1-series. I admit this is a bit disturbing because everyone is used to have one...
3V3 oscillator, 5V AVR
It's not pretty but it might work (might need a cap across the lower diode)
Or even...
There's more than enough swing out of a 3V3 oscillator, you just need to centre it between Vil and Vih
Maybe build a clock generator from discrete parts? I was reading this discussion: http://www.chatzones.co.uk/discu...
But it seems they are somewhat unreliable and the inverter gates used need to be chosen carefully.
Edit: Apparently this circuit is called Pierce Oscillator. Always learning.
ATmega4809 Xplained Pro 5 on hand, 38.00 USD single item
EDIT: OK, so answering my own question...
If those ppm figures are to be believed that's pretty good isn't it?
PS for the curious the complete schematic is at: http://ww1.microchip.com/downloa...
It has already been discussed, I think, that you can use a 32kHz crystal like that to calibrate the internal oscillator, however the step size of the calibration is 0.75% (7500 ppm) so you are limited to half that accuracy in a worst case scenario (i.e. aprox. 4000 ppm).
Still, this is better than the TinyAVR-1 that have a step size of 1.5% (15000 ppm).
What is the problem with calibrating from a 32KHz crystal?
Microchip Technology
Application Notes
AN_8002 AVR055: Using a 32kHz XTAL for run-time calibration of the internal RC
http://www.microchip.com/wwwappnotes/appnotes.aspx?appnote=en591195
from AVR053 :
(page 1)
In some systems it may be necessary to perform run-time calibration of the oscillator using an external crystal. This is covered in the “AVR055: Using a 32kHz XTAL for run-time calibration of the internal RC” application note.
A 32KHz MEMS oscillator is accurate (100ppm) "enough" :
https://abracon.com/products.php?search=osc&type=MEMS&subtype=kHz%20SMD
Maybe build a clock generator from discrete parts? I was reading this discussion: http://www.chatzones.co.uk/discu...
But it seems they are somewhat unreliable and the inverter gates used need to be chosen carefully.
Edit: Apparently this circuit is called Pierce Oscillator. Always learning.
Surprising no one there mentions a 74HCU04 (mentioned above), or these days, something like a SOT353 74AHC1GU04SE
That U is vitally important, and means Unbuffered, so is a linear inverter. (the same Linear Inverter as they used to put inside these MCUs, until someone decided not to... )
The 74LS/74HC04 parts have far too much gain to be reliable oscillators, no surprise they are reporting unreliable ....
If those ppm figures are to be believed that's pretty good isn't it?
'pretty good' is relative... :)
That's certainly better than any RC oscillator, but the 32KHz crystals have a parabolic tempco curve & the 20ppm spec is only room temp tolerance.
There's more than enough swing out of a 3V3 oscillator, you just need to centre it between Vil and Vih
Sounds good, they could even do a simple self-biasing pin, like is found on the Sig_in pin of HC4046 - that would accept Clipped Sine, and oscillators down to 1.8V
El Tangas wrote:Maybe build a clock generator from discrete parts? I was reading this discussion: http://www.chatzones.co.uk/discu...
But it seems they are somewhat unreliable and the inverter gates used need to be chosen carefully.
Edit: Apparently this circuit is called Pierce Oscillator. Always learning.
Surprising no one there mentions a 74HCU04 (mentioned above), or these days, something like a SOT353 74AHC1GU04SE
That U is vitally important, and means Unbuffered, so is a linear inverter. (the same Linear Inverter as they used to put inside these MCUs, until someone decided not to... )
The 74LS/74HC04 parts have far too much gain to be reliable oscillators, no surprise they are reporting unreliable ....
The price difference for example, between ATmega88P and ATmega88PB is a full dollar! I decided to use PB with an HCU gate. For over 1000 boards/year I think it's woth the effort.
I was about to make a post in the megaAVR 0-series thread about appearance at Digikey, as a 48PDIP(?), but decided to run a quick search. Searching for atmega4809 found this topic, a surprise to me as neither the Atmel Community, the AVR Feaks summary or the megaAVR and tinyAVR forum pages show this topic.
Further, the date/time is messed up at post #38, about 8 hours from now.
Post #37 Posted : Thu. May 17, 2018 - 01:01 PM.
Post #38 Posted : Thu. May 17, 2018 - 09:33 PM.
My local time is Thu. May 17, 2018 - 01:25 PM.
Twilight zone? The topic will reappear in 8 hours 8 minutes or after my post appears with a valid current time?
... at Digikey, as a 48PDIP(?), but decided to run a quick search.
https://www.findchips.com/search/atmega4809-pf
My local time is Thu. May 17, 2018 - 01:25 PM.
Are you living a year in the past? (emphasis mine)
The DIP package (only 40 pins, so it's missing PORTB and a bit more. Notably, no access to USART3) was mentioned in the MEGA-0 thread: https://www.avrfreaks.net/comment/2667576#comment-2667576
I had some samples arrive a day or two ago, and put together a working kludge:
I rather despise these split datasheets...they start out good then coagulate until they are no longer good...then after awhile you have to figure out which "datasheet pieces" belong with which chip.
This is the manual for mega-0 parts (except for the mega8467, and the adc section of the mega6428) Only the mega2428 supports the wifi peripheral in all modes.
Just give me one datasheet for one chip!
I'm with you, I dont enjoy haveing to go through 3 datasheets for just 1 chip.
It's like they are trying to save "paper", imagine if every IC maker did that
imagine if every IC maker did that
Don't forget the separate "instruction set reference."
Many modern chips are worse. Most ARM vendors will refer you to ARM for Architecture and Instruction Set manuals. For a while there, I kept finding manuals that said things like "An ARM Cortex M3 implements the ARM7 TDMI instruction set except for the 32bit ARM instructions." (better now; I don't know if the manuals improved, or the web searches got better.)
I've seen a few (different postings) say no xtal needed, since some blah blah parts now include fractional baud generation. Ok, wonderful...doesn't that still require a known (accurately) timebase? Whether you're dividing the clock by 118 or, now able to, divide by 118.63, if you don't scale properly, you won't get a valid (exact) baud rate, such as 19200.0000.
Has Atmel/Microchip given an explanation as to why the Xtal functionality was removed? It's a 15 cent way to ensure when you set a timer to 50 KHz, you get 50000.03 Hz. A 1% temperature tolerance is a 500 Hz ERROR!
Has Atmel/Microchip given an explanation as to why the Xtal functionality was removed? It's a 15 cent way to ensure when you set a timer to 50 KHz, you get 50000.03 Hz. A 1% temperature tolerance is a 500 Hz ERROR!
It's a bit of a cost trade off, but I'm sure not much. The silicon impact of an unbuffered inverter plus schmitt buffer, must be small, the testing time impact may be slightly larger.
I think Atmel/Microchip painted themselves into a bit of a corner with the failure of the low-swing Xtal OSC to reach Full Silicon Speeds.
They would then need to fix that design, and the easier choice may have been to remove it instead, given 'most users do not use it', and 'hey, we can up-sell a Microchip Oscillator to the others !'.
That leaves those small portion of users who failed to make the product manager's cut, looking at other vendors/devices. (if they do not want the higher price /current of an external Oscillator)
There is trend to Clipped Sine low power oscillators, especially at higher precision, and those will need a Xtal amplifier, as they spec 0.8V p-p outputs.
sbennett wrote:
My local time is Thu. May 17, 2018 - 01:25 PM.
Are you living a year in the past? (emphasis mine)
D'oh, found this topic and from the Month/day/time it appeared to be current, didn't observe the year obviously.
Old age, that's my excuse.
Ok, wonderful...doesn't that still require a known (accurately) timebase?
If enable mega4809 UART auto-baud and send BREAK, SYNC, data then no crystal.
If 32KHz crystal isn't reliable (shock, temperature) then a 32KHz MEMS oscillator.
If 32KHz crystal isn't accurate (temperature) then calibrate given an accurate reference (GNSS 1PPS, clock from USB UART)
http://ww1.microchip.com/downloads/en/DeviceDoc/ATmega4809_Curiosity_Nano_Schematics.pdf (page 3, D4) via ATmega4809 Curiosity Nano
megaAVR 0-series FDS via ATMEGA4809 - 8-bit AVR Microcontrollers - Microcontrollers and Processors
https://www.mouser.com/ProductDetail/SiTime/SiT1630AE-H6-DCC-32768G?qs=dMZC7um9hO9rbZDX5j0flQ%3D%3D
AN2711 Real-Time-Clock Calibration and Compensation on AVR Microcontrollers
Low swing oscillator is significantly lower power consumption. But this one seems rather poorly managed.
Jim
avrcandies wrote:Has Atmel/Microchip given an explanation as to why the Xtal functionality was removed? It's a 15 cent way to ensure when you set a timer to 50 KHz, you get 50000.03 Hz. A 1% temperature tolerance is a 500 Hz ERROR!
It's a bit of a cost trade off, but I'm sure not much. The silicon impact of an unbuffered inverter plus schmitt buffer, must be small, the testing time impact may be slightly larger.
I think Atmel/Microchip painted themselves into a bit of a corner with the failure of the low-swing Xtal OSC to reach Full Silicon Speeds.
They would then need to fix that design, and the easier choice may have been to remove it instead, given 'most users do not use it', and 'hey, we can up-sell a Microchip Oscillator to the others !'.
That leaves those small portion of users who failed to make the product manager's cut, looking at other vendors/devices. (if they do not want the higher price /current of an external Oscillator)
There is trend to Clipped Sine low power oscillators, especially at higher precision, and those will need a Xtal amplifier, as they spec 0.8V p-p outputs.
The oscillator for the newer devices (PB) is just crap. I don't know how they managed to do it so badly. Probably they had a blind target to reduce power consumption (a "low power" crazy competion for "IoT" maybe). The Vpp for a 5V device is 0.6Vpp for one pin and 0.9Vpp for the other. I've never seen such a thing. The lowest Vpp I've seen was a 1.2Vpp but for a 3.3V device (and it was in fact on the internal 1.8V logic).
And this is not all! I'm using PB devices with an external clock. The output pin of the osc. was used as an GPIO output. Well, the output state of the pin somehow has impact on the input pin! (probably load). When the output is low, the amplitude of the external clock is bigger than when the output pin is high! Also, if you use the output pin as an gpio input, you can see oscillation on it!
The devices with full swing oscillator see 4.1Vpp/4.7Vpp on the pins (5V supply of course).
For the newest devices, tiny/mega 0/1, I lost my confidence when I saw that they don't even have the crystal option. I really think they still have the same crap inside (or even craper - if that's a word) so that they even decided to just not document the thing entirely. It's a joke that the big Atmel/Microchip are not able to put a simple crystal amplifier (unbuffered inverter) followed by a shmitt-trigger buffer or so. And some Rf. There are manufacturer which don't even have Rf inside (why bother?) and you need to put the 1M or such resistor outside.
If 32KHz crystal isn't accurate (temperature) then calibrate given an accurate reference (GNSS 1PPS, clock from USB UART)
Well, that's pleasant. However, what if you want to run accurately at 10.000MHz (such as for PWM or timers)...32.768 KHz isn't going to do much for you.
How about simply including the standard full-swing xtal option?--it seemed to work fine for years & years.
Maybe they'll forget how to make adc's & delete them too. Maybe someone with the secret sauce left Atmel.
... The Vpp for a 5V device is 0.6Vpp for one pin and 0.9Vpp for the other. I've never seen such a thing.
Sounds about right. The usual low swing oscillator, is actually a class A N-FET amplifier, current Fed. The N-fet gate threshold is well under 1V, and the p-p is usually about 2x the gate threshold.
The upper frequency should be defined by the current, and Xtal ESR. (ie change the current, and you change the upper MHz)
Lower C Xtals and lower ESR xtals, will oscillate up to a higher MHz as the non-oscillating loop gain increases with lower C.
The appeal of this circuit, is the Icc is quite stable, and does not vary with supply voltage - unlike a 74HCU04 approach.