Sign in

username:

password:



Not a member?

Search c55x



Search tips

Subscribe to c55x



c55x by Keywords

AIC23 | C5509 | CCS | CSL | EMIF | EVM | GEL | GPIO | HPI | Interfacing | JTAG | McBSP | OMAP | Omap15 | OMAP59 | RTDX | SDRAM | TMS320VC5509 | USB | XDS5

Ads

Discussion Groups

Discussion Groups | TMS320C55x | byte accessing in memory and 16-bit word accessing through fread

Technical discussions about the TI C55x DSPs (including the c5501, c5502, c5503, c5507, c5509, c5510 and OMAP5910).

  

Post a new Thread

byte accessing in memory and 16-bit word accessing through fread - ahma...@yahoo.com - Jun 10 7:06:44 2008



Hi
Do you know in C55x dsps the following:
I use fread to read 16-bit samples from a file but even I use "2" as the size
parameter for fread but it reads 8-bit samples for each execution of "fread"
function. So How can I read a 16-bit samples by fread?

Also is it possible to set the arrange of memory in a manner that we could access it in byte or
word(16-bit) samples.
Regards
------------------------------------

OMAP35x EVM jump-starts low-power apps
------------------------------------
The modular and extensible OMAP35x Evaluation Module (EVM) enables developers to start building
applications based on the OMAP35x architecture:http://www.DSPRelated.com/omap35x



(You need to be a member of c55x -- send a blank email to c55x-subscribe@yahoogroups.com )

Re: byte accessing in memory and 16-bit word accessing through fread - sravanthi - Jun 10 10:37:57 2008

  Hi,
  As far as i know, fread and fwrite functions always operate on 8-bitsamples only, if u are
working on CCS .So after u read 8-bits , pack the successive 8-bits samples in to one 16-bit
variable as shown below.
    y[i] = x[i+1] << 2 | x[i]
 where i represents the no. of bytes.
 where x[i] containts 8 bit sample and y[i] contains 16-bit sample, which is your required
output.
 Hope, this will help you.

 Regards,
 sravanthi

On Tue, 10 Jun 2008 a...@yahoo.com wrote :
>Hi
>Do you know in C55x dsps the following:
>I use fread to read 16-bit samples from a file but even I use "2" as the size
parameter for fread but it reads 8-bit samples for each execution of "fread"
function. So How can I read a 16-bit samples by fread?
>
>Also is it possible to set the arrange of memory in a manner that we could access it in
byte or word(16-bit) samples.
>Regards
>
  SRAVANTHI

------------------------------------

OMAP35x EVM jump-starts low-power apps
------------------------------------
The modular and extensible OMAP35x Evaluation Module (EVM) enables developers to start building
applications based on the OMAP35x architecture:http://www.DSPRelated.com/omap35x



(You need to be a member of c55x -- send a blank email to c55x-subscribe@yahoogroups.com )