I'm currently designing a small board based around the ATtiny85. It doesn't do anything particularly exciting, just driving some logic level mosfets in order to sequence some power rails.
Due to the low pin count, I need to connect the mosfet gate pins to the MISO, MOSI and SCK pins.
I have a 100 ohm series resistor between the ATtiny85 pins and the mosfet gate, as well as a 100K pull down from gate to ground.
Is this going to cause any problems when I program the ATtiny85 via ISP ?
I'm just not sure if the mosfet is going to interfere with the programming signals.
ISP pins will able to share both I/O and ISP functions when some terms are satisfied. When using any I/O pin that also assigned to ISP function, the following must be observed.
Insert a resister between reset pin and reset circuit to avoid interference from the reset circuit.
Make sure that ISP action doesn't affect any other functions.
Don't drive from external circuit during ISP operation, or a resister should be inserted.
Don't connect heavy load such as affects ISP function.
So 100Ohm might be a bit of a heavy load. If you're application also uses buttons or some input I would share the line with that instead of the mosfet.
So 100Ohm might be a bit of a heavy load. If you're application also uses buttons or some input I would share the line with that instead of the mosfet.
I can try a larger (maybe 1K) resistor if the 100 ohm proves to be too small.
Unfortunately, I only have 6 I/O pins to play with, and the reset pin is already taken, so that only leaves five. I've got three mosfets to connects, so one of them is going to end up on one of the ISP pins. I'll play with it tonight and see what works.
If it comes to it, I can possibly squeeze an SMD 328p on the board, but that's a bit of overkill for the sake of one pin.
1k for a mosfet might be a bit much. If it's a on/off mosfet that's fine but for PWM I think it's to much. Then I would implement a buffer of some sort.
Then a higher resistor should be fine. The gate opens a bit slower aka, some extra Ron when it's opening aka, some power dissipation when opening but that should be very limited when it's not PWM.
• Avoid capacitive loads like a piezoelectric buzzer.
• Watch for hidden voltage dividers. Some (most?) commercial programmers include series resistors. When added to the circuit those resistors can create a voltage divider that prevents the voltage at the pin from reaching a high / low enough level. In this circumstance, an Arduino configured to be a programmer solves the problem; just connect the programmer directly to the target and do not include series resistors.
I guess I might be missing something here since you haven't provided a schematic, but if you are using SPI pins as GPIO, isn't it going to be a problem that your devices driven by the SPI pins are going to be turning on and off during the SPI mode ISP programming ?
Why is that not a concern ?
Just hooking things up as I type. I've got the ATtiny85 running the blink sketch, so basic ISP is up and running. Just about to connect a MOSFET to see what happens.
Not concerned about what the MOSFET is controlling, as this can be completely isolated. If the MOSFET turns on/off during programming, it's not going to be an issue. I'm just interested if the MOSFET gate and associated resistors is going to upset the ISP programming.
I'm just interested if the MOSFET gate and associated resistors is going to upset the ISP programming.
Considering a mosfet gate is a high input impedance there is no cause for concern.
It's about as likely to interfere with the programming as it is for your car to roll uphill...
raschemmel:
Considering a mosfet gate is a high input impedance there is no cause for concern.
It's about as likely to interfere with the programming as it is for your car to roll uphill...
That's the sort of answer I was looking for when I first posted.
Considering a mosfet gate is a high input impedance there is no cause for concern.
It's about as likely to interfere with the programming as it is for your car to roll uphill...
That's the sort of answer I was looking for when I first posted.
It's really the kind of answer you only get from a wiseguy.. ;D
For the record, I'm using an AVRISP MKII for the upload. I assume the result would be similar with other devices
It would if you were using the same pins, the same program and the same sketch ? (actually , the sketch is irrelevant) . Does the light turn on the same when you use your left hand instead of your right ?