Skip to main content

Posts

Showing posts with the label 1 second delay pic microcontroller

One second delay with pic microcontroller using miKroC , CSS and proteus

Prescaler and generating a large time delay Project :One Second Delay using PIC18f4580's Timer0 As we have got seen in the examples so far, the duration of the time delay build using the crystal frequency and the timer's 16-bit register.  Crystal frequency and width of 16-bit register can not be modified using code. Both of these factors are on the  far side the jurisdiction of the PIC 18 coder.  The largest time delay is achieved by making both TMR0H and TMR0L zero.   What if that is not enough?  We can use the prescaler option in theT0CON register to increase the delay by reducing the period. The prescaler option of T0CON allows us to divide the instruction clock by a factor up to 256. As we have seen so far, with no prescaler enabled, the crystal oscillator frequency is divided by 4 (Fosc/4) and then fed into Timer0. If we enable the  prescaler bit in the T0CON register, however, then we can divide the instruction  cl...