Hi, Can anyone help I am using PIC16F876 20 MHZ chip, it works with 8MHZ resonator but not with 20MHZ, your help is apperciated
Hi, I am using following codes for 16f877 working well but with 18f2580 not working please help '**************** register of Timer1 ************** myint: Context SAVE ;set the reg of timer1 To cause an intrupt every 1000 cnts(65536 - 1000 = 64536 Or $fc22) 'At 4MHz, prescale set to 1, this equates to a tick every 1000uS or 1msec. timer1l = $22 timer1h = $fc tick = tick + 1 bcf PIR1, 0 ' Clear interrupt flag PIE1 = 0 ' mask the interrupt while we are messing with TICk If tick = 1000 Then tempseconds = tempseconds + 1 If tick = 1000 Then seconds = seconds + 1: tick = 0 PIE1 = 1 If seconds = 60 Then minutes = minutes + 1: seconds = 0 If tempseconds = 64800 Then tempseconds = 0 ' after 18 hours Context Restore