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.

Problems with PIC18F4620 when writing T1CON to Timer 1

Status
Not open for further replies.

Neyolight

Full Member level 5
Joined
Aug 29, 2011
Messages
306
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,298
Location
World
Activity points
3,624
Hi all

Ok so Ive been trying to develop a frequency counter. In order to do that I am writing "T1CON = 0b11001111;" to Timer 1 in my code. The shocking part is , when I debug it , I see "T1CON = 0b10001111;" in the watch window.

8-O I DONT KNOW WHY THIS IS HAPPENING !!!!!!!!!!!!!!!!!

Im writing something to Timer1 and something else is being written to it.... Is my code possessed? :lol:

Jokes apart, I am super duper confused ! Im running out of time with my project and these strange errors are making me really realllllllllly worried ! :cry: I feel hopeless to be honest !

Any ideas?
 

Re: Strange - PIC18F4620

Bit 6 in T1CON, T1RUN, is a read-only status bit. You can't write to it.

---------- Post added at 23:41 ---------- Previous post was at 23:32 ----------

Further... T1RUN is set only when the PIC is using the Timer1 Oscillator (external 32.76KHz source) as the whole system clock, in some sort of power-saving mode. Otherwise the bit is zero.

It's on page 127 onwards in the datasheet.
 
Re: Strange - PIC18F4620

bit 6 T1RUN: Timer1 System Clock Status bit
1 = Device clock is derived from Timer1 oscillator
0 = Device clock is derived from another source

Thanks
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top