ISP question - Page 1
Forum section: electronics / projects

author: jerolee
author_rank: Contributor
timestamp: July 13, 2015, 10:08:56 pm
content: Hi guys,I got this burning question about ISP.In my design with AVR ATMEGA328P-AU, i have ISP option. My problem? is that my processor uses the sck port as a output aswell. That port drives a mosfet gate too.Do i have a problem when i am gonna program the MC with that mosfet already connected (its all SMD) , and if so how to solve this?I was thinking about a jumper or to make a solderjoint after programming.Hopefully this aint nessecary but im not that experienced thats why i drop the question here.Thanks all,Jerolee

author: BennVenn
author_rank: Regular Contributor
timestamp: July 13, 2015, 10:22:49 pm
content: You'll have problems. Is the mosfet on the micro's 5v line?

author: jerolee
author_rank: Contributor
timestamp: July 13, 2015, 10:25:23 pm
content: Yes, it uses the same VCC plane as the MC.So i defenatly need that solderjoint to prevent ISP making the Gate high or messing things up?

author: Andy Watson
author_rank: Super Contributor
timestamp: July 13, 2015, 10:28:40 pm
content: What does the mosfet control? Can you post a schematic ?

author: jerolee
author_rank: Contributor
timestamp: July 13, 2015, 10:33:47 pm
content: Does that make any difference what that mosfet drives? didnt think so.Please stay on topic.Will it cause any ISP problems when the Gate is on the SCK port while using ISP? yes / no.If yes, i can solve this by isolating the Gate to make a "to be soldered joint" after ISP-ing i gues? yes / noThanks again,Jerolee

author: BennVenn
author_rank: Regular Contributor
timestamp: July 13, 2015, 10:38:44 pm
content: Does it make any difference? Yes. If it is driving an inductive load (relay etc) the amount of back-emf generated with the high data rate will be large and can cause problems. If it is driving an LED then it is no big deal.Having a mosfet gate on any of your ISP pins wont prevent you flashing your AVR. It is more to prevent damage downstream.

author: Andy Watson
author_rank: Super Contributor
timestamp: July 13, 2015, 10:39:02 pm
content: Quote from: jerolee on July 13, 2015, 10:33:47 pmYes it makes a difference, otherwise I wouldn't have asked. But if you don't want help, carry on.

author: BennVenn
author_rank: Regular Contributor
timestamp: July 13, 2015, 10:42:04 pm
content: And it's best not to leave a gate floating, 50/50 chance the fet will be on, or even worse, half on.

author: jerolee
author_rank: Contributor
timestamp: July 14, 2015, 12:28:11 am
content: I was thinking that a enhanced mosfet has no physical connection with drain & source, so whatever this mosfet is driving has no influence on the Gate, or am i totally wrong here?It is an inductive load yes, but i have a flywheel diode, some filtering, a diode to prevent voltage spike back on the line and a zenerdiode across the mosfet. isnt this protective enough?The Gate is tied to Gnd with a resistor so its not floating.So its best to leave the ISP pins untouched then, a bit odd not to use them only for ISP purpose?Thanks,Jerolee

author: Wilksey
author_rank: Super Contributor
timestamp: July 14, 2015, 12:36:49 am
content: Quote from: jerolee on July 13, 2015, 10:33:47 pmSeeing as you already know, why are you asking these mediocre questions?If you in fact (as I suspect) don't have an f-ing clue, then don't be so bloody rude to the people trying to help you out!

author: BennVenn
author_rank: Regular Contributor
timestamp: July 14, 2015, 01:11:32 am
content: You can re-use the ISP pins, absolutely. And you are correct that there is no physical connection other than gate capacitance. You can program your AVR with a mosfet attached to ANY pin of an AVR. Switching an inductive load at 10khz via a logic level mosfet (it is logic level, yes?) will generate a whole heap of noise and most likely heat in your clamping diodes/flywheel diodes.Quote from: jerolee on July 13, 2015, 10:33:47 pmDoesn't matter how you look at it, that was rude. If you post requesting help or advice and come back with crap like that... Think before you speak, you are in an engineers forum. If someone asks you a question regarding your post it is likely you have not provided enough/relevant information to help you.

author: LukeW
author_rank: Frequent Contributor
timestamp: July 14, 2015, 01:20:42 am
content: The gate itself won't make any difference.When you do the ISP flash, will you have power connected to the downstream FET circuit, with power available to that load?If so, it may behave erratically because it will be trying to turn on and off very fast - possible FET heating and erratic behavior from the load system.

author: jerolee
author_rank: Contributor
timestamp: July 14, 2015, 02:06:50 am
content: Thanks guys.Sorry i was a bit rude earlier.I am gonna setup for testing and well, i only need to flash the AVR once. So if the erratic behaviour of fet and small inductive load is really bad im gonna make the connection to the fet gate after the flashing is done.regards,jerolee