TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

PSA: If you're a fan of ATmega, try AVR Dx

150 点作者 scrps11 个月前

20 条评论

JoeCortopassi11 个月前
If you are a hobbyist reading all this, and trying to compare it to arduino or raspberry pi, do yourself a favor and buy one of these: <a href="https:&#x2F;&#x2F;www.adafruit.com&#x2F;product&#x2F;5325" rel="nofollow">https:&#x2F;&#x2F;www.adafruit.com&#x2F;product&#x2F;5325</a><p>$12, fantastic documentation and tutorials, and you can literally just plug it in via usb and edit the python code as if it&#x27;s just a text file on a thumb drive. No programmers, special IDE&#x27;s, or specialty equipment<p>Microcontrollers are fun again
评论 #40599782 未加载
评论 #40600428 未加载
评论 #40599388 未加载
评论 #40606586 未加载
评论 #40599433 未加载
评论 #40605041 未加载
评论 #40600571 未加载
guitarbill11 个月前
I&#x27;m a bit torn. While there&#x27;s something nice about the simplicity of an 8-bit device and DIP packages, I&#x27;ve come to enjoy ARM&#x27;s Serial Wire Debug, and ARM tooling. Definitely don&#x27;t miss avr-gcc and avrdude.<p>In a way, it&#x27;s ironic. The AVR tooling back in the day was just so much better than PIC (for a novice hobbyist, pre-Arduino).
评论 #40594677 未加载
评论 #40596484 未加载
watermelon011 个月前
I generally use ESP32 nowadays, since most things I do benefit from having WiFi connectivity, but I have fond memories of using AVR microcontrollers in the past.<p>For hobbyists, AVR (ATmega, ATtiny) microcontrollers were really great. Easy to use in C for most cases, great cross-platform toolchain, and many of them came as DIP package, which made them breadboard&#x2F;protoboard friendly.<p>Heck, we even had a USB 1.1 library, that could bitbang USB 1.1 on practically any AVR, including 8-pin ATtiny: <a href="https:&#x2F;&#x2F;www.obdev.at&#x2F;products&#x2F;vusb&#x2F;index.html" rel="nofollow">https:&#x2F;&#x2F;www.obdev.at&#x2F;products&#x2F;vusb&#x2F;index.html</a><p>Not to mention, that Arduino started with ATmega, and still have many board featuring it.<p>I definitely might check Dx line, just to see if the experience is the same as it was before.
dotdi11 个月前
I started working with Microcontrollers when 80C51s were still somewhat modern, and I remember how frustrating the toolchain and the general experience was.<p>When AVR came out with their ATmegas, it was a revelation. Not having to use shitty proprietary programmers and windows-only software was amazing. We could finally use Linux. PIC was one of the main competitors in our circles, but it was losing the foothold quickly, because the AVR tooling was just hands-down better.<p>Also, documentation was easier to read and interpret, especially compared to PIC, which is still giving me slight PTSD when I try to recall how hard it was to get non-mainstream features to work. Whenever I had to deep-dive PIC documentation I stumbled over weird behaviour or outright hardware bugs that, in some cases, could not even be worked around.<p>I don&#x27;t actively work with microcontrollers nowadays, but I am excited to hear that AVR is still making an effort to have an objectively good product. The market is tough nowadays, with ESP32s and ESP8266s being so cheap and widespread, but I hope AVR keeps it up.
评论 #40597339 未加载
_benj11 个月前
I have worked with DD and have some DA laying around. The UPDI is a very nice and simple programming interface. All that it takes is a USB-UART and a diode or a resistor (I used a diode) to connect between RX&#x2F;TX.<p>I didn’t used ATmega a lot, but comparing the experience to MSP430 and EFM8 the AVR chip has a bunch of niceties, superb documentation and life improvements like, in order to clear some registers all one need to do is write 1 instead of the whole =&amp; ~(REG | 0x8) (or something like that, it’s been a while since I write embedded C)<p>The other thing that I loved is that one can download headers for the chip directly from the manufacturer!<p>Way too many chip manufacturers keep locking headers&#x2F;libraries behind their proprietary IDEs, but Microchip, even though they have an IDE let’s you download the headers so one can use whatever tooling one is comfortable with! Props to Microchip for that!!
评论 #40597830 未加载
评论 #40596542 未加载
buserror11 个月前
Haven&#x27;t played with these yet, but they do look interesting. Might have also to add support for the new IO blocks in my AVR simulator simavr[0] -- I still use the AVR a lot, since they have no pipeline and other fancy CPU optimization, they are &#x27;cycle accurate&#x27; and are a lot closer to a PIO than most other more complex 32 bit CPUs.. Now that they ALSO have an equivalent to PIO it might even help with reaching faster IO speed when toggling pins.<p>[0]: <a href="https:&#x2F;&#x2F;github.com&#x2F;buserror&#x2F;simavr">https:&#x2F;&#x2F;github.com&#x2F;buserror&#x2F;simavr</a>
评论 #40596572 未加载
newswasboring11 个月前
This unlocked such fond memories, I&#x27;ll buy some just to make some LEDs blink. I am glad my first exposure to embedded systems was through ATmega series, not for the chip, but the user&#x27;s manual. That is perhaps the only manual I have read cover to cover, that thing took me to knowing rudimentary electronics to actually understanding a full system. The first real world system I could hold fully in my head, and that was an amazing feeling. Who ever wrote that, hats off. I remember then encountering the ARM manual which had similar clarity of writing. Were there like professional writers for these things?
评论 #40597301 未加载
genter11 个月前
Or, you can get an stm32g0 for $2, which is faster, has a modern 32 bit cpu, and has more powerful peripherals.
评论 #40597866 未加载
评论 #40593982 未加载
dragontamer11 个月前
AVR gives up on core&#x2F;SRAM and instead offers incredible peripherals. While AVR DA, DB, DD, EA, and EB chips can serve as replacements to ATmega (albeit with new pinouts), the newer chips are a completely different ballgame.<p>AVR DB has 3x OpAmps for free.<p>AVR EA and EB have differential 12-bit ADCs with programmable 1x to 16x gain. We&#x27;re not just talking about measuring 4mA to 20mA protocol easily, but you can measure uA of current with reasonable accuracy with just a shunt-resistor + the AVR EA&#x27;s ADC.<p>AVR DD has a dual power-supply with 1.8V to 5V support. That means that some pins can be on 3.3V logic while other pins are on 5V logic. IE: The AVR DD&#x27;s job is to be a built-in full-and-proper level shifter.<p>Bonus points: All modern AVR chips (Dx and Ex) have an event-system to route events from any peripheral (Timers, Pins, UART, etc. etc.) to many other pins and even interrupts to the CPU. This combines with the CCL programmable logic unit (Four 3-LUTs + two 1-bit memory cells) to have an incredible amount of &quot;glue logic&quot; built into these chips.<p>Anyone who comes in this topic and talks about &quot;But 32bit whatevers&quot;, ESP32 or about super-cheap RISC-V chips is missing the point of the AVR line. You&#x27;re not really the ones in the market for this chip. Anyone who has to deal with a cheap design that manipulates a bit of analog sensors, or glue together logic... well... AVR is the right chip for these jobs.<p>----------<p>There&#x27;s one problem. It means that you need to know the ins-and-outs of the peripherals that are offered on these chips. AVR DD cannot do the same current-measuring job that an AVR EA or AVR EB can do.<p>Mixed-signal Peripherals are so much harder to understand than MHz and SRAM. But for those who are &quot;in the know&quot;, well... these are awesome peripherals. Its difficult to find competitors to these chips.<p>Indeed, a proper bidirectional 3.3V to 5V level shifter across 28 I&#x2F;O pins alone would probably cost you more than the $1-ish AVR DD.<p>3x Rail-to-Rail OpAmps with programmable voltage-reference, a DAC and differential ADC is a *bargain* for the AVR DB&#x27;s $2 price point.<p>---------<p>And the whole line offers like 5V and 50mA in&#x2F;out on the GPIO. Its an extremely forgiving chip. The fun trick is to run Resistor+LED directly off of GPIO because... you can. (Typical LEDs are 20mA).
评论 #40600834 未加载
评论 #40601885 未加载
andrewstuart11 个月前
There&#x27;s actually tons of really interesting microcontrollers of every size and shape.<p>Many of them are available as dev boards for under $20.<p>You can burn plenty of hours and dollars browsing all the good stuff on electrodragon at <a href="https:&#x2F;&#x2F;www.electrodragon.com&#x2F;product-category&#x2F;dev-board&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.electrodragon.com&#x2F;product-category&#x2F;dev-board&#x2F;</a>
评论 #40594104 未加载
beryilma11 个月前
I regularly use both atmega328p (Arduino Uno) and stm32g0 (st-nucleo boards) microcontrollers for hobby projects. The linux toolchain for both are equally good. But the Nucleo boards are a lot cheaper than Arduino Uno&#x2F;Mega boards, have a lot more capabilities, any are 32-bit microcontrollers.<p>I am actually fascinated with the things you can do with stm32 chips. If I ever do a commercial project, I would definitely use stm32 chips. Bare metal programming them has been a lot of fun.
blutack11 个月前
See also the CH32V003 [0] (more expensive variants also available), a neat, cheap and standalone RISC-V with plenty of modern &amp; flexible peripherals, good package options, single wire debug and an open toolchain [1] for ~20c per.<p>Mitxela has a great article on them [2] and I totally agree they have a lot of the same joy &amp; simplicity of the ATTiny - but with the added bonus of lots of interesting DMA controller misuse!<p>The peripherals have a very STM feel (in a good way) which perhaps isn&#x27;t surprising given WCH&#x27;s history.<p>0: <a href="https:&#x2F;&#x2F;www.wch-ic.com&#x2F;products&#x2F;CH32V003.html" rel="nofollow">https:&#x2F;&#x2F;www.wch-ic.com&#x2F;products&#x2F;CH32V003.html</a><p>1: <a href="https:&#x2F;&#x2F;github.com&#x2F;cnlohr&#x2F;ch32v003fun">https:&#x2F;&#x2F;github.com&#x2F;cnlohr&#x2F;ch32v003fun</a><p>2: <a href="https:&#x2F;&#x2F;mitxela.com&#x2F;projects&#x2F;badge" rel="nofollow">https:&#x2F;&#x2F;mitxela.com&#x2F;projects&#x2F;badge</a>
评论 #40595902 未加载
评论 #40599291 未加载
snvzz11 个月前
AVR was cool, but I have moved on to RISC-V (ch32v, esp32c...).
ThrowawayTestr11 个月前
Does it have Arduino support?
评论 #40595375 未加载
评论 #40596215 未加载
SomeoneFromCA11 个月前
I want my AT90S2313 back. The best most versatile AVR imho of its era.
contingencies11 个月前
China prices are still double the old chips, with very limited availability (single digit volume for 2-3 models only). I trust China prices. If it aint there, it aint real.
评论 #40598895 未加载
lloydatkinson11 个月前
Would Rust for AVR work with these too I wonder?
评论 #40598815 未加载
megous11 个月前
Looks like a modern PIC with swapped out MCU core. Probably nothing to miss if you use PIC already.
评论 #40601189 未加载
throwaway8152311 个月前
Yeah these are cool, there is a bunch of info on SpenceKonde&#x27;s github pages,<p><a href="https:&#x2F;&#x2F;github.com&#x2F;SpenceKonde&#x2F;DxCore">https:&#x2F;&#x2F;github.com&#x2F;SpenceKonde&#x2F;DxCore</a>
hi-v-rocknroll11 个月前
The key points of marketing and executing a successful a MCU are:<p>0. simplicity<p>1. robustness<p>2. developer support<p>3. essential features