Author Topic: PIC Chips MCLR pin question.  (Read 1000 times)

0 Members and 1 Guest are viewing this topic.

Offline DavyTopic starter

  • Regular Contributor
  • *
  • Posts: 53
PIC Chips MCLR pin question.
« on: May 22, 2023, 07:57:48 am »
When programming a Pic chip (16F84 in this case) the MCLR reset pin is tied to the +ve rail to keep it de-activated, this is usually done by a 10K resistor.... now then when using a Pic3 and a ZIF extender board the pin is tied directly to V+ rail by the jumper pin setting.

Question is, is a direct connection to the +ve rail OK or do you have to insert a 10K between the relevant jumper pin on the extender board?  As you can tell, I've never dabbled with MCU's before..

Thanks, Dave
« Last Edit: May 22, 2023, 07:59:29 am by Davy »
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13694
  • Country: gb
    • Mike's Electric Stuff
Re: PIC Chips MCLR pin question.
« Reply #1 on: May 22, 2023, 08:06:50 am »
You can connect it to +V, but you will not be able to program it on-board
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 
The following users thanked this post: Davy

Offline DavyTopic starter

  • Regular Contributor
  • *
  • Posts: 53
Re: PIC Chips MCLR pin question.
« Reply #2 on: May 22, 2023, 09:34:16 am »
Ah, many thanks for that and thank you for the speedy reply. Yes it's going to be programmed out of SirKit, I understand that other components in-circuit could have adverse effects.

It's for a countdown timer for a uV box I'd built, I built two, one a LED the other a LCD display, I don't know which way to go here, I do have suitable uV tubes and built a display using thru-hole uV LED's. Guess it was that I wanted try my hand at MCU's.

I'm happy now thanks to you, if ya' see the moon with two faces giffus a wave...!

Dave
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13694
  • Country: gb
    • Mike's Electric Stuff
Re: PIC Chips MCLR pin question.
« Reply #3 on: May 22, 2023, 11:04:01 am »
BTW You DO want to be able to program it on-board as it makes development easier - you don't want to be messing about putting chips in & out of sockets all the time.
 
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline DavyTopic starter

  • Regular Contributor
  • *
  • Posts: 53
Re: PIC Chips MCLR pin question.
« Reply #4 on: May 22, 2023, 11:46:16 am »
I've got to go round the learning curve yet guess I'll pick that up as I go along, I do appreciate your input. I got to start 'doing' rather than reading, suppose they go hand in hand though.

Dave

 

Offline hans

  • Super Contributor
  • ***
  • Posts: 1626
  • Country: nl
Re: PIC Chips MCLR pin question.
« Reply #5 on: May 22, 2023, 10:19:07 pm »
That 10K resistor to +Ve is called a pull-up resistor. You can look it up, but a brief explanation:

The pin MCLR reads the logic level at its input to reset the MCU (where its active low, so low=reset, high=run). "By default" we want to the MCU to run of course, so you can tie it to +Ve.

However as Mike says, you may also want to program the chip. To do that, the programmer needs to reset the chip so it can do it's programming protocol magic. However, if you tied it hard to +Ve, it's not possible to make it any other logic level without shorting the supply +Ve. So a pull-up resistor is added. Then the programmer can still drive the signal to ground, and the 10K resistor limits the current. If the programmer is not connected or driving the pin, then the 10K sets the 'default' value.

There is also a pull-down resistor, which works the same but exactly opposite. It creates a 'zero', but another circuit can drive the signal high with a limited current.

And indeed, if you can: always try to find space to include an ICSP header. Removing chips all the time to reprogram and test is a hassle. I don't think the PIC16F84 supports debugging as its quite old, but modern PICs and other MCUs also allow the code to be paused and inspected while its running. This works best when the chip is in the circuit it needs to operate.
 

Offline calexanian

  • Super Contributor
  • ***
  • Posts: 1881
  • Country: us
    • Alex-Tronix
Re: PIC Chips MCLR pin question.
« Reply #6 on: May 22, 2023, 10:35:55 pm »
Some pic parts actually need various voltages on MCLR during programming. Having a pull up resistor there still allows the programmer to place that voltage wherever it sees fit. On most PIC F parts a minimum of 4.7K is required to VDD. Generally we use 10K or 20K as the pull up resistor followed by a small .1 uf cap to form a RC circuit to filter any potential noise that gets in on the MCLR line then an small resistance to the actual pin. usually 510 ohms.
Charles Alexanian
Alex-Tronix Control Systems
 

Offline barshatriplee

  • Regular Contributor
  • *
  • !
  • Posts: 130
  • Country: bd
Re: PIC Chips MCLR pin question.
« Reply #7 on: May 23, 2023, 03:01:05 pm »
During normal operation it is recommended to use a 10K resistor between the MCLR pin and the V+ rail to prevent accidental resets.
Since you are new in PIC programming, you can see here for some PIC tutorials:
https://www.theengineeringprojects.com/2014/10/getting-started-with-pic-microcontrollers.html

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf