Hi!
If i load long integer variable to PORTD, which part of byte (upper or lower) will be loaded to PORTD? Thanks in advance.
bryan
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516523
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
Re: Loading 13 bits to PORTD
Posted: Thu Jul 31, 2003 10:56 am
Lower byte unless you do something like (int8)(x>>8) where x is a long (16bit).
:=Hi!
:= If i load long integer variable to PORTD, which part of byte (upper or lower) will be loaded to PORTD? Thanks in advance.
:=
:=bryan
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516524
Douglas Kennedy
Joined: 07 Sep 2003 Posts: 755 Location: Florida
Re: Loading 13 bits to PORTD
Posted: Thu Jul 31, 2003 11:01 am
:=Hi!
:= If i load long integer variable to PORTD, which part of byte (upper or lower) will be loaded to PORTD? Thanks in advance.
:=
:=bryan
A way to find an answer and gain insight is to look at the .lst file which is generated. You'll see which part is moved to portD
when you in c code assign a 16 bit value to an 8 bit port.
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516525
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum