PIC CCS C语言程序范例.doc
********************************
* PIC CCS C语言程序范例 *
********************************
The CCS C compiler includes a library of example programs for many common applications. Each example program contains a header with instructions on how to run the example, and if necessary, the wiring instructions for interfacing external devices.
Here are three such example programs included with our compiler, as well as a list file generated by the compiler which shows the assembly generated to correspond with the C code.
For a full list of example files and source code drivers included with the CCS C compiler go here
Jump to: Stepper Motor Controller | Seconds Timer | Simple A/D | Example List File | List of Example Files
Stepper Motor Controller
/
EX_STEP.C
This program interfaces to a stepper motor. The program will
use the RS-232 interface to either control the motor with a
analog input, a switch input or by RS-232 command.
Configure the CCS prototype card as follows:
Connect stepper motor to pins 47-50 (B0-B3)
Conenct 40 to 54 (pushbutton)
Connect 9 to 15 (pot)
See additional connections below.
/
(C) Copyright 1996,2001 Custom Computer Services
This source code may only be used by licensed users of the CCS
C compiler. This source code may only be distributed to other
licensed users of the