百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
A

AVR-projects

> 编程语言
开源

用 C 写成的独立 AVR 项目集

182 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

用 C 写成的独立 AVR 项目集

AVR-projects

This repository contains a growing collection of individual AVR project files for various tasks. I personally use these projects as starting points for new microcontroller projects, or reference for common procedudures I would otherwise have to go back to the datasheet for (timers, counters, frequency counting or synthesis, interrupts, UART, I2C, ADC, etc). Each folder is self-contained and has batch scripts to set fuses to change the clock source (internal RC oscillator at 8MHz, div/8 for 1MHz, or external crystal typically up to 20 MHz)

These are some of my favorites:

  • Blink an LED with an ATTiny45, ATTiny2313, or ATMega328
  • sending data from a microcontroller to a PC with USART (likely via USB serial port)
    • USART for ATTiny2313
    • ATMega328 wired or over bluetooth
    • interrupt driven vs. polling method for USART input
  • PWM for ATTiny2313 or PWM for ATTiny85
  • code to interface with a rotary encoder
  • ultra minimal frequency generator I use for all sorts of stuff
  • code to read ADC values and send them over serial with ATMega328 (including code for ADC noise reduction mode)

Programming Setup

I almost always use AVRISPmkII and AVRdude (launched from a batch script) to program my chips. I virtually never use AVRStudio. I typically develop in a Windows environment, but the code (and AVRdude) works the same in Linux.

Software

  • Just install WinAVR and it should install drivers for common programmers.
  • I prefer to edit C code in Notepad++
  • definately check out AVRDudess (a GUI for AVRdude) as an easy GUI to load flash onto chips

Hardware

  • AVR Programming in 64-bit Windows 7 (should also work for windows 10)
  • windows 10 driver for USBTiny is here
  • actually I only got it to work after installing Zadig

Programmers

Note Picture
AVRISPmkII is a ceap, fast, and convenient AVR programmer.
Bus Pirate technically can program AVRs, but it's so slow it's not practical. Here's a post I wrote about it. I like the bus pirate when I need to use software to measure voltages and toggle pins. It's slow though, because the handshake it bit-banged and it takes tens of seconds to program an AVR. For just programming, I prefer an (ebay knockoff) AVR ISP mkII. Definately check out AVRDudess as a GUI for AVRDude. I usually get a standard command for a project and put it in a batch file in the same folder.
AVRDudess can simplify programming of code and fuses.

Serial Terminal

I highly recommend RealTerm for Windows

Common AVR Datasheets and Pinouts

chip pinout datasheets
ATMega328 [summary] [complete]
ATTiny2313 [summary] [complete]
ATTiny45 [summary] [complete]
void waitMs1(){_delay_ms(1);}
void waitMs(int ms){while (ms-->0){waitMs1();}}
void waitSec(int sec){while (sec-->0){waitMs(1000);}}

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言