x3.exe
Member level 1
Hi everyone,
I want to send a file from my laptop to PIC33FJ128GP802 through UART and then pass the data to on chip DAC. The file contains samples of a sinusoidal signal, which was sampled at 8038Hz. I managed to write the code, which as i thought should do the job, but when I sensed the output with the oscilloscope , I got a blinking sinusoid with a line at 0 volts across it. The line at 0 volts is probably the default output value of the DAC, which means that data isn't transferred fast enough for the DAC to reproduce the actual signal. Uart is configured as follows:
Baud rate: 19200
8, N, 1.
Rx generates interrupt after 2 chars are received.
To the best of my knowledge baud rate of 19200 should be enough, however there is one thing I'm not sure of: when I send the file from PC (via RealTerm), CPS (chars per second) is approximately 1700 when baud rate is set to 9600 and approximately 3500 when baud rate is 19200. I thought that baud rate of 9600 means that data is sent at 9600 chars per second, but what i see in real term proves me wrong.
PS, is there a way to plot a wave from the data file containing samples of the signal., some software or something? I just want to be sure that the file contains the right data.
I want to send a file from my laptop to PIC33FJ128GP802 through UART and then pass the data to on chip DAC. The file contains samples of a sinusoidal signal, which was sampled at 8038Hz. I managed to write the code, which as i thought should do the job, but when I sensed the output with the oscilloscope , I got a blinking sinusoid with a line at 0 volts across it. The line at 0 volts is probably the default output value of the DAC, which means that data isn't transferred fast enough for the DAC to reproduce the actual signal. Uart is configured as follows:
Baud rate: 19200
8, N, 1.
Rx generates interrupt after 2 chars are received.
To the best of my knowledge baud rate of 19200 should be enough, however there is one thing I'm not sure of: when I send the file from PC (via RealTerm), CPS (chars per second) is approximately 1700 when baud rate is set to 9600 and approximately 3500 when baud rate is 19200. I thought that baud rate of 9600 means that data is sent at 9600 chars per second, but what i see in real term proves me wrong.
PS, is there a way to plot a wave from the data file containing samples of the signal., some software or something? I just want to be sure that the file contains the right data.