CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

pic18f4585

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
andreluizeng



Joined: 04 Apr 2006
Posts: 117
Location: Brasil

View user's profile Send private message Send e-mail MSN Messenger

pic18f4585
PostPosted: Mon Jun 05, 2006 1:05 pm     Reply with quote

hi people...

im changing some code to work on 18f4585 (that was 16f877) and i sent some bytes to be port addresses..

#byte PORTA = 0x05
#byte PORTB = 0x06 .... etc..

how can i do that on 18f4585.. the address are 12bits long

PORTA = 0xf80


please.. help me.


regards..
_________________
Andre
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Jun 05, 2006 1:09 pm     Reply with quote

Do it in the same way. See this post for an example with the 18F452:
http://www.ccsinfo.com/forum/viewtopic.php?t=27181
andreluizeng



Joined: 04 Apr 2006
Posts: 117
Location: Brasil

View user's profile Send private message Send e-mail MSN Messenger

PostPosted: Mon Jun 05, 2006 1:13 pm     Reply with quote

pcm

i did that, but i thought that was wrong.. because help docs says that #byte is 8 bit long.. but.. anyway..

thanks for the help.


regards.
_________________
Andre
Ttelmah
Guest







PostPosted: Mon Jun 05, 2006 2:23 pm     Reply with quote

The #byte declaration, declares a 8 bit variable _at_ a location, that can be anywhere in RAM. 'PortA', is still only 8 bits long itself, it is the address that has got larger. :-)

Best Wishes
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group