i want to write a program that can light up the LED and after 0.5sec, the LED will off itself.
so i need a delay program program, can anyone help me?
below is part of my program
using dspic30f5014a and dspicdem 1.1 plus development board)
_Init_PortD9:
;clr LATD ;clear all port D latches to 0
bclr LATD, #LATD1 ;set selected latches 1 to 0
bclr LATD, #LATD2 ;set selected latches 2 to 0
bclr LATD, #LATD3 ;set selected latches 3 to 0
bclr LATD, #LATD4 ;set selected latches 4 to 0
bclr LATD, #LATD5 ;set selected latches 5 to 0
bclr LATD, #LATD6 ;set selected latches 6 to 0
bclr LATD, #LATD7 ;set selected latches 7 to 0
bclr LATD, #LATD8 ;set selected latches 8 to 0
bset LATD, #LATD9 ;set selected latches 9 to 1
call Delay
return ;return to calling routine
Delay:
How to continue with the delay code??/