DSPRelated.com
Forums

adsp 21161N ez_kite_lite; Timer, Interrupt and external Port 9

Started by chris_08 April 19, 2005
Hi group members!

I would like to read in the data [23:16]from the external Port 9 using
a timer and  interrupt. I use the example programm "AD1836 C-based
Talkthru.dpj". And i have some problems. I need that to get my
graduation certificate from high school and i am in a hurry =(. Could
you help me please!!!
chris_08 wrote:
> Hi group members! > > I would like to read in the data [23:16]from the external Port 9 using > a timer and interrupt. I use the example programm "AD1836 C-based > Talkthru.dpj". And i have some problems. I need that to get my > graduation certificate from high school and i am in a hurry =(. Could > you help me please!!!
We may be able to help, but you need to give us more details. Since not all of us have experience with that board (or even that processor) giving details about the board and processor where they seem to be appropriate may help. Here are the questions that immediately leap to my mind: What are the problems? What is the example program supposed to do? What are you trying to do? What, if anything, are you doing differently from the program as described? Are you using a different setup? Are you trying to modify the program? What do you expect the timer and interrupt to do for you? Are you interrupting the main loop with the timer, and collecting data when interrupted? Is the timer connected to the port somehow, to get a hard- timed sample? -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Tim Wescott <tim@wescottnospamdesign.com> wrote in message news:<116ah0u6lha49d@corp.supernews.com>...
> chris_08 wrote: > > Hi group members! > > > > I would like to read in the data [23:16]from the external Port 9 using > > a timer and interrupt. I use the example programm "AD1836 C-based > > Talkthru.dpj". And i have some problems. I need that to get my > > graduation certificate from high school and i am in a hurry =(. Could > > you help me please!!! > > We may be able to help, but you need to give us more details. Since not > all of us have experience with that board (or even that processor) > giving details about the board and processor where they seem to be > appropriate may help. > > Here are the questions that immediately leap to my mind: > > What are the problems? > What is the example program supposed to do? > What are you trying to do? > What, if anything, are you doing differently from the program as > described? > Are you using a different setup? > Are you trying to modify the program? > What do you expect the timer and interrupt to do for you? > Are you interrupting the main loop with the timer, > and collecting data when interrupted? > Is the timer connected to the port somehow, to get a hard- > timed sample?
Hi! I will modify the example program. Short:With the Port 9 data-lines I will read in some quadratur-regulators, which modify the filters for the input signal. Today I set a Timer and his interrupt: asm("TCOUNT=1000000;TPERIOD=1000000;"); //Timer counter and periode asm("bit set mode1 IRPTEN;"); //enable global interupt asm("bit set mode2 TIMEN;"); //enable Timer asm("bit set irptl TMZHI;"); //TMZHI -> Timer=0 (high priority option) --> but now I need to get into a function in which the program come when TCOUNT=0 and the interrupt starts --> in this function I will write a programm to read in the data-lines from port 9 --> could you help me or could you show me how to use a TIMER and come in to his interrupt function to write the handler for the interrupt, please!!! in c-code or assembler with comments please
chris_08 wrote:
> Tim Wescott <tim@wescottnospamdesign.com> wrote in message news:<116ah0u6lha49d@corp.supernews.com>... > >>chris_08 wrote: >> >>>Hi group members! >>> >>>I would like to read in the data [23:16]from the external Port 9 using >>>a timer and interrupt. I use the example programm "AD1836 C-based >>>Talkthru.dpj". And i have some problems. I need that to get my >>>graduation certificate from high school and i am in a hurry =(. Could >>>you help me please!!! >> >>We may be able to help, but you need to give us more details. Since not >>all of us have experience with that board (or even that processor) >>giving details about the board and processor where they seem to be >>appropriate may help. >> >>Here are the questions that immediately leap to my mind: >> >>What are the problems? >>What is the example program supposed to do? >>What are you trying to do? >>What, if anything, are you doing differently from the program as >>described? >> Are you using a different setup? >> Are you trying to modify the program? >>What do you expect the timer and interrupt to do for you? >> Are you interrupting the main loop with the timer, >> and collecting data when interrupted? >> Is the timer connected to the port somehow, to get a hard- >> timed sample? > > > Hi! > I will modify the example program. > Short:With the Port 9 data-lines I will read in some > quadratur-regulators, which modify the filters for the input signal. > > Today I set a Timer and his interrupt: > > asm("TCOUNT=1000000;TPERIOD=1000000;"); //Timer counter and > periode > asm("bit set mode1 IRPTEN;"); //enable global interupt > asm("bit set mode2 TIMEN;"); //enable Timer > asm("bit set irptl TMZHI;"); //TMZHI -> Timer=0 (high > priority
Try writing to imask instead of irptl. When the timer expires /it/ will set the bit in the interrupt latch, and /that/ will generate the interrupt. It will be ignored if the corresponding bit in imask is 0. -- Jim Thomas Principal Applications Engineer Bittware, Inc jthomas@bittware.com http://www.bittware.com (603) 226-0404 x536 Sometimes experience is the only teacher that works - Mike Rosing
Jim Thomas <jthomas@bittware.com> wrote in message news:<116d30fi719pe18@corp.supernews.com>...
> chris_08 wrote: > > Tim Wescott <tim@wescottnospamdesign.com> wrote in message news:<116ah0u6lha49d@corp.supernews.com>... > > > >>chris_08 wrote: > >> > >>>Hi group members! > >>> > >>>I would like to read in the data [23:16]from the external Port 9 using > >>>a timer and interrupt. I use the example programm "AD1836 C-based > >>>Talkthru.dpj". And i have some problems. I need that to get my > >>>graduation certificate from high school and i am in a hurry =(. Could > >>>you help me please!!! > >> > >>We may be able to help, but you need to give us more details. Since not > >>all of us have experience with that board (or even that processor) > >>giving details about the board and processor where they seem to be > >>appropriate may help. > >> > >>Here are the questions that immediately leap to my mind: > >> > >>What are the problems? > >>What is the example program supposed to do? > >>What are you trying to do? > >>What, if anything, are you doing differently from the program as > >>described? > >> Are you using a different setup? > >> Are you trying to modify the program? > >>What do you expect the timer and interrupt to do for you? > >> Are you interrupting the main loop with the timer, > >> and collecting data when interrupted? > >> Is the timer connected to the port somehow, to get a hard- > >> timed sample? > > > > > > Hi! > > I will modify the example program. > > Short:With the Port 9 data-lines I will read in some > > quadratur-regulators, which modify the filters for the input signal. > > > > Today I set a Timer and his interrupt: > > > > asm("TCOUNT=1000000;TPERIOD=1000000;"); //Timer counter and > > periode > > asm("bit set mode1 IRPTEN;"); //enable global interupt > > asm("bit set mode2 TIMEN;"); //enable Timer > > asm("bit set irptl TMZHI;"); //TMZHI -> Timer=0 (high > > priority > > Try writing to imask instead of irptl. When the timer expires /it/ will > set the bit in the interrupt latch, and /that/ will generate the > interrupt. It will be ignored if the corresponding bit in imask is 0.
Thank you both for your help! My status now is: asm("TCOUNT=5000000;TPERIOD=100000000;"); //Timer counter and periode asm("bit set mode1 IRPTEN;"); //enable global interupt asm("bit set mode2 TIMEN;"); //enable Timer asm("bit set irptl TMZLI;"); asm("bit set imask TMZLI;");
Jim Thomas <jthomas@bittware.com> wrote in message news:<116d30fi719pe18@corp.supernews.com>...
> chris_08 wrote: > > Tim Wescott <tim@wescottnospamdesign.com> wrote in message news:<116ah0u6lha49d@corp.supernews.com>... > > > >>chris_08 wrote: > >> > >>>Hi group members! > >>> > >>>I would like to read in the data [23:16]from the external Port 9 using > >>>a timer and interrupt. I use the example programm "AD1836 C-based > >>>Talkthru.dpj". And i have some problems. I need that to get my > >>>graduation certificate from high school and i am in a hurry =(. Could > >>>you help me please!!! > >> > >>We may be able to help, but you need to give us more details. Since not > >>all of us have experience with that board (or even that processor) > >>giving details about the board and processor where they seem to be > >>appropriate may help. > >> > >>Here are the questions that immediately leap to my mind: > >> > >>What are the problems? > >>What is the example program supposed to do? > >>What are you trying to do? > >>What, if anything, are you doing differently from the program as > >>described? > >> Are you using a different setup? > >> Are you trying to modify the program? > >>What do you expect the timer and interrupt to do for you? > >> Are you interrupting the main loop with the timer, > >> and collecting data when interrupted? > >> Is the timer connected to the port somehow, to get a hard- > >> timed sample? > > > > > > Hi! > > I will modify the example program. > > Short:With the Port 9 data-lines I will read in some > > quadratur-regulators, which modify the filters for the input signal. > > > > Today I set a Timer and his interrupt: > > > > asm("TCOUNT=1000000;TPERIOD=1000000;"); //Timer counter and > > periode > > asm("bit set mode1 IRPTEN;"); //enable global interupt > > asm("bit set mode2 TIMEN;"); //enable Timer > > asm("bit set irptl TMZHI;"); //TMZHI -> Timer=0 (high > > priority > > Try writing to imask instead of irptl. When the timer expires /it/ will > set the bit in the interrupt latch, and /that/ will generate the > interrupt. It will be ignored if the corresponding bit in imask is 0.
Thank you both for your help! My status now is: asm("TCOUNT=5000000;TPERIOD=100000000;"); //Timer counter and periode asm("bit set mode1 IRPTEN;"); //enable global interupt asm("bit set mode2 TIMEN;"); //enable Timer asm("bit set irptl TMZLI;"); asm("bit set imask TMZLI;"); I set taht and with interruptf( SIG_TMZ0, timer); I come to my interrupt-routine Now I need the address from the data-lines from D[23:16] address-lines from A[8:0]. Do you know that? Because I want to speak to each address individually. --> again: Thank you =)! regards Christian