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

Question about ports....pic18f4520

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



Joined: 15 Jul 2005
Posts: 59

View user's profile Send private message

Question about ports....pic18f4520
PostPosted: Tue Sep 12, 2006 6:06 pm     Reply with quote

Hi all,

Just a question....

I've written code to run an OLED LCD display. It all works fine using SPI bitbanging code etc...life is good.

I have the pins mapped to "C0~C5" and "A5"

Life is good.

NOW, when I move the pins to lets say "D0~D6", nada, nothing. Actually, I get display errors on the screen.

Now my question is, looking at the spec for the pic18f4520, the ports on "C" are mapped as "Digital I/O - SP", and so are the ones on Port D. I have disabled PSP.

Whats the difference? Is there any? Why would the same code but different pins make a difference is they are both "Digital I/O-SP"???

Any thoughts, advice, sharp poke in the eye, enlightenment, etc would be greatly appriciated!

BTW, I am prototyping on the CCS Software Proto Board...


~Kam (^8*
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Sep 12, 2006 6:32 pm     Reply with quote

The first thing would be to check the connections. Make sure you don't
have some pins swapped.

Next, if you're using set_tris_a() and set_tris_c(), make sure you change
them to set_tris_d() for the LCD code.
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