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

ouput_c(255) gives 215 on PORTC

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



Joined: 08 Sep 2006
Posts: 182

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

ouput_c(255) gives 215 on PORTC
PostPosted: Wed Feb 11, 2009 7:20 am     Reply with quote

Hello,

When I write output_C(255) not all of the bit go to one (bit 3 and bit 5 remain 0). So the port show's 215.
What is going on here???

PIC 18F876A
Compiler:4.049...

It used to work and suddenly.... it goeas bananas...

Even with an other PIC the same result..

Any ideas??

Regards,
Jody
Wayne_



Joined: 10 Oct 2007
Posts: 681

View user's profile Send private message

PostPosted: Wed Feb 11, 2009 7:33 am     Reply with quote

What else does pin C3 and C5 do on that pic ?
You most likely have enabled something which is controlling those pins.
Jody



Joined: 08 Sep 2006
Posts: 182

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

PostPosted: Wed Feb 11, 2009 7:45 am     Reply with quote

Embarassed

I enabled the SPI interface....
Code:
 setup_spi(SPI_MASTER|SPI_L_TO_H|SPI_CLK_DIV_4);


Removing this did it...

Thanks for the assistance,
Jody
rnielsen



Joined: 23 Sep 2003
Posts: 852
Location: Utah

View user's profile Send private message

PostPosted: Wed Feb 11, 2009 10:11 am     Reply with quote

It's the little things that can sneak up on you, like a tick, and bite you on the back-side. Big things, like a dog growling, you can easily keep away from. Funny how, when you figure it out, it makes perfect sense why it wasn't working when you thought you had it right before. Happens to all of us.

Ronald
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