Richard R. Pope wrote 2014-07-23 20:48: > Allen, > I don't have a 20MHz chip so I dropped back to 4 MHz. The > calculator has a choice for a 4MHz frequency and I choose that but the > numbers are off by almost 4.5 times. The values you presented in your code here does give the right timing. Only some small adjustments was possible. See my earlier post. Jan-Erik. > I don't know why but I am getting > there. It will count the frequency, wait for x seconds, clear the > display, and do it all over again. It works but it isn't accurate yet. > The one PIC replaces 8 TTL and CMOS chips. > Thanks, > rich! > > On 7/23/2014 1:39 PM, Allen Mulvey wrote: >> I gave the code from the MikroC timer calculator but I thought you were >> using a 20 MHZ crystal not 4 MHZ. >> Sorry about confusing things. >> >> MikroC apparently uses a different convention for defining an ISR but th= e >> timer start values should be correct. I am using those same values in >> another project myself. >> >> Allen >> >>> -----Original Message----- >>> From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behal= f >> > --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .