- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am trying to get the INT0# to trigger on the FX2LP. I can see on an oscope that the external pin, pin 34 on CY7C68016A-56LTXC, is transitioning from high to low but my isr function does not run. INT1# is held high. Here is the code.
From bulkloop.c
// Port A Configuration
PORTACFG |= bmINT1 + bmINT0; // Enable Interrupts INT0_N (PA0) and INT1_N (PA1)
SYNCDELAY;
TCON |= 0x05; // INT0 and INT1 are configured as Edge triggered interrupt
IE |= 0x85; SYNCDELAY; // Enable global interrupts and INT0# and INT1#
OEA = 0xF4;
From another file.
void keypress_isr (void) __interrupt INT1_VECT
{
led_color_set(1,0xff,0xff,0xff);
}
Any help would be greatly appreciated.
Thanks,
Dave
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Dave,
I was able to reproduce the issue and correct the same.
Please declare the line in the fx2regs.h
__sfr __at (0x92) _XPAGE ;
after
__sfr __at (0x92) MPAGE ;
This will properly initialize the XPAGE as per the SDCC user guide.
Please confirm if this resolved the issue.
Thanks,
Yatheesh