View Full Version : ADC Initialization problem
Shomron1690
13-02-2007, 05:20
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
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.
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
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
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.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.