Hello
i am using SHARC ADSP 21060.
is there any way of sending data Byte by Byte on serial using c not
assembly.
the problem here is that all data types are 32-bit and the compiler
doesn't allow byte shifting in float. also byte adressing mode is not
available in SHARC 21060.
Looking Forward
M. Arshad Khan
Problem in Sending Data Byte by Byte on serial (SHARC 21060)
Started by ●July 7, 2008
Reply by ●July 8, 20082008-07-08
On Mon, 7 Jul 2008, Arshad wrote:
> Hello
> i am using SHARC ADSP 21060.
> is there any way of sending data Byte by Byte on serial using c not
> assembly.
> the problem here is that all data types are 32-bit and the compiler
> doesn't allow byte shifting in float. also byte adressing mode is not
> available in SHARC 21060.
> Looking Forward
> M. Arshad Khan
Use the fdep instruction. Rn = FDEP Rx by : with optional
sign extension. It takes 'len' bits starting from 'bit' position (both
values are 6 bits wide max) and deposits them in register Rn. So you can
take a cleared register, copy 8 bits from anywhere, and use the lowest 8
bits to send in your serial routine. In C it would be the same thing
rn = (rx >> bit) & 0xff;
Patience, persistence, truth,
Dr. mike
> Hello
> i am using SHARC ADSP 21060.
> is there any way of sending data Byte by Byte on serial using c not
> assembly.
> the problem here is that all data types are 32-bit and the compiler
> doesn't allow byte shifting in float. also byte adressing mode is not
> available in SHARC 21060.
> Looking Forward
> M. Arshad Khan
Use the fdep instruction. Rn = FDEP Rx by : with optional
sign extension. It takes 'len' bits starting from 'bit' position (both
values are 6 bits wide max) and deposits them in register Rn. So you can
take a cleared register, copy 8 bits from anywhere, and use the lowest 8
bits to send in your serial routine. In C it would be the same thing
rn = (rx >> bit) & 0xff;
Patience, persistence, truth,
Dr. mike