i wanted to connect my pic microcontroller with my arduino so i can benefit from the serial monitor so from the pic to the arduino to the computer but the problem is the arduino doesnt read probably from the pic any ideas?
Well, you are giving us very poor information.
-pic model?
-arduino board model?
-arduino code?
-pic code?
-Schematics of connections?
pic16f628a
arduino uno r3
code for arduino is the standard software serial example mode
and this is the code for the pic
char uart_rd;
void main() {
trisb=0;
portb=0;
portb=255;
delay_ms(2000);
UART1_Init(4800); // Initialize UART module at 9600 bps
Delay_ms(100); // Wait for UART module to stabilize
while (1) { // Endless loop
if (UART1_Data_Ready()) { // If data is received,
uart_rd = UART1_Read(); // read the received data,
UART1_Write(uart_rd); // and send data via UART
}
}
}
So, the pic is just in echo mode. Are you entering input in the arduino console? Did you check the baud was 4800?
We are still missing schematics.
Your comment says 9600, but code says 4800. Is that just sloppy commenting or a cause of problems?
mart256:
So, the pic is just in echo mode. Are you entering input in the arduino console? Did you check the baud was 4800?We are still missing schematics.
each tx s connected to the other rx and gnd is shared
yes using the arduino serial monitor
the default baud of the arduino example is 4800 so yes i did
DrAzzy:
Your comment says 9600, but code says 4800. Is that just sloppy commenting or a cause of problems?
nah the arduino example is the same 4800