Sign in

username:

password:



Not a member?

Search 68hc12



Search tips

Subscribe to 68hc12



68hc12 by Keywords

68HC1 | 812A4 | 9S12DP256 | Bootloader | CodeWarrior | D60A | Debugger | DP256 | ECT | EEPROM | EVB | Flash | HC1 | HCS12 | I2C | IAR | ICC1 | Interrupts | LCD | M68KIT912DP256 | MC9S12DP256 | MC9S12DP256B | Metrowerks | Motor | MSCAN | Multilink | PLL | Quadrature | SDI | SPI | Transceiver | XFC


Ads

Discussion Groups

See Also

DSPFPGAElectronics

Join our technical discussions about Freescale Microcontrollers: M68HC12. (Freescale Semiconductor is a Subsidiary of Motorola).

Re: dp256 - Uwe Arends - May 14 10:53:00 2005

Ritesh,

> Can u tell me how can i write isr routine , I wrote it but as a
> function and the keyword interrupt and it no. Another way i tried out is to
> write function and put the name in the vector table.
> I am trying out CAN Communication using DP256
> Before the function definition i didnot use #pragma is that the
> problem.

you'll have to tell us which compiler you are using.
Regardless of that, your ISR has to be put into the
vector table.

-uwe


______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )


Re: dp256 - rithes ameen - May 14 10:56:00 2005

hi
i am using codewarrior v3.1tool thanks
rithesh
Uwe Arends <Uwe_Arends@Uwe_...> wrote:
Ritesh,

> Can u tell me how can i write isr routine , I wrote it but as a
> function and the keyword interrupt and it no. Another way i tried out is to
> write function and put the name in the vector table.
> I am trying out CAN Communication using DP256
> Before the function definition i didnot use #pragma is that the
> problem.

you'll have to tell us which compiler you are using.
Regardless of that, your ISR has to be put into the
vector table.

-uwe
---------------------------------
Yahoo! Groups Links

To Yahoo! India Matrimony: Find your life partneronline.

[Non-text portions of this message have been removed]




(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: dp256 - Uwe Arends - May 14 11:01:00 2005

Rithes,

> i am using codewarrior v3.1tool

unfortunately, that's the one I haven't used as of yet.
I've got the special edition on my machine, so if I find
some time, I'll try to figure it out and let you know.

Regards,

-uwe


______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: dp256 - Uwe Arends - May 14 11:41:00 2005

Ritesh,

> > i am using codewarrior v3.1tool
>
> unfortunately, that's the one I haven't used as of yet.
> I've got the special edition on my machine, so if I find
> some time, I'll try to figure it out and let you know.

as far as I can see, they're doing it this way:

define a constant array of function pointers exactly
the size of the vector table located at 0xFF80

define your interrupt routine as:
interrupt void SCI0_ISR(void){
}
for example

OF course, the interrupt routines you define have to
be contained in the above constant array.

Take a look at the demo project that comes with CW located
in (CodeWarrior_Examples)\MC9S12\DP\DP256B called DP256B Demo.

hth
-uwe




(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: dp256 - ventre ludovic - May 14 13:28:00 2005

hello,

you can put the name of the interrupt function at the
address 0xffd6 in the vector table

;; SCI
.word def; ffd4//$FFD4, $FFD5 SCI 1 I-Bit SC1CR2
(TIE, TCIE, RIE, ILIE) $D4
.word int_SCI0 ; ffd6 //$FFD6, $FFD7 SCI 0 I-Bit
SC0CR2 (TIE, TCIE, RIE, ILIE) $D6

define your interrupt routine as:
void int_SCI0()
{
char car;
car = SCI0SR1; // clear IT of SCI by reading
it if ((SCI0SR1 & BM_3)== BM_3)
{
}
else if ((SCI0SR1 & BM_5)== BM_5)
{

PORTB = SCI0DRL;
} }
define the prototype in the top of your file:
void int_SCI0(char car) __attribute__((interrupt));
I can use it and its operates very well

use in windows the hyperterminal to watch if its
operates.

Since regards
Ludo

--- Uwe Arends <Uwe_Arends@Uwe_...> a écrit:

---------------------------------
Ritesh,

> > i am using codewarrior v3.1tool
>
> unfortunately, that's the one I haven't used as of
yet.
> I've got the special edition on my machine, so if I
find
> some time, I'll try to figure it out and let you
know.

as far as I can see, they're doing it this way:

define a constant array of function pointers exactly
the size of the vector table located at 0xFF80

define your interrupt routine as:
interrupt void SCI0_ISR(void){
}
for example

OF course, the interrupt routines you define have to
be contained in the above constant array.

Take a look at the demo project that comes with CW
located
in (CodeWarrior_Examples)\MC9S12\DP\DP256B called
DP256B Demo.

hth
-uwe
---------------------------------
Yahoo! Groups Links

To

_____________________________________________________________________________
Découvrez le nouveau Yahoo! Mail : 1 Go d'espace de stockage pour vos mails, photos et vidéos !
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com





(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

dp256 - rithes ameen - May 14 14:07:00 2005

hi there,
Can u tell me how can i write isr routine , I wrote it but as a
function and the keyword interrupt and it no. Another way i tried out is to
write function and put the name in the vector table.
I am trying out CAN Communication using DP256
Before the function definition i didnot use #pragma is that the
problem.

Please do reply me
Thanks Yahoo! India Matrimony: Find your life partneronline.

[Non-text portions of this message have been removed]


______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: dp256 - Daniel Lundin - May 16 5:29:00 2005

--- In 68HC12@68HC..., rithes ameen <ritheshamin@y...> wrote:
> hi there,
> Can u tell me how can i write isr routine , I wrote it but as a
> function and the keyword interrupt and it no. Another way i tried
out is to
> write function and put the name in the vector table.
> I am trying out CAN Communication using DP256
> Before the function definition i didnot use #pragma is that the
> problem.
>
> Please do reply me
> Thanks > Yahoo! India Matrimony: Find your life partneronline.
>
> [Non-text portions of this message have been removed] Best way in Codewarrior (in my opinion) is to not use any
non-standard keywords. Instead, use #pragma.

#pragma TRAP_PROC
void isr (void)
{
...
}

And then in the .prm-file:

VECTOR ADDRESS 0xFFFF

Note that sence the vector table uses 16-bit addresses you must put
all isr into non-paged memory.




(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )