Hi, My name is Kostas and I'm facing a problem. I'm experimenting with the interconnection of MSP430-RF2500 with PIC16F628A. The circuit of my project is shown in the image below:
The input in the extension pin P6 (p2.3) of the MSP430, through the voltage divider, is between 2.6V - 3V. The program on the PIC toggles pin 6 in predefined intervals. In order to detect these changes with the MSP I'm using a simple interrupt at the p2.3 where, when the output of the PIC is in high state, the on-board led of the MSP changes its state (toggles). The problem is that after the first detection (led turns on) the program freezes. The code for the MSP is shown below:
#include "io430.h"
int main( void )
{
WDTCTL = WDTPW + WDTHOLD;
P1DIR |= 0x03;
P2REN |= 0x08;
P2IE |= 0x08;
__bis_SR_register(GIE);
while(1);
}
#pragma vector=PORT2_VECTOR
__interrupt void Port_2 (void)
{
P2IFG &= ~0x08;
P1OUT ^= 0x03;
}
What am I doing wrong?