Searching \ for '[PIC]:Timer1 as Async Counter' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/time.htm?key=time
Search entire site for: 'Timer1 as Async Counter'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]:Timer1 as Async Counter'
2001\08\01@131927 by Mike Trujillo

flavicon
face
I am having trouble getting timer1 to act as an asynchronous counter. I am
using a PIC16F628 and according to the microchip spec, I should be able to
use pin RB7/T1OSI as an input pin for the counter. The pin is receiving a
square wave signal between 13Khz and 15Khz of 0V to 5V.

My dev settings are T1CON = 0x0F == Prescale 1:1, T1OSCEN = 1, T1SYNC = 1,
TMR1CS = 1, TMR1ON.

The problem is that it doesn't load/increment the TMR1L(H) registers. I have
already tried changing prescale, t1oscen and t1sync to no avail.

Is there something I'm missing in the config/spec? Or is this not a possible
use of the timer? Solutions or suggestions requested.

- Mike

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\08\01@134905 by Sergi Sanchez

flavicon
face
> use pin RB7/T1OSI as an input pin for the counter. The pin is
> receiving a
> square wave signal between 13Khz and 15Khz of 0V to 5V.
>
> My dev settings are T1CON = 0x0F == Prescale 1:1, T1OSCEN =
> 1, T1SYNC = 1,
> TMR1CS = 1, TMR1ON.

have you any signal connected to RB6?
what clock frequency are using you?

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\08\01@135315 by Dan Michaels

flavicon
face
Mike.T wrote:
>I am having trouble getting timer1 to act as an asynchronous counter. I am
>using a PIC16F628 and according to the microchip spec, I should be able to
>use pin RB7/T1OSI as an input pin for the counter. The pin is receiving a
>square wave signal between 13Khz and 15Khz of 0V to 5V.
>

Hi, Mike, I have not tried that particular chip, but fig 7-1 of the
datasheet indicates that pin RB6 is the external input to Timer1,
not RB7.

I use Timer1 for external counting all the time on other members of
the family - '73/76/876/. It will go to over 50 mhz, with the prescaler
enabled, much faster than what the "specs" would seem to indicate.
[I am ducking now ;-)]

hope this helps,
- dan michaels
http://www.oricomtech.com
===========================

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\08\01@135916 by Mike Trujillo

flavicon
face
The clock/MCU is running at 4Mhz and I am using RB6 as an output to an
unrelated task. It is only RB7 that receives the input.

{Original Message removed}

2001\08\02@100202 by Sergi Sanchez

flavicon
face
Mike,

> The clock/MCU is running at 4Mhz and I am using RB6 as an output to an
> unrelated task. It is only RB7 that receives the input.

> > use pin RB7/T1OSI as an input pin for the counter. The pin is
> > receiving a
> > square wave signal between 13Khz and 15Khz of 0V to 5V.
> >
> > My dev settings are T1CON = 0x0F == Prescale 1:1, T1OSCEN =
> > 1, T1SYNC = 1,
> > TMR1CS = 1, TMR1ON.
>

I thik you can not do this, look on the page 41 (fig 5-14) of the F628 spec
(40300b.pdf) and you can see that TMR1 clock is feed via an Shmitt trigger
directly from the RB6 pin, so you can not use RB6 as output and timer input
at the same time. When you use RB7 as a timer1 input, the signal flows via
an inverter til the pin RB6. I Think there is some kind of contention in
this situation.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...