I am trying to design my own LCD display of data coming from a PIC18 that I did not program. I know that the PIC is constantly sending out four numeric values (rpm, temperature, PWM value from a controller, and battery voltage). It's possible that it is sending out one or two more values that I am not aware of.
With my very limited knowledge, I connected an UNO Rx port to the Tx port of the PIC and made sure they are grounded to each other. I uploaded a basic serial.read sketch.
The data I am receiving shows no discernible pattern (well, to me at least). I modified the sketch to try every baud rate available in the serial monitor. The numbers change with each different rate, but still no pattern.
One thing I noticed is that data is still being received when the PIC is turned off. I am thinking this is some sort of electrical interference?
I have attached screen shots of the data when the PIC is both on and off.
I apologize for this naive post, but I promise I did some research before posting!
I would suggest you get an oscilloscope and look at the incomming data
check the voltage range, if it is RS232 -12 to +12 volts it will damage the arduino
the fact that the arduino shows data even though the PIC18 is switched off indicates something is wrong
also an oscilloscope should give you some idea of the baud rate
The voltage range of +2 to +4 is a very odd range and wont decode properly as its not going low enough.
Its also very unlikley a PIC is outputting such a voltage range from its serial port.
birdtrick:
The voltage range is +2 to +4 volts. I suppose this means it is not RS232?
Not necessarily. Did you connect both devices to a common ground, the ground of both connected together? When you measured the voltage was that from the PIC pin to the PIC ground?
After a bit of research I've determined that the serial data is 3.3v TTL, 9600 baud, 8-N-1. I also know there are 10 different numerical values being constantly transmitted.
I've been searching around on the topic of displaying these values on the serial monitor, and it seems I need to use some sort of String command. I've copied and tried different code, but am at a loss.