Go to Post A robot that does 60% of the tasks 100% of the time is better than a robot that does 100% of the tasks 60% of the time. - artdutra04 [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

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 13-02-2007, 05:20
Shomron1690 Shomron1690 is offline
Registered User
FRC #1690
 
Join Date: Jan 2007
Location: Israel
Posts: 15
Shomron1690 is an unknown quantity at this point
ADC Initialization problem

hello
i want to merge the code of the gyro (kevin's code), with the whole general code (again, kevin's code).

i followed the instructions under gyro_readme.txt - and it worked.
then i had to follow the instruction adc_readme.txt and im on step 2:

" 2) Initialize_ADC() must be called from user_routines.c/
User_Initialization() "

i added " Initialize_ADC() " under " User_Initialization() " and when i checked whether the code works so far' i downloaded the program to the RC, and the Program State Led was Blinking in red.

does anyone had this problem and / or know how to solve it?
thanks
  #2   Spotlight this post!  
Unread 13-02-2007, 09:49
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: ADC Initialization problem

Did you add the appropriate code to the interrupt service routine before trying to run the program? It sounds like you called the initialization routine to set up the interrupts, but you haven't put in the part that actually handles them.

If an interrupt occurs but the service routine doesn't acknowledge it, it will continue to interrupt the program constantly and not let the normal code run. If the code doesn't get around to communicating with the master processor, it will be considered a code error and the red light will come on.

The moral of the story is: don't try to use half-entered code. Follow the directions to the end.
  #3   Spotlight this post!  
Unread 13-02-2007, 09:59
kaszeta's Avatar
kaszeta kaszeta is offline
Registered User
FRC #0095 (Grasshoppers)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Lebanon, NH
Posts: 334
kaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of light
Re: ADC Initialization problem

Quote:
Originally Posted by Shomron1690 View Post
hello
i want to merge the code of the gyro (kevin's code), with the whole general code (again, kevin's code).

i followed the instructions under gyro_readme.txt - and it worked.
then i had to follow the instruction adc_readme.txt and im on step 2:

" 2) Initialize_ADC() must be called from user_routines.c/
User_Initialization() "

i added " Initialize_ADC() " under " User_Initialization() " and when i checked whether the code works so far' i downloaded the program to the RC, and the Program State Led was Blinking in red.

does anyone had this problem and / or know how to solve it?
thanks
Check your user_routines_fast.c. If you don't have the necessary interrupt for the ADC enabled, you'll RLOD.
  #4   Spotlight this post!  
Unread 13-02-2007, 15:55
Shomron1690 Shomron1690 is offline
Registered User
FRC #1690
 
Join Date: Jan 2007
Location: Israel
Posts: 15
Shomron1690 is an unknown quantity at this point
Re: ADC Initialization problem

ok thanks it works now, i thought that if ill check every step whether it works itwill be ok, so.... it didnt...

you can see this thread as closed.. thanks
  #5   Spotlight this post!  
Unread 14-02-2007, 18:06
scottyh2006's Avatar
scottyh2006 scottyh2006 is offline
Registered User
AKA: Elmo (and what you gonna do about it)
FRC #0564 (Ditigal Impact)
Team Role: Coach
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Coram
Posts: 26
scottyh2006 is on a distinguished road
Re: ADC Initialization problem

Infranco I dont think anyone can help us but i only read about seven of them before i figured that they were typing too much and i could read all that at once.
Closed Thread


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
CMUcam initialization time DanDon Programming 11 31-12-2006 16:57
ADC problem sjung9442 Programming 4 17-02-2006 11:12
adc code problem railerobotics Programming 6 24-01-2006 22:26
Reciever Initialization problem PuiChi Programming 1 26-01-2004 23:54
Master uP Initialization Routine Ulibrium Technical Discussion 5 24-01-2002 16:43


All times are GMT -5. The time now is 04:54.

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