AVR 單片機與GCC編程 目錄第一章 AVR 單片機開發概述1.1 一個簡簡單的例子1.2 用MAKEFILE 管理項目1.3 開發環境的配置第二章 存儲器操作2.1 AVR 單片機存儲器組織結構2.2 I/O 寄存器操作2.3 SRAM 內變量的使用2.4 在程序中訪問FLASH 程序存儲器2.5 EEPROM 數據存儲器操作2.6 avr-gcc 段結構與再定位第三章 功能模塊編程示例3.1 中斷服務程序3.2 定時器/計數器應用3.3 看門狗應用3.4 UART 應用3.5 PWM 功能編程3.6 模擬比較器3.7 A/D 轉換模塊編程第四章 使用C 語言標準I/O 流調試程序4.1 avr-libc 標準I/O 流描述4.2 利用標準I/0 流調試程序第五章 AT89S52 下載編程器的制作5.1 LuckyProg S52 概述5.2 AT89S52 ISP 功能簡介5.3 程序設計第六章 硬件TWI 端口編程6.1 TWI 模塊概述6.2 主控模式操作實時時鐘DS13076.3 兩個Mega8 間的TWI 通信第七章 BootLoader 功能應用7.1 BootLoader 功能介紹7.2 avr-libc 對BootLoader 的支持7.3 BootLoader 應用實例 第八章 匯編語言支持8.1 C 代碼中內聯匯編程序8.2 獨立的匯編語言支持8.3 C 與匯編混合編程第九章 C++語言支持結束語附錄 1 avr-gcc 選項附錄 2 ihex 格式描述
上傳時間: 2013-10-26
上傳用戶:wangyi39
AT89C2051驅動步進電機的電路和源碼:AT89C2051驅動步進電機的電路和源碼 程序:stepper.c stepper.hex/* * STEPPER.C * sweeping stepper's rotor cw and cww 400 steps * Copyright (c) 1999 by W.Sirichote */#i nclude c:\mc5151io.h /* include i/o header file */ #i nclude c:\mc5151reg.hregister unsigned char j,flag1,temp; register unsigned int cw_n,ccw_n;unsigned char step[8]={0x80,0xc0,0x40,0x60,0x20,0x30,0x10,0x90} #define n 400/* flag1 mask byte 0x01 run cw() 0x02 run ccw() */main(){ flag1=0; serinit(9600); disable(); /* no need timer interrupt */ cw_n = n; /* initial step number for cw */ flag1 |=0x01; /* initial enable cw() */while(1){ { tick_wait(); /* wait for 10ms elapsed */energize(); /* round-robin execution the following tasks every 10ms */ cw(); ccw(); } }}cw(){ if((flag1&0x01)!=0) { cw_n--; /* decrement cw step number */ if (cw_n !=0) j++; /* if not zero increment index j */ else {flag1&=~0x01; /* disable cw() execution */ ccw_n = n; /* reload step number to ccw counter */ flag1 |=0x02; /* enable cww() execution */ } }
上傳時間: 2013-11-21
上傳用戶:boyaboy
This application note describes how to decode standard DTMF tones using the minimum number of external discrete components and a PIC. The two examples use a PIC which has an 8 bit timer and either a comparator or an ADC, although it can be modified for use on a PIC which has only digital I/O. The Appendices have example code for the 16C662 (with comparator) and 16F877 (using the ADC). As the majority of the Digital Signal Processing is done in software, little is required in the way of external signal conditioning. Software techniques are used to model the individual elements of a DTMF Decoder IC.
上傳時間: 2013-11-21
上傳用戶:zhaoke2005
LPC900 系列單片機由于其功能強大,性能穩定一直深受用戶歡迎。P89LPC901 是LPC900 系列單片機的一員,性價比極高,為SO8/DIP8 封裝,內含1KB FLASH,支持ICP,且具有6 個I/O 口、4 個TIMER、1 路PWM 輸出、模擬比較器、鍵盤中斷等眾多功能部件。本文利用LPC901 單片機的強大功能實現ADC/DAC,并且通過模擬UART 與PC 機進行通信;通過PC 端軟件可以顯示DA 轉換結果及控制DA 輸出電壓。
上傳時間: 2013-11-06
上傳用戶:shus521
The PCA9534 is a 16-pin CMOS device that provide 8 bits of General Purpose parallel Input/Output (GPIO) expansion for I2C-bus/SMBus applications and was developed to enhance the NXP Semiconductors family of I2C-bus I/O expanders. The improvements include higher drive capability, 5 V I/O tolerance, lower supply current, individual I/O configuration, 400 kHz clock frequency, and smaller packaging. I/O expanders provide a simple solution when additional I/O is needed for ACPI power switches, sensors, push buttons, LEDs, fans, etc.
上傳時間: 2013-10-10
上傳用戶:inwins
The PCA9535 and PCA9535C are 24-pin CMOS devices that provide 16 bits of GeneralPurpose parallel Input/Output (GPIO) expansion for I2C-bus/SMBus applications and wasdeveloped to enhance the NXP Semiconductors family of I2C-bus I/O expanders. Theimprovements include higher drive capability, 5 V I/O tolerance, lower supply current,individual I/O configuration, and smaller packaging. I/O expanders provide a simplesolution when additional I/O is needed for ACPI power switches, sensors, push buttons,LEDs, fans, etc.
上傳時間: 2013-10-21
上傳用戶:愛死愛死
The PCA9536 is an 8-pin CMOS device that provides 4 bits of General Purpose parallelInput/Output (GPIO) expansion for I2C-bus/SMBus applications and was developed toenhance the NXP Semiconductors family of I2C-bus I/O expanders. I/O expanders providea simple solution when additional I/O is needed for ACPI power switches, sensors,push buttons, LEDs, fans, etc.
上傳時間: 2013-10-09
上傳用戶:731140412
The PCA9537 is a 10-pin CMOS device that provides 4 bits of General Purpose parallelInput/Output (GPIO) expansion with interrupt and reset for I2C-bus/SMBus applicationsand was developed to enhance the NXP Semiconductors family of I2C-bus I/O expanders.I/O expanders provide a simple solution when additional I/O is needed for ACPI powerswitches, sensors, push-buttons, LEDs, fans, etc.
上傳時間: 2013-10-14
上傳用戶:wuchunzhong
The PCA9538 is a 16-pin CMOS device that provides 8 bits of General Purpose parallelInput/Output (GPIO) expansion with interrupt and reset for I2C-bus/SMBus applicationsand was developed to enhance the NXP Semiconductors family of I2C-bus I/O expanders.I/O expanders provide a simple solution when additional I/O is needed for ACPI powerswitches, sensors, push-buttons, LEDs, fans, etc.
上傳時間: 2014-01-24
上傳用戶:youmo81
The PCA9539; PCA9539R is a 24-pin CMOS device that provides 16 bits of GeneralPurpose parallel Input/Output (GPIO) expansion with interrupt and reset forI2C-bus/SMBus applications and was developed to enhance the NXP Semiconductorsfamily of I2C-bus I/O expanders. I/O expanders provide a simple solution when additionalI/O is needed for ACPI power switches, sensors, push buttons, LEDs, fans, etc.
上傳時間: 2013-11-10
上傳用戶:ewtrwrtwe