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

Help please. If i set 1 bit of port E 3 pins go high....

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







Help please. If i set 1 bit of port E 3 pins go high....
PostPosted: Wed Dec 14, 2005 11:35 pm     Reply with quote

Hi,

i am having a problem with a device i built and have a major deadline for soon.

The code is very simple, basically i have 20 output ports, on a 18F8627 connected to external devices (LEDs) and they are turned on by a lookup table.

I was testing the device but the first 4 LEDs are connected to pins 4-7 of PORT E. I am able to turn on the one connected to E7, but every time i set any of E4, E5 or E6 they all go high together.

I am setting the whole port together, rather than individual pins with the following instruction:

output_e(frames[FE][whichFrame]) ;

I have similar instructions for LEDs connected to PORT J and D and they work perfectly.

Appreciate any help

Thanks in advance.

Sebastian
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Dec 15, 2005 12:28 am     Reply with quote

Disable the External Memory Bus. It's enabled by default upon reset.
Add the code shown in bold, below:
Quote:
#include <18F8627.H>
#fuses XT, NOWDT, NOPROTECT, BROWNOUT, PUT, NOLVP
#use delay(clock=4000000)

#byte MEMCON = 0xF9C
#bit EBDIS_BIT = MEMCON.7


void main()
{
EBDIS_BIT = 1; // Disable external memory bus


while(1);
}
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