Home

Defines | Functions

dwengoDelay.h File Reference

Delay routines. More...

Defines

#define delay_us(n)
 Delay in microseconds.

Functions

void delay_100us (int n)
 Delay in 100 microseconds.
void delay_ms (int n)
 Delay in milliseconds.
void delay_s (int n)
 Delay in seconds.

Detailed Description

Delay routines.

Implementation of delay functionality for the Dwengo board


Define Documentation

#define delay_us (   n)
Value:
{ char a=n;  \
    _asm                  \
  MOVLW a               \
  MOVF PLUSW2, 1, 0     \
  BZ   12               \
  DECF PLUSW2, 1, 0     \
loop:                     \
  MOVLW a               \
    MOVF PLUSW2, 1, 0     \
  BZ   8                \
  NOP                   \
  NOP                   \
  NOP                   \
  NOP                   \
  NOP                   \
  NOP                   \
  DECF PLUSW2, 1, 0     \
  BRA  -11              \
end:                      \
  _endasm }

Delay in microseconds.

Parameters:
nnumber (0-255) of microseconds to wait

Function Documentation

void delay_100us ( int  n)

Delay in 100 microseconds.

Parameters:
ntimes 100 microseconds the microcontroller has to wait
void delay_ms ( int  n)

Delay in milliseconds.

Parameters:
nnumber of milliseconds the program has to wait
void delay_s ( int  n)

Delay in seconds.

Parameters:
ntimes seconds the microcontroller has to wait
 All Data Structures Files Functions Variables Defines

Generated on Wed Dec 25 2013 23:03:08 for Dwengo library by doxygen 1.7.3