On May 18, 2011, at 6:07 AM, wilson05 wrote: > WrPortI(PEDDR, &PEDDRShadow, 0x00); // set port E as
all inputs
You should be careful to only modify the bits of PEDDR for the pins you're
trying to set up. Other peripherals on the chip may be using pins from Port E
as outputs, and the WrPortI() will screw things up!
-Tom
Reply by wilson05●May 18, 20112011-05-18
--- In r..., elolmos@... wrote: >
> Hi, I'm having problems with external interrupt using a RCM5400W by
PE0,
>
> May somebody show me any sample code of external interrupt PE0 or PE1.
>
> I need a sample about external interrupt configuration and interrupt service
routine, thanks for help me.
>
Try this.
#class auto
unsigned int count0, count1;
void my_isr0();
void my_isr1();
void main()
{
count0 = 0;
count1 = 0;
WrPortI(PEDDR, &PEDDRShadow, 0x00); // set port E as all inputs
SetVectExtern3000(0, my_isr0);
SetVectExtern3000(1, my_isr1);
// re-setup ISR's to show example of retrieving ISR address using
GetVectExtern3000
SetVectExtern3000(0, GetVectExtern3000(0));
SetVectExtern3000(1, GetVectExtern3000(1));