Hi. I ran a sketch on a Arduino Uno to drive a small motor and LED and it worked fine.
Uploaded it to a ATtiny85 and found that the GPIO outputs were in millivolts and not the 4.3 volts quoted in the data sheet so now won't run anything. The VCC is 5 volts. Any ideas please.
Thank you in advance.
Bob May
Always use a motor driver, a relay, or a transistor switch to control motors. The GPIO pins may not be used to power motors, nor should the 5V pin be used for that purpose.
No exceptions.
Thank you for the info, unfortunately there is not enough voltage to switch on a transistor. I will adhere to your advice though.
Bob May
That is extremely unlikely. If you want to solve that problem, post a schematic diagram of the circuit you tried (hand drawn is preferred).
It is quite possible you measured on the wrong pins, or configured it to wrong pins
Please show your code
If you are measuring the pin voltage with too large a current load connected, then you might see this low voltage since the pin is effectively shorted to ground. If you are looking at the open circuit output voltage, I would double-check the pin assignment and program. Digital write to an input pin will only manipulate the pull-up resistor and show up as a very teensie change in output voltage into even a very small load, for example.
The maximum pin current for an ATTiny is similar to that of an ATMEGA 328 and it should be able to source or sink loads of up to 25mA or so like some "logic level" relays and such.
I doubt that, unless you have wired something up incorrectly - please post a schematic or diagram of your setup.