提出一种基于单片机AT89C51SND1C的MP3播放系统的设计方案。单片机集成了专用的解码器,使用K9F1208闪存作为外存储器,放音电路采用CS4330,存储文件通过播放器上的USB接口设备从PC机上直接下载,液晶显示采用LCD1602。方案设计简单,性价比高,低功耗,易扩展。由于采用的是通用单片机实现的,可以很容易地移植到其他微控制器系统中,有很强的市场竞争能力和实用价值。 Abstract: A MP3 player design based on microchip AT89C51SND1C was presented, which used K9F1208 Flash chip as the memory circuit and used CS4330 as play chip. Storage files were download from PC through USB interfaces player on the device,and the LCD/602 was used as display screen. This system had characteristics of simple design,low power,easy expand,low cost and high recognition. Using of universual microchip make it easy to transplant to other microcontrol system,and have strong market competitiom and practical value.
上传时间: 2014-12-27
上传用户:佳期如梦
ICCAVR简介ICCAVR 是一种使用ANSI 标准C 语言来开发微控制器(MCU)程序的一个工具,它是一个综合了编辑器和工程管理器的集成工作环境(IDE)。源文件全部被组织到工程之中,文件的编辑和工程(project)的构筑也在IDE 的环境中完成。编译错误在状态窗口中显示,用鼠标单击编译错误时,光标会自动跳转到出错行。这个工程管理器还能直接产生INTEL HEX格式的烧写文件和可以在AVR Studio 中调试的COFF 格式的调试文件。这里特别要提一下ICCAVR 中的应用构筑向导,可以在Tools 栏中选择“ApplicationBiulder”或者直接点击快捷工具栏中的“Application Biulder”图标,就可以打开应用构筑向导对话框,可以根据需要设定芯片种类,各个端口初始值,是否使用定时器,中断,UART等,选好以后单击“OK”就可以得到所需的硬件初始化程序段,非常可靠而且方便。图1给出了初始化UART 的一个例子:下面介绍一下创建并编译一个工程文件的简要步骤:1.新建一个源文件从file 菜单中选择new,创建一个新文件,在改文件中输入源程序并进行编辑和修改,然后存盘,在存盘时必须指定文件类型,如命名为:try.c 。写一个新文件的步骤:首先用Biulder 初始化需要用到的硬件资源,生成初始化程序,然后再写需要的代码实现所要的功能。2.新建一个project从projrct 菜单中选择new 命令,IDE 会弹出一个对话框,在对话框中用户可以指定工程存放的文件夹和工程的名称。在建立一个新工程之后,在工程管理器的窗口会出现三个子目录,Files, Headers, Documents,这时就可以将要编译的文件添加到project 中了。3.把文件添加到工程中可以在project-files 里单击右键,选择需要添加的文件;也可以在编辑窗口中单击右键选择弹出窗口的“Add To Project”命令。4.编译源文件在编译之前特别要注意在Project Options 中选择与硬件相应的芯片。如本次实验就选择ATMEGA8515,如图2 所示。在project 中选择make project,也可以直接单击快捷键F9,这时要是有错则会弹出出错信息,修改调试正确以后单击快捷键ISP 就可以烧写到硬件中去了。
标签: ICCAVR
上传时间: 2013-10-25
上传用户:569342831
MPLAB C30用户指南(英文) HIGHLIGHTSThe information covered in this chapter is as follows:• About this Guide• Recommended Reading• Troubleshooting• The Microchip Web Site• Development Systems Customer Notification Service• Customer Support Document LayoutThe document layout is as follows:• Chapter 1: Compiler Overview – describes MPLAB C30, development tools andfeature set.• Chapter 2: Differences between MPLAB C30 and ANSI C – describes thedifferences between the C language supported by MPLAB C30 syntax and thestandard ANSI-89 C.• Chapter 3: Using MPLAB C30 – describes how to use the MPLAB C30 compilerfrom the command line.• Chapter 4: MPLAB C30 Runtime Environment – describes the MPLAB C30runtime model, including information on sections, initialization, memory models, thesoftware stack and much more.• Chapter 5: Data Types – describes MPLAB C30 integer, floating point and pointerdata types.• Chapter 6: Device Support Files – describes the MPLAB C30 header and registerdefinition files, as well as how to use with SFR’s.• Chapter 7: Interrupts – describes how to use interrupts.• Chapter 8: Mixing Assembly Language and C Modules – provides guidelines tousing MPLAB C30 with MPLAB ASM30 assembly language modules.
上传时间: 2013-10-21
上传用户:13925096126
Keil 软件实例教程 2 单片机开发中除必要的硬件外,同样离不开软件,我们写的汇编语言源程序要变为CPU可以执行的机器码有两种方法,一种是手工汇编,另一种是机器汇编,目前已极少使用手工汇编的方法了。机器汇编是通过汇编软件将源程序变为机器码,用于MCS-51 单片机的汇编软件有早期的A51,随着单片机开发技术的不断发展,从普遍使用汇编语言到逐渐使用高级语言开发,单片机的开发软件也在不断发展,Keil 软件是目前最流行开发MCS-51 系列单片机的软件,这从近年来各仿真机厂商纷纷宣布全面支持Keil 即可看出。Keil 提供了包括C编译器、宏汇编、连接器、库管理和一个功能强大的仿真调试器等在内的完整开发方案,通过一个集成开发环境(uVision)将这些部份组合在一起。运行Keil 软件需要Pentium 或以上的CPU,16MB或更多RAM、20M 以上空闲的硬盘空间、WIN98、NT、WIN2000、WINXP等操作系统。掌握这一软件的使用对于使用51 系列单片机的爱好者来说是十分必要的,如果你使用C 语言编程,那么Keil 几乎就是你的不二之选(目前在国内你只能买到该软件、而你买的仿真机也很可能只支持该软件),即使不使用C 语言而仅用汇编语言编程,其方便易用的集成环境、强大的软件仿真调试工具也会令你事半功倍。我们将通过一些实例来学习Keil 软件的使用,在这一部份我们将学习如何输入源程序,建立工程、对工程进行详细的设置,以及如何将源程序变为目标代码。图1 所示电路图使用89C51 单片机作为主芯片,这种单片机性属于MCS-51 系列,其内部有4K 的FLASH ROM,可以反复擦写,非常适于做实验。89C51 的P1 引脚上接8 个发光二极管,P3.2~P3.4 引脚上接4 个按钮开关,我们的第一个任务是让接在P1 引脚上的发光二极管依次循环点亮。 一、Keil 工程的建立首先启动Keil 软件的集成开发环境,这里假设读者已正确安装了该软件,可以从桌面上直接双击uVision 的图标以启动该软件。UVison启动后,程序窗口的左边有一个工程管理窗口,该窗口有3 个标签,分别是Files、Regs、和Books,这三个标签页分别显示当前项目的文件结构、CPU 的寄存器及部份特殊功能寄存器的值(调试时才出现)和所选CPU 的附加说明文件,如果是第一次启动Keil,那么这三个标签页全是空的。
上传时间: 2013-10-26
上传用户:ruan2570406
Keil 软件实例教程 1. 单片机开发中除必要的硬件外,同样离不开软件,我们写的汇编语言源程序要变为CPU可以执行的机器码有两种方法,一种是手工汇编,另一种是机器汇编,目前已极少使用手工汇编的方法了。机器汇编是通过汇编软件将源程序变为机器码,用于MCS-51 单片机的汇编软件有早期的A51,随着单片机开发技术的不断发展,从普遍使用汇编语言到逐渐使用高级语言开发,单片机的开发软件也在不断发展,Keil 软件是目前最流行开发MCS-51 系列单片机的软件,这从近年来各仿真机厂商纷纷宣布全面支持Keil 即可看出。Keil 提供了包括C编译器、宏汇编、连接器、库管理和一个功能强大的仿真调试器等在内的完整开发方案,通过一个集成开发环境(uVision)将这些部份组合在一起。运行Keil 软件需要Pentium 或以上的CPU,16MB或更多RAM、20M 以上空闲的硬盘空间、WIN98、NT、WIN2000、WINXP等操作系统。掌握这一软件的使用对于使用51 系列单片机的爱好者来说是十分必要的,如果你使用C 语言编程,那么Keil 几乎就是你的不二之选(目前在国内你只能买到该软件、而你买的仿真机也很可能只支持该软件),即使不使用C 语言而仅用汇编语言编程,其方便易用的集成环境、强大的软件仿真调试工具也会令你事半功倍。我们将通过一些实例来学习Keil 软件的使用,在这一部份我们将学习如何输入源程序,建立工程、对工程进行详细的设置,以及如何将源程序变为目标代码。图1 所示电路图使用89C51 单片机作为主芯片,这种单片机性属于MCS-51 系列,其内部有4K 的FLASH ROM,可以反复擦写,非常适于做实验。89C51 的P1 引脚上接8 个发光二极管,P3.2~P3.4 引脚上接4 个按钮开关,我们的第一个任务是让接在P1 引脚上的发光二极管依次循环点亮。 一、Keil 工程的建立首先启动Keil 软件的集成开发环境,这里假设读者已正确安装了该软件,可以从桌面上直接双击uVision 的图标以启动该软件。UVison启动后,程序窗口的左边有一个工程管理窗口,该窗口有3 个标签,分别是Files、Regs、和Books,这三个标签页分别显示当前项目的文件结构、CPU 的寄存器及部份特殊功能寄存器的值(调试时才出现)和所选CPU 的附加说明文件,如果是第一次启动Keil,那么这三个标签页全是空的。
上传时间: 2013-11-25
上传用户:hanbeidang
CLK:时钟信号 CMD:双向命令和响应信号 DAT0-3:双向数据信号 VDD,VSS:电源和地信号 SD模式下允许有一个主机, 多个从机(即多个卡), 主机可以给从机分别地址. 主机发 命令有些命令是发送给指定的从机,有些命令可以以广播形式发送. SD模式下可以选择总线宽度, 即选用几根DAT信号线, 可以在主机初始化后设置
标签: 协议
上传时间: 2013-10-11
上传用户:daxigua
Using the XGATE for Manchester DecodingTable of Contents 1 Introduction 1.1 XGATE Module in S12X 2 Decoding Algorithm 3 Software Implementation 3.1 Frame Scheme 3.2 Operating Modes and Demo 3.3 Files Summary 3.4 Complete Mode Flowchart 4 Manchester Encoder 4.1 Devices Used 5 Conclusion Appendix A Noise Elements During RF Transmissions in the Manchester Decoding ImplementationA.1 Types of Noise A.2 Effects of Noise A.3 Workaround for Noise Effects
标签: Manchester XGATE 译码
上传时间: 2013-10-15
上传用户:wqq123456
The C500 microcontroller family usually provides only one on-chip synchronous serialchannel (SSC). If a second SSC is required, an emulation of the missing interface mayhelp to avoid an external hardware solution with additional electronic components.The solution presented in this paper and in the attached source files emulates the mostimportant SSC functions by using optimized SW routines with a performance up to 25KBaud in Slave Mode with half duplex transmission and an overhead less than 60% atSAB C513 with 12 MHz. Due to the implementation in C this performance is not the limitof the chip. A pure implementation in assembler will result in a strong reduction of theCPU load and therefore increase the maximum speed of the interface. In addition,microcontrollers like the SAB C505 will speed up the interface by a factor of two becauseof an optimized architecture compared with the SAB C513.Moreover, this solution lays stress on using as few on-chip hardware resources aspossible. A more excessive consumption of those resources will result in a highermaximum speed of the emulated interface.Due to the restricted performance of an 8 bit microcontroller a pin compatible solution isprovided only; the internal register based programming interface is replaced by a set ofsubroutine calls.The attached source files also contain a test shell, which demonstrates how to exchangeinformation between an on-chip HW-SSC and the emulated SW-SSC via 5 external wiresin different operation modes. It is based on the SAB C513 (Siemens 8 bit microcontroller).A table with load measurements is presented to give an indication for the fraction of CPUperformance required by software for emulating the SSC.
标签: synchronous Emulating serial
上传时间: 2014-01-31
上传用户:z1191176801
The solution presented in this paper and in the attached source files emulates the mostimportant SSC functions by using SW routines implemented in C. The code is focused onthe SAB C513, but will fit to all C500 derivatives.Beyond the low level software drivers a test shell is delivered. This shell allows a quicktest of the software drivers by an emulator or a starter kit demo board.
上传时间: 2013-11-24
上传用户:363186
#include <reg51.h>#include<intrins.h> #define BUSY1 (DQ1==0) sbit DQ1 = P0^4; unsigned char idata TMP; unsigned char idata TMP_d; unsigned char f; void wr_ds18_1(char dat);unsigned char rd_ds18_1(); /***************延时程序,单位us,大于10us*************/void time_delay(unsigned char time){ time=time-10; time=time/6; while(time!=0)time--;} /*****************************************************//* reset ds18b20 *//*****************************************************/void ds_reset_1(void){ unsigned char idata count=0; DQ1=0; time_delay(240); time_delay(240); DQ1=1; return;}
上传时间: 2013-10-29
上传用户:sssnaxie