Code segment for an atmega32... not sure what you machine is..
void setup() {
Serial.begin(9600);
Serial1.begin(9600);
}
void loop() {
// read from port 0, send to port 1:
if (Serial.available()) {
int inByte = Serial.read();
Serial1.print(inByte, DEC);
}
// read from port 1, send to port 0:
if (Serial1.available()) {
int inByte = Serial1.read();
Serial.print(inByte, DEC);
}
}
I just read this and don't think it is the same thing as I'm talking about.
As I understood Tx and Rx pins are working on UART TTL protocol. If I'm correct, these pins should recognize by themselves where are start and stop bits.
I'm trying to send and receive UART message through my pins. Actually to send message to myself printing it on serial monitor. As a step in my project where I want to check these pins.