Free Print Subscription Printer-friendly version Email to a Friend

Use the MCLR pin as an output with PIC microcontrollers

( 01 Apr 2008 )

Although microcontroller manufacturers try to offer designers products that almost exactly fit the needs of their designs, another output pin is often necessary. This situation is particularly true in small designs using microcontrollers with eight pins or fewer. This Design Idea employs the Microchip (www.microchip.com) PIC10F222. The PIC10F222 comes in an SOT23-6 package and offers three I/O pins, one input pin, RAM, flash, and an ADC module. You must program these tiny microcontrollers, just as you do with their big brothers. To program these microcontrollers, you need the MCLR, two I/O pins (data and clock), and supply pins (VCC and GND). To enter programming mode, you need MCLR and supply. Because the microcontroller must differentiate between normal and programming mode, the MCLR pin usually reaches a voltage of approximately 12V to enter programming mode. Thereafter, in normal operation, you can configure the MCLR pin either as an external reset or as an input-only pin.

This design uses one pin for analog input and the other three as outputs. The design thus requires an additional output. For that reason, this circuit uses the MCLR pin as an output. For simplicity, Figure 1 shows only the GP3/MCLR output circuit. To allow the GP3/MCLR pin to act as an output, the circuit uses the configurable weak pullups that this microcontroller offers. The selected function for the GP3/MCLR pin is input, and you must enable the global weak-pullup bit in the microcontroller痴 configuration word. Although you cannot individually configure weak pullups, this inability is not a problem because you configure all other pins as analog inputs or digital outputs.
The weak pullups have a resistance of 20 to 150 kΩ, depending on supply voltages, so this circuit uses transistor Q1 to drive higher loads, such as the depicted LED. R1 drives the transistor off when you deactivate the pullups. Because the transistor痴 gate is resistance-driven, the maximum toggle frequency depends on the chosen transistor. The worst-case scenario occurs when you need to switch off Q1. R1 and Q1痴 gate-to-source capacitance determine the transistor痴 switch-off time.

Programming voltages for the MCLR pin are about 12V. Therefore, Q1 must withstand a gate-to-source voltage higher than this value. This design uses a MOSFET having a ア18V withstand voltage. For this reason, you should not use digital MOSFETs. You can use this circuit with other PIC microcontrollers and with most RS08KA family microcontrollers from Freescale.


Caption

Figure 1 Adding a MOSFET and associated circuitry to a PIC microcontroller痴 MCLR input pin transforms the pin into an output.


Click here for Illustrations:


Figure 1


 
Free Print Subscription Printer-friendly version Email to a Friend
Article Rating 
Average Rate:
 
Poor Quite Good Good Very Good Excellent
 
 
Related Content 
 
MCU/MPU Finder Powered by RENESAS
 
WEBCASTS
 
KNOWLEDGE CENTER
Panasonic Key Devices Guide 2008:
 
Fairchild Semiconductor :
 
 
Highest Rated  
 
Feedback Loop  
 
ADS BY GOOGLE 
 
 
 
ADVERTISEMENT
Press Release 
 
TECHNOLOGY NEWS
 
RESOURCE CENTER


 
 
PRODUCT NEWS
 
FEATURED SPONSORS


 
 
 
DESIGN CENTERS
 
ADVERTISEMENT
     
Reference Designs 
   
     
 
 
 

 
 
RSS
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   

POLL
How do you expect your company to perform this year?
Worse than last year
Same as last year
Better than last year
View results
 
Outlook and Trends 2008