Details | Last modification | View Log | SVN | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 363 | johboh | 1 | /********************************************************************* |
| 2 | * |
||
| 3 | * General Delay rouines |
||
| 4 | * |
||
| 5 | ********************************************************************* |
||
| 6 | * FileName: Delay.h |
||
| 7 | * Dependencies: Compiler.h |
||
| 8 | * Processor: PIC18, PIC24F, PIC24H, dsPIC30F, dsPIC33F |
||
| 9 | * Complier: Microchip C18 v3.02 or higher |
||
| 10 | * Microchip C30 v2.01 or higher |
||
| 11 | * Company: Microchip Technology, Inc. |
||
| 12 | * |
||
| 13 | * Software License Agreement |
||
| 14 | * |
||
| 15 | * This software is owned by Microchip Technology Inc. ("Microchip") |
||
| 16 | * and is supplied to you for use exclusively as described in the |
||
| 17 | * associated software agreement. This software is protected by |
||
| 18 | * software and other intellectual property laws. Any use in |
||
| 19 | * violation of the software license may subject the user to criminal |
||
| 20 | * sanctions as well as civil liability. Copyright 2006 Microchip |
||
| 21 | * Technology Inc. All rights reserved. |
||
| 22 | * |
||
| 23 | * This software is provided "AS IS." MICROCHIP DISCLAIMS ALL |
||
| 24 | * WARRANTIES, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, NOT LIMITED |
||
| 25 | * TO MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND |
||
| 26 | * INFRINGEMENT. Microchip shall in no event be liable for special, |
||
| 27 | * incidental, or consequential damages. |
||
| 28 | * |
||
| 29 | * |
||
| 30 | * Author Date Comment |
||
| 31 | *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
||
| 32 | * Nilesh Rajbharti 5/9/02 Original (Rev 1.0) |
||
| 33 | * Nilesh Rajbharti 6/10/02 Fixed C18 ms and us routines |
||
| 34 | * Howard Schlunder 4/04/06 Changed for C30 |
||
| 35 | ********************************************************************/ |
||
| 36 | #ifndef DELAY_H |
||
| 37 | #define DELAY_H |
||
| 38 | |||
| 39 | #include "..\Include\Compiler.h" |
||
| 40 | #include <delays.h> |
||
| 41 | |||
| 42 | #ifndef INSTR_FREQ |
||
| 43 | #error INSTR_FREQ must be defined. |
||
| 44 | #endif |
||
| 45 | |||
| 46 | #define Delay10us(us) Delay10TCYx(((INSTR_FREQ/1000000)*us)) |
||
| 47 | #define DelayMs(ms) Delay1KTCYx((((INSTR_FREQ/1000)*ms)/1000)) |
||
| 48 | |||
| 49 | |||
| 50 | |||
| 51 | |||
| 52 | #endif |