Author |
Message |
Topic: warning message |
[email protected]
Replies: 4
Views: 13977
|
Forum: General CCS C Discussion Posted: Wed Jul 05, 2023 4:04 am Subject: warning message |
i am passing unsigned int8 to char.
the problem solved |
Topic: warning message |
[email protected]
Replies: 4
Views: 13977
|
Forum: General CCS C Discussion Posted: Tue Jul 04, 2023 3:07 am Subject: warning message |
Dear sir,
I have installed the demo version pcwhd (45 days) on my pc.
I compiled a project that was running in PCD compiler v5.045, i am getting a
warning message pointer type do not ... |
Topic: work shop compiler vs PCWHD |
[email protected]
Replies: 5
Views: 15975
|
Forum: General CCS C Discussion Posted: Tue Jul 04, 2023 2:51 am Subject: work shop compiler vs PCWHD |
In work shop compiler the limitation is 13 chips. Additional chips can be purchased by paying 20 dollars.
I have the following doubts
1. Is the IDE used in work shop compiler and PCWHD are same? ... |
Topic: converting hexadecimal to decimal value |
[email protected]
Replies: 4
Views: 18941
|
Forum: General CCS C Discussion Posted: Sat Jul 24, 2021 1:55 am Subject: converting hexadecimal to decimal value |
char gps_buf[]={"GPGGA,000044.262,,,,,0,0,,,M,,M,,*4E"};
in the array the last 2 characters is the check sum value ( 4E)
HOW CAN I CONVERT THE LAST 2 CHARACTERS TO DECIMAL VALUE
FOR ... |
Topic: comparing 2 strings |
[email protected]
Replies: 6
Views: 20501
|
Forum: General CCS C Discussion Posted: Wed Apr 07, 2021 5:05 am Subject: comparing 2 strings |
How can i compare 2 string arrays using ccs string compare function ?
I am using pic18f4620.
Example:
char name_buf_1[]={"kalyn"};
char name_buf_2[]={&qu ... |
Topic: Indexing array in for loop |
[email protected]
Replies: 1
Views: 10642
|
Forum: General CCS C Discussion Posted: Sat Feb 06, 2021 3:19 am Subject: Indexing array in for loop |
my solution is
unsigned int8 a=0;
for (i=0;i<3;i++)
{
x[i]=input[0+a]
y[i]=input[1+a]
z[i]=input[2+a]
a=a+3;
} |
Topic: Indexing array in for loop |
[email protected]
Replies: 1
Views: 10642
|
Forum: General CCS C Discussion Posted: Sat Feb 06, 2021 1:53 am Subject: Indexing array in for loop |
My data is:
x
for(int8 i=0; i<3; i++)
{
x[i]=input[i ]
x[i]=input[i ]
x[i]=input[i ]
}
How can i index ... |
Topic: 10 bits conversion |
[email protected]
Replies: 3
Views: 14577
|
Forum: General CCS C Discussion Posted: Wed Jan 06, 2021 7:33 am Subject: 10 bits conversion |
There are lots of different ways. However by far the most efficient
(depending on how the 'bits' are stored), is to use a union or a #locate.
Now I say 'depending on how the bits are stored'. This ... |
Topic: 10 bits conversion |
[email protected]
Replies: 3
Views: 14577
|
Forum: General CCS C Discussion Posted: Wed Jan 06, 2021 3:44 am Subject: 10 bits conversion |
i have a 10 bits in an array
bits[]={1,1,1,1,1,1,1,1,1,1};
the value of the above is = 1023
now how can i convert the bits in the array and store the result in int16 bit variable. |
Topic: 16 bit integer to binary |
[email protected]
Replies: 6
Views: 20432
|
Forum: General CCS C Discussion Posted: Sat Jan 02, 2021 4:28 am Subject: 16 bit integer to binary |
So you actually want an array of numbers 0/1, not ascii text?. itoa
converts to ASCII.
You would just have to code it. Something like:
int1 result[16];
void valtobin(unsigned int ... |
Topic: 16 bit integer to binary |
[email protected]
Replies: 6
Views: 20432
|
Forum: General CCS C Discussion Posted: Fri Jan 01, 2021 10:30 pm Subject: 16 bit integer to binary |
A 'bit' is a binary digit. So if you have a '16bit number', then it already is
binary!.... Internally things are stored in binary....
Do you mean you want to output it as a binary text string?. If s ... |
Topic: 16 bit integer to binary |
[email protected]
Replies: 6
Views: 20432
|
Forum: General CCS C Discussion Posted: Fri Jan 01, 2021 9:11 am Subject: 16 bit integer to binary |
I want to convert a 16bit number to binary and store the value in an array.
What is the best and simple way to do this? |
Topic: modbus rtu data calculation |
[email protected]
Replies: 7
Views: 22729
|
Forum: General CCS C Discussion Posted: Thu Dec 31, 2020 6:18 am Subject: modbus rtu data calculation |
Sorry for the confusion bro.
Now it is working correctly.
Thank you. |
Topic: modbus rtu data calculation |
[email protected]
Replies: 7
Views: 22729
|
Forum: General CCS C Discussion Posted: Thu Dec 31, 2020 4:38 am Subject: modbus rtu data calculation |
I am using dspic 33ep512mu810.
Float format is IEEE-754.
union {
unsigned int8 bytes
The result I am getting in lcd is = 2676363008.00.
This value is wrong! |
Topic: modbus rtu data calculation |
[email protected]
Replies: 7
Views: 22729
|
Forum: General CCS C Discussion Posted: Wed Dec 30, 2020 10:31 pm Subject: modbus rtu data calculation |
Thanks for your code it is working.
For floating point value i got some more values:
Rx:000001-01 03 04 (4F 80 47 C3) 9E AE = 99999.000
Rx:000003-01 03 04 (44 9C C2 6A) FF A2 = -58.567
Rx:000005- ... |
|