let’s say I want to display ‘1’, so I can do that by turning on segments ‘b’ and ‘c’ (you can also turn segments ‘f’ and ‘e’ on). To display ‘5’, I have to turn on ‘a’, ‘f’, ‘g’, ‘c’ and ‘d’ and so on.
That’s all you need to know for seven segment display. It’s very simple and used widely.
While assigning a pin as an input, always remember that we have to use Pull-up resistor. Pull-up resistor is just like a normal resistor, connected between the line (the input) and Vcc. So by default, it pulls the line high or you can say input is high (1).
VEE pin is connected to variable resistor for contrast adjustment.
RS pin is Register select and used to select data or command mode. RS=0 is command and RS=1 is DATA.
R/W pin is to read or write from LCD. select 1 to write, 0 to read.
EN pin is Enable.
Timing is very important part of a microcontroller programming. We certainly can not depend on delay functions because no matter how precise they are, they are not accurate. For eg- DHT11, a temperature sensor, works only if we give it specific pulses for specific amount of time(in microseconds and milliseconds).We will learn about it later in the blog. But for now we will use timer for controlling blinking of LED with different time interval.