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 CCS Technical Support

Is this an error from CCS?

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



Joined: 03 Mar 2004
Posts: 11

View user's profile Send private message

Is this an error from CCS?
PostPosted: Wed Oct 27, 2004 2:40 pm     Reply with quote

I define
#bit GRNLED_SEL = PORTF.2
#bit MMCPOWERE = TRISF.3
#bit MMCPOWER = LATF.3


When I assign GRNLED_SEL=1, it affects the state of MMCPOWER.
chen



Joined: 03 Mar 2004
Posts: 11

View user's profile Send private message

PostPosted: Wed Oct 27, 2004 2:41 pm     Reply with quote

BTW, I am using PIC18F8620 with CCSC 3.212

and I initialize MMCPOWERE =0
dyeatman



Joined: 06 Sep 2003
Posts: 1934
Location: Norman, OK

View user's profile Send private message

We need more information!
PostPosted: Wed Oct 27, 2004 3:00 pm     Reply with quote

It would be nice to see ALL of your initialization/setup source code which includes showing the include file(s) you are using.

Also post the portion of the LISTing file around the instructions you posted so we can see what the compiler is doing.
Trampas



Joined: 04 Sep 2004
Posts: 89
Location: NC

View user's profile Send private message MSN Messenger

PostPosted: Wed Oct 27, 2004 3:54 pm     Reply with quote

Also read about the fast I/O if the fast I/O is not selected then setting a port's bit might change the Tris register.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Oct 27, 2004 4:07 pm     Reply with quote

You're probably having a RMW problem. Try doing all operations
on the latch, instead of the port. That should eliminate the problem.
Change the definition of the Green LED bit to use the Latch. Example:
#bit GRNLED_SEL = LATF.2

See this post:
http://www.ccsinfo.com/forum/viewtopic.php?t=19130

Also read the Microchip Reference manual on the i/o ports for 18F PICs:
http://ww1.microchip.com/downloads/en/DeviceDoc/39511.pdf
chen



Joined: 03 Mar 2004
Posts: 11

View user's profile Send private message

PostPosted: Thu Oct 28, 2004 12:16 pm     Reply with quote

Thanks, I will follow your suggestions
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