Hot Search : Source embeded web remote control p2p game More...
Location : Home Search - compare d
Search - compare d - List
This example program shows how to configure and use the A/D Converter of the following microcontroller: STMicroelectronics ST10F166 After configuring the A/D, the program reads the A/D result and outputs the converted value using the serial port. To run this program... Build the project (Project Menu, Build Target) Start the debugger (Debug Menu, Start/Stop Debug Session) View the Serial Window (View Menu, Serial Window #1) View the A/D converter peripheral (Peripheral Menu, A/D Converter) Run the program (Debug Menu, Go) A debug script (debug.ini) creates buttons that set different analog values in A/D channels. As the program runs, you will see the A/D input and output change. Other buttons create signals that generate sine wave or sawtooth patterns as analog inputs. µ Vision3 users may enable the built-in Logic Analyzer to view, measure and compare these input signals graphically.-This example shows how to program configur e and use the A / D Converter of the following MICR ocontroller : STMicroelectronics ST10F166 After configuri ng the A / D, the program reads the A / D and outputs the result converted value using the serial port. To run th Build program ... is the project (Project Menu, Build Target) Start the debugger (Debug Menu, Start / Stop Debug Session) View the Serial Wind ow (View Menu, Serial Window # 1) View the A / D converter Periph General (Peripheral Menu, A / D Converter) Run the program (Debug Menu, Go) A debug script (debug.ini) creates buttons that set different analog values in A / D channel s. As the program runs, you will see the A / D input and output change. Oth er buttons create signals that generate sine wa ve or sawtooth patterns as anal
Date : 2008-10-13 Size : 18.63kb User : 郭文彬

自定义一个简单的日期类DateType,它具有数据成员y、m、d,用来表示当前日期的年、月、日。而后设计该类欲实现(完成)的功能,进而设计出相应的类成员函数。 例如,下面给出的“雏形”可用来实现对天的增加,比较两个日期是否相等,以及对日期的输出等操作。请完成各类成员函数,并编制主函数,说明DateType类对象,对定义的各成员函数进行调用,以验证它们的正确性。 class DateType { //自定义的日期类DateType int y,m,d //数据成员,表示当前日期的年、月、日 public: DateType(int y0=1, int m0=1, int d0=1) //构造函数,设定年、月、日;并设置参数默认值 void incrementDay() //增加1天 bool equal(DateType dt2) //判断二日期是否相等 void printDate() //屏幕输出日期对象的有关数据(年、月、日) } -from the simple definition of a category DateType date, it has data members y, m, d, said the date for the current year, month, day. Then the design of such wishes to achieve (completed) function, and then design the class member functions. For example, the following is a "prototype" can be used to achieve the increase in the days to compare the same date. and the date of the export operation. Please complete the various members function, and the preparation of the main function, note DateType type object, definition of the members of the function call to verify their accuracy. Class DateType (/ / define the date category DateType int y, m, d / / data members, said the date of the current year, month, day public : DateType (int y0 = 1, m0 = 1 int, int d002 = 1) / / constructor fu
Date : 2008-10-13 Size : 4.04kb User : fisherman

C++完美演绎 经典算法 如 /* 头文件:my_Include.h */ #include <stdio.h> /* 展开C语言的内建函数指令 */ #define PI 3.1415926 /* 宏常量,在稍后章节再详解 */ #define circle(radius) (PI*radius*radius) /* 宏函数,圆的面积 */ /* 将比较数值大小的函数写在自编include文件内 */ int show_big_or_small (int a,int b,int c) { int tmp if (a>b) { tmp = a a = b b = tmp } if (b>c) { tmp = b b = c c = tmp } if (a>b) { tmp = a a = b b = tmp } printf(\"由小至大排序之后的结果:%d %d %d\\n\", a, b, c) } 程序执行结果: 由小至大排序之后的结果:1 2 3 可将内建函数的include文件展开在自编的include文件中 圆圈的面积是=201.0619264-C perfect interpretation of classic algorithms / * header files : my_Include.h * / # include lt; Stdio.hgt; / * Start with the built-in C language function instructions * / # define PI 3.1415926 / * Acer constants later, in another chapter Elaborates on * / # define circle (radius) (PI * * radius radius) / * Macro function, a round of the area * / / * to compare the numerical size of the write functions include writing paper * / int show_big_or_small (int a, b int, int c) (int tmp if (Agt; b) (tmp = a b a = b = tmp) if (BGT; c) (tmp = b b = c c = tmp) if (Agt; b) ( tmp = a b a = b = tmp) printf ( "ascending order by the following results :% d% d% d \\ n", a, b, c)) procedures : in ascending order by the following results : 1 2 3 will the built-in functions include documents writte
Date : 2008-10-13 Size : 127.5kb User : 立功
CodeBus is one of the largest source code repositories on the Internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.