Author |
Message |
Topic: mul 16x16 |
yo4hsp
Replies: 12
Views: 11887
|
Forum: General CCS C Discussion Posted: Sun Nov 15, 2009 4:42 am Subject: thanks |
thanks..
here my code, butt is still with errors. i think my mcu is slow for my application.
signed int32 inmultit;
signed int32 inmultire (signed int16 ARG1H, int16 ARG1L, signed int16 ARG2H ... |
Topic: mul 16x16 |
yo4hsp
Replies: 12
Views: 11887
|
Forum: General CCS C Discussion Posted: Mon Nov 09, 2009 12:55 pm Subject: multiply 16 x 16 with sign |
ok, but "var = _mul(x,y);" is for unsigned numbers. in my filter i have a lots of coefficients and samples signed. whas i have to use??? so, i need "mul" or anything like multiplie ... |
Topic: mul 16x16 |
yo4hsp
Replies: 12
Views: 11887
|
Forum: General CCS C Discussion Posted: Sat Nov 07, 2009 5:56 am Subject: mul 16x16 |
I need a 16x 16 multiplier with sign. For up side code, the formula is:
RES3:RES0 = ARG1H:ARG1L • ARG2H:ARG2L
= (ARG1H • ARG2H • 216) +
(ARG1H • ARG2L • 28) ... |
Topic: mul 16x16 |
yo4hsp
Replies: 12
Views: 11887
|
Forum: General CCS C Discussion Posted: Sat Nov 07, 2009 5:55 am Subject: mul 16x16 |
Hello,
For my FIR filter, I need a multiplier. I use pic18f2455 and I found on his datasheet (pp 98). This is asm code for hardware multiplier.
#asm
MOVF ARG1L, W
MULWF ARG2L ; ARG1L * ARG2 ... |
Topic: How to convert bin to hex, hex to bin |
yo4hsp
Replies: 6
Views: 11909
|
Forum: General CCS C Discussion Posted: Sun Nov 01, 2009 12:00 pm Subject: re.. |
I used ADC - ads8321 (16bit) and DAC max531. The read value from ADC is applied to a FIR filter with 31 coef, then send to DAC... |
Topic: How to convert bin to hex, hex to bin |
yo4hsp
Replies: 6
Views: 11909
|
Forum: General CCS C Discussion Posted: Sun Nov 01, 2009 11:57 am Subject: hex to bin, bin to hex |
ok, this is my code:
int8 bin_to_hex (int bin)
{
int8 hex;
if ( bin == 0000) hex = 0x0;
if ( bin == 0001) hex = 0x1;
if ( bin == 0010) hex = ... |
Topic: How to convert bin to hex, hex to bin |
yo4hsp
Replies: 6
Views: 11909
|
Forum: General CCS C Discussion Posted: Tue Oct 27, 2009 12:00 am Subject: How to convert bin to hex, hex to bin |
Hello,
I need to convert 16 bits Bin code(2) to 2 bytes Hexa (from an AD converter), then this 2bytes in Hexa(16) I need to convert to 12 bits Bin code (2). (for DA converter).
The problem is w ... |
|