Re: Pulsin ir receiver and osc speeds
"The resolution of PULSIN is dependent upon the oscillator frequency. If a 4MHz oscillator is used, the pulse width is returned in 10us increments. If a 20MHz oscillator is used, the pulse width will have a 2us resolution. Defining an OSC value has no effect on PULSIN. The resolution always changes with the actual oscillator speed."
If you are running at 16MHz then you are 4 times faster than if you were running at 4Mhz and the resolution of the pulse will be 2.5us instead of 10us.
If you were trying to detect a pulse of 1000us or 1ms then at 4Mhz you would be looking for a count of 100. At 16Mhz you need to be looking for a count of 400 therefore if you have used an example code as the basis of your project and it is intended for 4Mhz operation you need to increase all the count values by a factor of 4.
Keith
www.diyha.co.uk
www.kat5.tv
Bookmarks