View previous topic :: View next topic |
Author |
Message |
Gabriel
Joined: 03 Aug 2009 Posts: 1067 Location: Panama
|
18F Q-series MCLR circuit - closed |
Posted: Sat May 09, 2020 10:49 am |
|
|
I'm designing a board night now and I'm having a bit of an issue with the MCLR pin.
Historically, ive always done:
VCC->Diode->R10K -> MCLR -> Switch to Ground.
But now this is my first 3.3V board (ive been buying ready made boards for years now) and that diode drop looks like its gonna give me a problem.
Looking at the schematic of the current boards i use:
https://download.mikroe.com/documents/starter-boards/clicker-2/pic18fj/clicker2-pic18fj-manual-v101.pdf
and the Datasheet for the PIC on the board I'm building: PIC18F27/47/57Q43 - Section 4.
Neither carries a diode on the MCLR circuit.
Now, in my 16F84A days i was taught that the VPP would cause damage to the rest of the components on the boards and thus needed to be isolated with a diode.
After trying* to use my brain, well if VPP goes to lets say 13V, my power supply is 3.3V, that means i have a potential of 10V (rounded), so V=IR
10V/10K= 1mA.
(this does not even consider R2 as per the datasheet, so in reality its even less)
I guess i should follow the datasheet and forget my diode days, right?
(The PIC will stay in the board forever, until ive flashed it so many times it no longer works).
Using a Pickit3
Thanks G. _________________ CCS PCM 5.078 & CCS PCH 5.093
Last edited by Gabriel on Sun May 10, 2020 7:53 pm; edited 1 time in total |
|
|
gjs_rsdi
Joined: 06 Feb 2006 Posts: 468 Location: Bali
|
|
Posted: Sat May 09, 2020 12:58 pm |
|
|
Hi Gabriel
I am not an expert but from 1995 when I started using PIC I have just 10K to VCC. Never burn a controller while programming.
Best wishes
Joe |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9225 Location: Greensville,Ontario
|
|
Posted: Sun May 10, 2020 5:23 am |
|
|
Gee, Joe, got a better one... I put a 16C84 in wrong way into socket. Hmm... didn't work, put it in properly, and it WORKED !!
That's back in the 15 min UV erase dayze...... |
|
|
Gabriel
Joined: 03 Aug 2009 Posts: 1067 Location: Panama
|
|
Posted: Sun May 10, 2020 5:56 am |
|
|
Hi Joe, thanks for the input, i went with a straight copy from the datasheet.
Temtronic, i was originally going to base this board im building on your pic of choice. ive heard you mention several times you only use 1 pic. I could not however find a reference to the pic model so i ended up with the pic mentioned in my post... i just hope CCS suports it! _________________ CCS PCM 5.078 & CCS PCH 5.093 |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19504
|
|
Posted: Sun May 10, 2020 7:58 am |
|
|
There is a critical 'historical' difference.
On the first PIC's, Vpp, was actually the programming voltage. Fed directly
to the die.
A little later, they changed the design, and the chip internally has an
inverter that generates the programming voltage inside the die. The Vpp
pin controls this, and the chip 'slaves' it's generated voltage to the voltage
on Vpp.
This affects how much current the programmer has to deliver on the
line. On the older chips several mA is fed into the Vpp signal. On newer
chips the maximum current is normally limited to about 2mA max.
On the older chips, Vpp, was also a higher voltage than is now
used. On the 16F84, Vpp is 12v. On the 18F27, Vpp is just 8v.
This reduces how much effect the resistor on the Vpp pin has, in terms
of delivering power into Vdd. Since the programmer itself is also connected
to this line as soon as Vpp pulls the pin up, the supply regulator starts
to switch off, and provided the resistor can only deliver perhaps 1ma,
the rail won't go up any significant amount. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9225 Location: Greensville,Ontario
|
|
Posted: Sun May 10, 2020 9:53 am |
|
|
gee G
PIC18F46K22 , I use the DIP, even that's hare to read or see the 'dot'.
Lots of 'test ' programs from Mr. T and PCMP are posted here using it.
MPLAB 8.92 likes it, PCH is 'happy'....so I have no urge to get a newer version of the compiler or IDE SW.
Kinda 'stuck in a rut'.... it works, I'm happy... |
|
|
Gabriel
Joined: 03 Aug 2009 Posts: 1067 Location: Panama
|
|
Posted: Sun May 10, 2020 7:53 pm |
|
|
Ttelmah, thanks for the in depth explanation as usual. I guess i wasn't so crazy to think i needed a diode since my last diy board was with an 16F84A! I actually have it on my desk still collecting dust, so i plugged it in and it still worked!
Temtronic, i too went for the DIP chip... i got all smd parts and a big ol dip40 right across the board! _________________ CCS PCM 5.078 & CCS PCH 5.093 |
|
|
|