Go to Post Use sensors to collect data about the surrounding environment, then discard it and drive into walls. - Jared Russell [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #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------
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Encoders and putdata theycallhimtom Programming 3 09-02-2006 19:24
Quick Timer Question et1337 Programming 3 02-02-2006 15:19
Accelerometer code ImmortalAres Programming 28 04-06-2005 01:02
Timer interrupt hic-cupping - HELP roknjohn Programming 9 15-03-2004 17:56
Interrupt timer, executing code asap? SeanCassidy Programming 10 07-03-2004 01:47


All times are GMT -5. The time now is 20:57.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi