This application note gives an example for microcontroller C code. It includes code for:
Readout of Humidity (RH) or Temperature (T) with basic error handling
Calculation of RH linearization and temperature compensation
Access to status register
Dewpoint calculation from RH and T
UART handling
Setting up an ADOCE project using Visual C++ 6.0 is rather simple. Assuming that you have downloaded and installed the ADOCE SDK from Microsoft, you are ready to use it in your Windows CE Database applications. The sample that I have provided is a *very* simple one illustrating how to instantiate the proper COM objects, and the basics of how to interface with them (in a very simple example)
Addressbook using double-linked list. This example shows the use of a double-linked list by implementing an addressbook for the console. It has features like inserting, searching(linear), sorting(bubble sort), deleting and load/save to a file. I wrote this during my study of Applied Computer Science so it s intended mainly for students who want to know about some advanced programming techniques in C. The Code was compiled with MSVC++ 6.0 but it should compile with any ANSI-compliant compiler.
OXCC is a multipass, interpreting C compiler with several language extensions. It generates an Architecture Neutral Format (ANF) output and comes with a couple of example back ends. Programmers are expected to write additional back ends for their specific needs.
prolog 找路例子程序:
=== === === === === ===
Part 1-Adding connections
Part 2-Simple Path
example
| ?- path1(a,b,P,T).
will produce the response:
T = 15
P = [a,b] ?
Part 3 - Non-repeating path
As an example, the query:
?- path2(a,h,P,T).
will succeed and may produce the bindings:
P = [a,depot,b,d,e,f,h]
T = 155
Part 4 - Generating a path below a cost threshold
As an example, the query:
?- path_below_cost(a,[a,b,c,d,e,f,g,h],RS,300).
returns:
RS = [a,b,depot,c,d,e,g,f,h] ?
RS = [a,c,depot,b,d,e,g,f,h] ?
no
==================================
VS1002D ADPCM RECORDING INSTRUCTIONS v 1.0
(C) 2004-09-23 VLSI SOLUTION OY
This is a software package to patch VS1002d ADPCM recording
capability. It is explained in VS10XX Application Notes,
available at http://www.vlsi.fi/download/
See also source code src/microcontrol.c for example.
在C語言中,可以用keep ( )函數(shù)將程序駐留內(nèi)存。這個(gè)函數(shù)有兩個(gè)參數(shù):status和size。size為駐留內(nèi)存長(zhǎng)度,可以用size=_SS+_SP/16-_psp得到,當(dāng)然這也是一種估算的方法,并不是精確值。函數(shù)執(zhí)行完以后,出口狀態(tài)信息保存在status中。比如,對(duì)于上面的例子,將“geninterrupt (0x60) ”改寫成“keep(0,_SS+_SP/16-_psp) ”后再執(zhí)行程序,這一段程序就被駐留,此后在其它的任何軟件或程序設(shè)計(jì)中,只要用到了60H號(hào)中斷,就會(huì)在屏幕上顯示“This is an example!”的字樣。要恢復(fù)系統(tǒng)對(duì)60H號(hào)中斷的定義,只能重新啟動(dòng)計(jì)算機(jī)。
UART I/O and Memory Allocation Example for GNU
The project GNU_IODemo shows how to use memory allocation routines (malloc) and char I/O (printf, scanf) via a serial interface with the GNU toolchain.
The I/O functions are adapted for the Analog Devices ADuC7000 series using the SERIAL.C module.
The example also shows the efficiency of the Keil CA ARM Compiler run-time library which is tuned for single chip systems.