Jean-Pierre du Plessis
Newbie level 6
If someone can pease help me. I have trouble sending intigers to my serial port from my dsPIC. I have setup the UART on the pic using the c liabraries. The pic is able to send strings of carracters and it is recevied in hyperterminal.
I use the function:
This sends the array of char to the UART.
And if I use printf it does the same, but only if I type a string like this:
or like this:
This sends a # and only 38% of my memory is used on my pic.
Then when I try sending the following:
or anything simular or an integer with %d, my pics memory doubles and when I program my device it programs but the target is halted instantly.
I want to send intiger values to matlab, some of my varuables used in the program for logging. Please if any one have any idea how to doe this to get it to work.
I use the function:
Code:
putsUATR1((unsigned int *)Txdata)
This sends the array of char to the UART.
And if I use printf it does the same, but only if I type a string like this:
Code:
printf("Helo World");
Code:
printf("%c",35);
Then when I try sending the following:
Code:
prinf("%c %c",35,13);
I want to send intiger values to matlab, some of my varuables used in the program for logging. Please if any one have any idea how to doe this to get it to work.