17.02.2015 Views

CCS C Compiler Manual PCB / PCM / PCH

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Example Programs<br />

How to use the enhanced PWM module of the PIC18 for motor controls.<br />

EX_PSP.C<br />

Uses the PIC PSP to implement a printer parallel to serial converter<br />

EX_PULSE.C<br />

Measures a pulse width using timer0<br />

EX_PWM.C<br />

Uses the PIC CCP module to generate a pulse stream<br />

EX_QSORT.C<br />

An example of using the stdlib function qsort() to sort data. Pointers to functions is used by<br />

qsort() so the user can specify their sort algorithm.<br />

EX_REACT.C<br />

Times the reaction time of a relay closing using the CCP module<br />

EX_RFID.C<br />

An example of how to read the ID from a 125kHz RFID transponder tag.<br />

EX_RMSDB.C<br />

Calculates the RMS voltage and dB level of an AC signal<br />

EX_RS485.C<br />

An application that shows a multi-node communication protocol commonly found on RS-485<br />

busses.<br />

EX_RTC.C<br />

Sets and reads an external Real Time Clock using RS232<br />

EX_RTCLK.C<br />

Sets and reads an external Real Time Clock using an LCD and keypad<br />

EX_RTCTIMER.C<br />

How to use the PIC's hardware timer as a real time clock.<br />

EX_RTOS_DEMO_X.C<br />

9 examples are provided that show how to use <strong>CCS</strong>'s built-in RTOS (Real Time Operating<br />

System).<br />

EX_SINE.C<br />

Generates a sine wave using a D/A converter<br />

EX_SISR.C<br />

Shows how to do RS232 serial interrupts<br />

EX_STISR.C<br />

Shows how to do RS232 transmit buffering with interrupts<br />

EX_SLAVE.C<br />

375

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!