Please, do you have any suggestions as to how the (reading value) of the potentiometer could be displayed on the LCD (without I2C) with an ATtiny (without Arduino)? I'm not getting it from the circuit and the code below (photos).
I woud like to do its work on the Tinkercad.
Hi David, I liked your analogy with girlfriend, but my only option is Tiny85. Is it impossible to solve my problem with the Tiny 85?
Thank you your answer.
As this is just a simulation then you haven’t got a real problem, but a virtual one. That is the problem with simulators, they are limited. Unless some one has set you an assignment that can’t be done I don’t see why you want to do this?
Can you not just use a bit banaging I2C library in your software?
Even if you manage to squeeze 6 GPIO pins out of the ATtiny85 to drive the LCD, how are you going to read the potentiometer to display it's value on the screen? That will require a 7th pin.
You can probably find an I2C library for the ATTINY85 for a software implementation of I2C.
You can possibly use a shift register to drive the LCD but then be prepared for a deep dive into the HD44780's datasheet. (This is the controller on that LCD ).
I would be very interested to see how exactly this assignment of yours has been formulated to see what scope there is for ingenuity.
Another way to do this is with a shift register to give you up to eight outputs from two pins. But I don’t know if your emulator can cope with a shift register.
If you are not allowed an imaginary Tiny84 you could have an imaginary I2C backpack. Or an imaginary 74HC195 shift register backpack. Or several bits of imaginary electronics.
I can't think of any way to drive a regular HD44780 16x2 display with less than 6 GPIO pins. i.e. use Reset pin for GPIO.
When the HD44780 is inactive you could connect one of the GPIO pins to read the potentiometer.
However the potentiometer circuit might be upset during the active cycles of the LCD.
You would need some imaginary resistors if you attempt to share a GPIO pin's functionality.
Simulation of imaginary components is very dependent on whether the Simulator is a real program or whether it is imaginary too. "Tinkercad" does not sound very "real".
It is possible to drive a hd44780 LCD using only 1 Arduino pin with some clever circuitry.
There are few Arduino libraries out there that supported this, including NewLIquidCrystal.
In the NewLiquidCrystal library the LiquidCrystal_SR1W.h header file for the LiquidCrystal_SR1W i/o class describes the needed h/w circuit in an ascii art diagram.
There is also the option of using and lcd with an async serial backpack which would also only need a single Arduino pin.
single-wire shift register trick in Bill's link
...
All of them require external chips or external resistors, capacitors.
As far as I know, Proteus Simulator can simulate an I2C backpack. However I don't have a Proteus licence.
So it all comes down to what the rules are for external components. And "Tinkercad" capability.
Regarding software. Several Arduino libraries handle I2C backpacks seamlessly. The more esoteric options require some investigation. (2) is straightforward. The others have no recognised "standard Arduino LCD" protocol.
I think #3 (uart based backpack for LCD) is pretty straight forward as well and is simpler/easier than a SPI backpack as no library is needed.
There is also the 2 wire control using a shift register with a resistor and a diode.
It is pretty straight forward and there are quite a few libraries out there for it.