Thread: PIC 18F2431
View Single Post
  #8   Spotlight this post!  
Unread 22-08-2005, 23:56
Unsung FIRST Hero
Mike Betts Mike Betts is offline
Electrical Engineer
no team
Team Role: Engineer
 
Join Date: Dec 2001
Rookie Year: 1995
Location: Homosassa, FL
Posts: 1,442
Mike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond repute
Re: PIC 18F2431

Quote:
Originally Posted by Sparks333
...Yes, I am fully aware it's not good programming practice to set option registers in the main loop, but it should work...

...What does happen is if I initialize CAP1BUF to anything, it will always be that something, and never change...
Dane,

Absolutely, definitely change the initialization to be done once and once only.

As an example, you are setting CAP1BUF to zero every time through the loop. Except for a brief microsecond or two, why would it ever be anything else?

Mike
__________________
Mike Betts

Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013

As easy as 355/113...