Author |
Message |
Topic: Calculus |
Mircea
Replies: 8
Views: 10550
|
Forum: General CCS C Discussion Posted: Wed Apr 08, 2009 7:02 am Subject: Calculus |
Thanks for making the effort to answer a question on this forum.
But do you really think the original poster is still waiting after 6,5 years ... ???
Mieux plus tard que jamais. : ... |
Topic: Calculus |
Mircea
Replies: 8
Views: 10550
|
Forum: General CCS C Discussion Posted: Fri Apr 03, 2009 6:46 am Subject: Re: Calculus |
Recent versions of CCS compiler offer %w format specifier.
printf(LCD_putc, "%4.1w", myIntVal);
So we can use (in many situations) integer type instead of float.
Please find % ... |
Topic: 8x8 Multiply with 16-bit Result |
Mircea
Replies: 3
Views: 47101
|
Forum: Code Library Posted: Tue May 06, 2008 3:10 pm Subject: 8x8 Multiply with 16-bit Result |
Not all processors have mul statement.
Here is an efficent algorithm to multiply two
integers.
Consider two numbers, example a=122 and b=57.
We want to get the result of their multiplication. ... |
Topic: LCD Bargraph |
Mircea
Replies: 20
Views: 172994
|
Forum: Code Library Posted: Tue May 15, 2007 7:46 am Subject: LCD Bargraph |
I thing you don't understand.
If there is a problem with the value 0 of Balance then you can use something like
if( Balance ) lcd_send_byte(1, Balance);
But the idea to replace a ... |
Topic: LCD Bargraph |
Mircea
Replies: 20
Views: 172994
|
Forum: Code Library Posted: Tue May 15, 2007 7:19 am Subject: LCD Bargraph |
tavioman,
why do you think the switch statement cannot be replace with that single statement? |
Topic: Binary and Ascii ... |
Mircea
Replies: 5
Views: 8620
|
Forum: General CCS C Discussion Posted: Fri Jan 12, 2007 9:29 am Subject: Binary and Ascii ... |
To get the ASCII code:
int8 GET_ASCII (int8 value )
{
value = '0' + (value & 0x0F); // only 4 bits
if(value>57) value+=7;
return value;
} |
Topic: LCD Bargraph |
Mircea
Replies: 20
Views: 172994
|
Forum: Code Library Posted: Fri Jan 12, 2007 4:33 am Subject: LCD Bargraph |
I think the switch statement can be replaced with only one statement.
switch (Balance)
{
case 0: lcd_send_byte(1, 0x00); break;
case 1: lcd_send_byte(1, 0x01& ... |
|