1. mrinalini

    Thread Starter New Member

    Aug 28, 2012
    6
    0
    i had generate a freq of 1Hz,2Hz,3Hz till 100 Hz by timer1 TMR1H and TMR1L...
    T1CON.T1CKPS0 and T1CON.T1CKPS1....i am getting same freq and square waves are also formed....but i want to change pulse width...
    it means i want to give option for change in pulse width at 1Hz...means
    (0.5 and 1.5)
     
  2. mrinalini

    Thread Starter New Member

    Aug 28, 2012
    6
    0
    i am not able to change pulse width by timer help me with calculations
     
  3. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,394
    1,606
    Which PIC do you use?
    What frequency is the clock osc?
    What assembler or compiler?
     
  4. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    If you check this web page;
    http://www.romanblack.com/onesec/High_Acc_Timing.htm

    near the page bottom, under the heading;
    Make decimal frequencies in 0.00001 Hz resolution!

    There is very simple C code for PIC 16F628A Timer1 to make a PIC generate any exact frequency from; 0.00001 Hz to 20000.00000 Hz in exact 0.00001 Hz steps.
     
    absf likes this.
Loading...