Quantcast
Channel: MSP430 Technical Forums
Viewing all articles
Browse latest Browse all 2077

problem to read UART1 pin PC4 serial1

$
0
0
I own a tive C TM4C123G and I'm trying to read from PORT C UART1 RX pin PC4.
 
I've tried from the port B PB0 UART RX without problem.
 
any can help me?
thanks in advance
(energia E0015)
 
//serial1 UART1
//PC4 midi in RX
//PC5 midi out TX
#define LED RED_LED

boolean lowhigh;
byte incomingByte;

void setup() {
  Serial1.begin(31250);//  Set MIDI baud rate:
  
  pinMode(LED, OUTPUT);
  
}

void loop() {

if (Serial1.available() > 0) {

   incomingByte = Serial1.read();
   incomingByte=(incomingByte & 0xF0);//dejamos pasar 1111000 4 primeros bits
   if (incomingByte==0x90){           //tenemos un note on si es 1001
             digitalWrite(LED, HIGH); // turn the LED on 
             delay(100);
             digitalWrite(LED, LOW);
             }
    
    }
    
  
}

 


Viewing all articles
Browse latest Browse all 2077

Trending Articles