Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Pure VPN - Up to 27 Months
vgp
Updated:
Friday at 8:10 AM
එක පැකේජ් එකයි මාසෙටම Unlimited Internet. තාමත් DATA CARD දාන්න සල්ලි වියදම් කරනවද? අඩුම මිලට අපෙන්.
sayuru bandara
Updated:
Tuesday at 12:30 PM
Ad icon
ඉන්ටර්නෙට් එකෙන් හරියටම සල්ලි හොයන්න සහ Success වෙන්න කැමතිද? 🚀 (E-Money & Success Stories)
siri sumana
Updated:
May 30, 2026
Gemini AI PRO 18 months Offer
Hawaka
Updated:
May 27, 2026
Ad icon
koko account
DasunEranga
Updated:
May 27, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
Education
Microcontroller Programming with MikroC PRO for PIC
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="Little DJ" data-source="post: 10919962" data-attributes="member: 320663"><p><strong>16x2 LCD with 16F877A</strong></p><p></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px">In this exercise lets look at how can we interface a LCD display with 16F877A PIC microcontroller. </span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px">The mikroC PRO for PIC provides a library for communication with LCDs (with HD44780 compliant controllers) through the 4-bit interface. </span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px"><strong>HD44780 Pinout</strong></span></p><p><span style="font-size: 15px"></span></p><ol> <li data-xf-list-type="ol"><span style="font-size: 15px">Vss (Ground)</span></li> <li data-xf-list-type="ol"><span style="font-size: 15px">VCC (5V)</span></li> <li data-xf-list-type="ol"><span style="font-size: 15px">Contrast (use a potentiometer for variable contrast, or just connect to GND)</span></li> <li data-xf-list-type="ol"><span style="font-size: 15px">Register Select (RS), 0 = command write, 1 = data write</span></li> <li data-xf-list-type="ol"><span style="font-size: 15px">Read/Write (R/W), 0 = write to display, 1 = read from display</span></li> <li data-xf-list-type="ol"><span style="font-size: 15px">Enable (EN) - used to clock in data</span></li> <li data-xf-list-type="ol"><span style="font-size: 15px">DB0 (not used in 4-bit mode) - LSb</span></li> <li data-xf-list-type="ol"><span style="font-size: 15px">DB1 (not used in 4-bit mode)</span></li> <li data-xf-list-type="ol"><span style="font-size: 15px">DB2 (not used in 4-bit mode)</span></li> <li data-xf-list-type="ol"><span style="font-size: 15px">DB3 (not used in 4-bit mode)</span></li> <li data-xf-list-type="ol"><span style="font-size: 15px">DB4 - LSb in 4-bit mode</span></li> <li data-xf-list-type="ol"><span style="font-size: 15px">DB5</span></li> <li data-xf-list-type="ol"><span style="font-size: 15px">DB6</span></li> <li data-xf-list-type="ol"><span style="font-size: 15px">DB7 - MSb</span></li> <li data-xf-list-type="ol"><span style="font-size: 15px">Backlight + (5V)</span></li> <li data-xf-list-type="ol"><span style="font-size: 15px">Backlight - (GND)</span></li> </ol><p></p><p><span style="font-size: 15px"><strong>4-bit and 8-bit modes</strong></span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px">An HD44780 LCD can be operated in two different modes: 4-bit mode and 8-bit mode. In 8-bit mode, pins 7-14 of the LCD are connected to eight I/O pins on the microcontroller; while in 4-bit mode, pins 11-14 on the LCD are connected to four I/O pins on the microcontroller. The advantage to operating in 8-bit mode is that the programming is a bit simpler and data can be updated more quickly. The obvious reason to operate in 4-bit mode is to save four I/O pins on the PIC microcontroller.</span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px"><strong>Circuit Diagram for 16x2 LCD</strong></span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px"><img src="http://3.bp.blogspot.com/-U9vx0OlVPfA/TmEYjmH3mqI/AAAAAAAAAIo/24C00WT6n3Q/s1600/16x2+LCD.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px"><strong>Complete Circuit Diagram with PIC Microcontroller</strong></span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px"><img src="http://4.bp.blogspot.com/-52hKTA-k1dE/TmEZKNHPFOI/AAAAAAAAAIs/J03gVXK9_D0/s1600/16x2+LCD.JPG" alt="" class="fr-fic fr-dii fr-draggable " style="" /></span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px"> </span></p><p><span style="font-size: 15px"><strong> To get MikroC Code & PROTUES Design:</strong> <a href="http://www.electronicworkspace.com/2011/09/16x2-lcd-with-16f877a.html" target="_blank"><strong>Click Here</strong></a></span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px"></span></p></blockquote><p></p>
[QUOTE="Little DJ, post: 10919962, member: 320663"] [b]16x2 LCD with 16F877A[/b] [SIZE="4"] In this exercise lets look at how can we interface a LCD display with 16F877A PIC microcontroller. The mikroC PRO for PIC provides a library for communication with LCDs (with HD44780 compliant controllers) through the 4-bit interface. [B]HD44780 Pinout[/B] [LIST=1] [*]Vss (Ground) [*]VCC (5V) [*]Contrast (use a potentiometer for variable contrast, or just connect to GND) [*]Register Select (RS), 0 = command write, 1 = data write [*]Read/Write (R/W), 0 = write to display, 1 = read from display [*]Enable (EN) - used to clock in data [*]DB0 (not used in 4-bit mode) - LSb [*]DB1 (not used in 4-bit mode) [*]DB2 (not used in 4-bit mode) [*]DB3 (not used in 4-bit mode) [*]DB4 - LSb in 4-bit mode [*]DB5 [*]DB6 [*]DB7 - MSb [*]Backlight + (5V) [*]Backlight - (GND) [/LIST] [B]4-bit and 8-bit modes[/B] An HD44780 LCD can be operated in two different modes: 4-bit mode and 8-bit mode. In 8-bit mode, pins 7-14 of the LCD are connected to eight I/O pins on the microcontroller; while in 4-bit mode, pins 11-14 on the LCD are connected to four I/O pins on the microcontroller. The advantage to operating in 8-bit mode is that the programming is a bit simpler and data can be updated more quickly. The obvious reason to operate in 4-bit mode is to save four I/O pins on the PIC microcontroller. [B]Circuit Diagram for 16x2 LCD[/B] [IMG]http://3.bp.blogspot.com/-U9vx0OlVPfA/TmEYjmH3mqI/AAAAAAAAAIo/24C00WT6n3Q/s1600/16x2+LCD.png[/IMG] [B]Complete Circuit Diagram with PIC Microcontroller[/B] [IMG]http://4.bp.blogspot.com/-52hKTA-k1dE/TmEZKNHPFOI/AAAAAAAAAIs/J03gVXK9_D0/s1600/16x2+LCD.JPG[/IMG] [B] To get MikroC Code & PROTUES Design:[/B] [URL="http://www.electronicworkspace.com/2011/09/16x2-lcd-with-16f877a.html"][B]Click Here[/B][/URL] [/SIZE] [/QUOTE]
Insert quotes…
Verification
Asuwa dahayen wadi kalama keeyada?
Post reply
Top
Bottom