First You have to write a programm with an Compiler AVR GCC, BASCOM an so on.
When that Programm is compiled You get an .hex File that can be taken into the Attiny.
To activate the A/D Converter You have to set some Registers with the wished parameters.
The Attiny has only one A/D Converters with an additional input selector.
So You have to set the input Selector to ADC3 and then make a Conversation of the A/D Converter.
No You have to calculate the current Voltage from the A/D Result and translate them into ASCII signs.
When I'm right the attiny 85 has no Hardware USART's, so You have to use an Software USART.
That's a little programm that generates the serial RS232 Signals.
Some bigger Controllers has an internal Hardware USART that make the generation of serial signals quite easy.
When using a USART I would suggest You to use an external Clock Source ( e. g. Crystal ) to avoid trouble.
The used Registers and there setting You can take from the Datasheet of the Controller.
The calculation of the Voltage depends of the Used Reference an is descibed in the Datasheet.
An Software USART You have to include from an Source in the Internet.
I think BASCOM has one integrated, but I'm not a BASCOM Guy.
Thank you - I've finally got around to programming my ATTINY85 and I did it with my raspberry pi from the GPIO pins with a simple circuit I found here -
https://www.instructables.com/id/Programming-the-ATtiny85-from-Raspberry-Pi/?ALLSTEPS
I uploaded the blink.c program to the attiny85 using the code in this tutorial and made all 5 pins on the pi go from high to low.
I have a few questions though and I'm not sure if I should open a new thread or what? Here is my circuit -
I'm powering this from a USB port on my computer. ( 5v 1A ?)
I measured the input voltage to my voltage regulator at 5v (**broken link removed**)
Why is the output voltage only about 3.6V ?
I'm only reading about 1.3V across each LED (**broken link removed**) does this mean they are drawing 384ma each? Why is the voltage 1.3V and not 5V?
I hooked the LED's to the voltage regulator as the + source and waited for the microcontroller ouput to go LOW for them to turn on - High is off - is this the preferred way to do this?
I know when I had all of my LEDs connected with no voltage regulator the USB port alone would not drive them - I had to install the voltage regulator before they would all blink (attiny85 brown out without voltage regulator?)
Edit: Update, I figured out I don't need the 5v regulator because it is being fed by USB power, and the 5v regulator I'm using requires voltage higher than 5v to work. Need some resistors in series with the LED's because they are being fed by 5v and it could fix my problem.
Edit @#2: - here is my updated circuit.
So I put two resistors in series because I didn't have a 300 Ohm resistor. I had some 100 Ohm 1% Resistors and 220 Ohm 1% resistors. I measured with my multimeter and the 100Ohm resistors were about 99Ohms and the 220 were about 218Ohms. I only had two 220Ohms resistors so my project is limited to 2 LED's for now. I wanted 3v to the led's so assuming they draw 10ma the formula would be 3/0.01 = 300Ohms of resistance needed.
I'm still only measuring about 1.1V across the LED's - and I don't understand why.
At the end of the resistors I'm measuring 3.3-3.9V (it's constantly moving up and down between those - is it because when my LEDs fire every 500ms the current changes so the voltage changes?)