PIC18F2550 Timer setup

General discussion on mikroC.
Post Reply
Author
Message
grimstoner
Posts: 2
Joined: 03 Jan 2011 17:37

PIC18F2550 Timer setup

#1 Post by grimstoner » 03 Jan 2011 18:00

Hi

I'm using a PIC18F2550 that drives an LCD, and also receives input on INT0 (RB0) via a infrared receiver. I chose the PIC18F2550 for it's USB capabilities.

Because I'm connecting to a PC via USB, I used a 20Mhz crystal, scaled to 48Mhz :

Code: Select all

__CONFIG(1, USBPLL & IESODIS & FCMDIS & HSPLL & CPUDIV1 & PLLDIV5);
Now, I'd like to use rudolflapie's RC5 decoder code, mentioned here (Note : It's the second block of code).

Can anyone please help me to calculate the values I need to setup Timer0 and RC5_TIME_BOUNDARY, RC5_TIME_TOO_SHORT, and RC5_TIME_TOO_LONG?

Post Reply

Return to “mikroC General”