1. rathishag007

    Thread Starter New Member

    Jun 12, 2008
    2
    0
    Hi,,,,,
    I need a subprogram of 1 SECOND delay.......I want to call this routine frequently..Because i am doing my project traffic light.so i want to CALL the delay of 1 second ,20 times for highway road and 5 times for pocket road. please anyone can help me..I need my delay pgm in assembly language.................


    Advanced thanXXX
     
  2. nanovate

    Distinguished Member

    May 7, 2007
    665
    1
    datasheet: look at timers and prescalers
    The PIC16C72A is OTP -- you got one shot to get it right. Look at PIC16F72
     
  3. brucey

    New Member

    Jun 26, 2008
    3
    0
  4. Reshma

    Active Member

    Mar 11, 2007
    54
    0
    You have to first understand the how the timing cycles work and the time period of each machine cycle. Since the PIC instructions are orthogonal each instruction uses 1 Machine cycle. Anyway, here is a fun page which will generate the code for the required delay:
    http://www.piclist.com/techref/piclist/codegen/delay.htm
    ;)