Darrel
Many thanks - the programme worked spotlessly up to 1KHz. I put Freq as 1000, T1CON as 0 and Prescaler as 1 plus I just added TOGGLE PORTB.0 in the T1Handler section. With any frequency up to 1000Hz the output on PORTB.0 is (as would be expected) exactly half the frequency value. At any frequency above 1000Hz, which appears to be a magical threshold, the output is not half. e.g. at 2000 it is 1042; at 1500 it is 781; at 1200 it is 625 and even at a small increase over 1000 Hz it is still wrong ie at 1020 it is 521. What is the logical explanation for this, or am I barmy?
PS I'm using and defining a 20Mhz osc but have tried with same results on 4 and 8 Mhz
Some rational explanation would be greatly appreciated!
Thanks
adrian
Bookmarks