View Single Post
  #1   Spotlight this post!  
Unread 17-02-2006, 17:04
sciguy125 sciguy125 is offline
Electrical Engineer
AKA: Phil Baltar
FRC #1351
Team Role: College Student
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Sunnyvale, CA
Posts: 519
sciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond repute
Send a message via AIM to sciguy125 Send a message via MSN to sciguy125 Send a message via Yahoo to sciguy125
timer after restart

I set up Timer 1 as a simple timer. I initialize it via a function called from User_Initialization() - that's what it's called right? It uses the internal clock and has the prescaler set to 1:8. I also set up interrupts to increment a counter every time the timer overflows. I also have it initialized to a value such that it overflows every 50ms. The interrupt routine that handles the counter also toggles rc_dig_out18. I've verified that it works with an oscope.

The problem is that it doesn't work after I reset the controller. It's fine right after programming. After a power off or pressing the reset button, the output doesn't change any more. I'm not sure if it's because the timer isn't working any more or if something happened to the output. I suspect the former, however.

Is there some difference between what happens right after a download and after pressing reset? I have a feeling that I need to initialize something somewhere, but I can't find anything.
__________________

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GE/S/P a-- e y-- r-- s:++ d+ h! X+++
t++ C+ P+ L++ E W++ w M-- V? PS+ PE+
5- R-- tv+ b+ DI+++ D- G
------END GEEK CODE BLOCK------