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

Problem using pins B5 and B6 of PIC18F2580

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



Joined: 07 May 2010
Posts: 1

View user's profile Send private message

Problem using pins B5 and B6 of PIC18F2580
PostPosted: Wed Jun 02, 2010 11:00 am     Reply with quote

Hello,

I am working with a PIC18F2580 and I am trying to set the pins B5 and B6 as Output.

I am using the functions
Code:

OUTPUT_DRIVE(PIN_B5);
OUTPUT_DRIVE(PIN_B6);


If I do this
Code:

OUTPUT_LOW(PIN_B5);
OUTPUT_LOW(PIN_B6);

Both pins have 0V

If I do this
Code:

OUTPUT_HIGH(PIN_B5);
OUTPUT_LOW(PIN_B6);

or
Code:

OUTPUT_LOW(PIN_B5);
OUTPUT_HIGH(PIN_B6);

both pins have about 0.7V.

If I do this:
Code:

OUTPUT_HIGH(PIN_B5);
OUTPUT_HIGH(PIN_B6);

Both pins go to 5V...

I have the following settings in the fuses:
Code:

//#device ICD=TRUE
#device adc=10
#device PASS_STRINGS=IN_RAM
#device HIGH_INTS=TRUE

#fuses WDT32768//WDT128                   //Watch Dog Timer uses 1:128 Postscale
#fuses INTRC_IO                 //IO
#fuses NOPROTECT                //Code not protected from reading
#fuses NOIESO                   //Oscillator switching is disabled, main oscillator is source
#fuses BROWNOUT                 //Reset when brownout detected
//#FUSES BORV21                   //Brownout reset at 2.0V
#fuses PUT                      //Power Up Timer
#fuses STVREN                   //Stack full/underflow will cause reset
#fuses NODEBUG                    //Debug mode for use with ICD
#fuses NOLVP                    //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
#fuses NOWRT                    //Program memory not write protected
#fuses NOWRTD                   //Data EEPROM not write protected
#fuses NOWRTB                   //Boot block not write protected
#fuses NOWRTC                   //configuration not registers write protected
#fuses NOCPD                    //No EE protection
#fuses NOCPB                    //No Boot Block code protection
#fuses NOEBTR                   //Memory not protected from table reads
#fuses NOEBTRB                  //Boot block not protected from table reads

Can anyone help me on this?

Thanks
bkamen



Joined: 07 Jan 2004
Posts: 1611
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Wed Jun 02, 2010 11:04 am     Reply with quote

looks like you have them connected together maybe?

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Jun 02, 2010 11:19 am     Reply with quote

Post a description of the external circuits connected to these two pins.
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