nirbar11 0 Posted August 1, 2017 Share Posted August 1, 2017 Hello all, Im using the MSP430 connecting to a device which outputs 4 bits sequence (parallel) every once in a while and I want to get an interrupt for each new input sequence in port 1. The input sequence voltage level is 3.6V and the MSP powered from the micro-USB (connected to the PC). I also connected the GND of the device to the GND of the MSP. this is my code : void setup(){ Serial.begin(9600); pinMode(P1_2,INPUT); pinMode(P1_3,INPUT); pinMode(P1_4,INPUT); pinMode(P1_5,INPUT); attachInterrupt(P1,intFunc,CHANGE); }; void intFunc(){ Serial.print("this is an interrupt - the value of P3.1 is :"); Serial.println(digitalRead(P1_3)); } void loop() { delay(2000); Serial.println("the is the main routine"); } Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.