If I try to compile
void Timer23Int() org 0x23 {
BlinkLedPlaca(0,0) ;
}
to use interrupt 23 I get the message error
145 304 Org address must be even number Entrada.c
if I try to use the can library I get the errors
79 324 Undeclared identifier 'CAN_CONFIG_SAMPLE_THRICE' in expression CAN1.c
80 324 Undeclared identifier 'CAN_CONFIG_PHSEG2_PRG_ON' in expression CAN1.c
etc etc
After the conversion there are a lot of error but this ones seems serious...
some troubles in the Pro version
some troubles in the Pro version
To be or not to be...Hum.. sure I need more options
Hi Sidharta,
the dsPIC interrupt table can be a bit confusing - took me a couple of days to figure it out. Here's the solutions:
The jump table address for the interrupt routine is calculated as
address = base_address + 2 * interrupt_number
(the reason for the factor of 2 is that the interrupt table holds function pointers which each use 2 bytes. On the dsPIC30F2020 the base_address is 20 dec. = 0x14 hex, so assuming it's the same on your device (please double-check!) that makes
void Timer23Int() org (0x14 + 2* 0x23)
Wolfgang
the dsPIC interrupt table can be a bit confusing - took me a couple of days to figure it out. Here's the solutions:
The jump table address for the interrupt routine is calculated as
address = base_address + 2 * interrupt_number
(the reason for the factor of 2 is that the interrupt table holds function pointers which each use 2 bytes. On the dsPIC30F2020 the base_address is 20 dec. = 0x14 hex, so assuming it's the same on your device (please double-check!) that makes
void Timer23Int() org (0x14 + 2* 0x23)
Wolfgang
the best you do is have a look in the definition files, there you will find ( amongst other usefull stuff) very nice predefined interrupt vector table constants IVT_ADDR_U2RXINTERRUPT making the programmers life a lot easyer! By using these constants you do not have to modify the absolute vector-addresses for each other chip.
Au royaume des aveugles, les borgnes sont rois.
-
- Posts: 619
- Joined: 05 Jul 2008 06:05
- Location: Thailand
Hi Sidharta, ME have set up a new forum for the dsPRO compiler, the main forum is locked at the moment but if you go to the beta testing forum you can post there. Some of us have had a few initial problems with the compiler and you will find solutions from the ME team...
http://www.mikroe.com/forum/viewforum.php?f=102
http://www.mikroe.com/forum/viewforum.php?f=102