Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Need help in setting up precise timer 2 in PIC18F4550 1ms

Status
Not open for further replies.

john blue

Advanced Member level 3
Joined
Jun 7, 2007
Messages
821
Helped
213
Reputation
430
Reaction score
204
Trophy points
1,323
Activity points
4,749
// settings to configure Fosc to be 16MHz
#pragma config FOSC = HSPLL_HS// INTOSC_EC
#pragma config PLLDIV = 5
#pragma config CPUDIV = OSC4_PLL6

PR2 = 249;

OpenTimer2(TIMER_INT_ON & T2_PS_1_16 & T2_POST_1_1);

Based on the code above, i should get 1ms but i am getting 1.6ms. I hope someone can help me out. Thanks in advance. :)
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top