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

Use the MCLR pin as a digital input????

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



Joined: 16 Apr 2009
Posts: 18
Location: Spain

View user's profile Send private message

Use the MCLR pin as a digital input????
PostPosted: Thu Jul 16, 2009 6:31 am     Reply with quote

Hello everybody in this forum¡¡


I'm programming a PIC18F4550 mcu...

In my application there isn't need of a reset signal so I plan to use this pin as a digital input:

pin nº 1 : MCLR/VPP/RE3

In software I use this preprocessor directive:
FUSES NOMCLR

and In hardware I connected this pin to the ICSP VPP pin, and to a bluetooth module ( this module, has a digital output that goes to high level when a remote connection is achieved...)

The problem I have is when I try to programm the device using my PICkit 2 programmer it doesn't detect the micro, when I disconnect MCLR pin from the bluetooth module the problem disapears.

How can I use this pin??? Can everybody give any advice???

I tested it connecting a 10k pull-up resistor as usually is done when MCLR is used but the same problem appears...

Thank you very much, and sorry for my english¡
bungee-



Joined: 27 Jun 2007
Posts: 206

View user's profile Send private message

PostPosted: Thu Jul 16, 2009 7:14 am     Reply with quote

You can use this pin as digital input. What you describe is problem when programming the PiC and other things are connected to this pin. Problem is that in programming mode this pin receives ~12V of Vpp for programing purposes, if this voltage is lower then programing can not be done.

You need to add switch and when you program your pic you disconnect your pheripherals and in normal operation you connect them back.

There is application note on Microchip's page regarding ICSP and connections look also there Wink

P.S.: Or if you use TQFP/QFN package you can use secondary programing pins. Wink
rvalor



Joined: 16 Apr 2009
Posts: 18
Location: Spain

View user's profile Send private message

PostPosted: Thu Jul 16, 2009 7:47 am     Reply with quote

Thank you very much bungee-

I've seen the ICSP application note, I didn't noticed that about the volts in the VPP pin, Embarassed
I will not use this pin as a digital input because I have no simple way to disconnect the bluetooth module while programming...

Thank you very much¡¡
bkamen



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

View user's profile Send private message

PostPosted: Thu Jul 16, 2009 9:55 am     Reply with quote

Well, a manual switch is ugly.

You could use a P-MOSFET to shut off (open) the input line from the bluetooth module during programming. And then close it (turn on) when not programming.

This would be automatic.... over manual (yuk)


-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
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