Hello,
I'm having difficulty getting the ADC values from the dsPIC33FJ256GP710A transmitted over to an Arduino.
I have the dsPic configured correctly for 12-bits and the USART is working properly at 9600 baud. So they are talking ok with each other.
The issue I'm having is splitting up the ADC value and then transmitting it over the USART.
for example
gets the ADC Value and transmits it over, but the receiver all it gets is garbage.
The value of GetAdc(11) when inspected with the watch window is 0x07FF or 2047, which is correct for a 1.5V input to AN11 with a 3V ref.
I know I have to split this into smaller bytes before transmitting it over or use some other type of function. Any advice will be appreciated.
I'm having difficulty getting the ADC values from the dsPIC33FJ256GP710A transmitted over to an Arduino.
I have the dsPic configured correctly for 12-bits and the USART is working properly at 9600 baud. So they are talking ok with each other.
The issue I'm having is splitting up the ADC value and then transmitting it over the USART.
for example
Code:
U1TXREG = GetAdc(11);
The value of GetAdc(11) when inspected with the watch window is 0x07FF or 2047, which is correct for a 1.5V input to AN11 with a 3V ref.
I know I have to split this into smaller bytes before transmitting it over or use some other type of function. Any advice will be appreciated.