Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   ADC Initialization problem (http://www.chiefdelphi.com/forums/showthread.php?t=54053)

Shomron1690 13-02-2007 05:20

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

Alan Anderson 13-02-2007 09:49

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.

kaszeta 13-02-2007 09:59

Re: ADC Initialization problem
 
Quote:

Originally Posted by Shomron1690 (Post 577263)
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.

Shomron1690 13-02-2007 15:55

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:)

scottyh2006 14-02-2007 18:06

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.


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

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