Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

help my lcd project lmb16abd and 16f877a

Status
Not open for further replies.

Code C - [expand]
1
2
3
4
5
6
7
8
void main() {
TRISA = 0;
TRISB = 0;
LCD_init();
Lcd_Out(1, 1, "hello");
 
while(1);
}



Write while(1) at last
 

how can i add blinking led to the code
 

First find out why regulator is heating. What will you do with any code if there is no power to MCU. Is your LCD HD44780 or Compatible? If not your code will not work.
 

First find out why regulator is heating. What will you do with any code if there is no power to MCU. Is your LCD HD44780 or Compatible? If not your code will not work.

the heating problem is off its to gnd in the wrong place and vss.vdd of the pic\lcd\pot is on but it want say any thing even when i turn the pot both way to check still nothing the lcd is lmb162abc

- - - Updated - - -

can i just get help with getting leb blinking with the code
 

if led is connected to RD1 say, then


Code C - [expand]
1
2
3
4
5
6
7
void main(){
 
        while(1){
             PORTD.F1 = ~PORTD.F1;
             Delay_ms(1000);
       }
}



Maybe your LCD is not compatible with HD44780. Buy HD44780 or Compatible LCD and try.
 
Last edited:

i didn't know how to add this to my code
 

hey in post 13 said my lcd is 4bit but the pdf said it 8bit will you check for me page 7
**broken link removed**
and i wire the led with portd

Code:
sbit LCD_EN at RB0_bit;
sbit LCD_RS at RB1_bit;
sbit LCD_D4 at RB4_bit;
sbit LCD_D5 at RB5_bit;
sbit LCD_D6 at RB6_bit;
sbit LCD_D7 at RB7_bit;

sbit LCD_EN_Direction at TRISB0_bit;
sbit LCD_RS_Direction at TRISB1_bit;
sbit LCD_D4_Direction at TRISB4_bit;
sbit LCD_D5_Direction at TRISB5_bit;
sbit LCD_D6_Direction at TRISB6_bit;
sbit LCD_D7_Direction at TRISB7_bit;




void main() {

TRISA = 0;
TRISB = 0;
LCD_init();
Lcd_Out(1, 1, "hello");
while(1);
}
 

It supports both 8-bit ans 4-bit mode but mikroC PRO doesn't have 8-bit LCD Library. You gave to use 4-bit mode if you use mikroC PRO. You code is ok. If you want to blink LED then copy the while(1) block in my code and replay your while(1);. Replace line PORTD.F1 = ~PORTD.F1; with PORTD = ~PORTD; and TRISD = 0x00; before while(1) loop. Post a high resolution image of the LCD (both sides). Maybe the pinout of LCD doesn't match with HD44780 LCD type.

90488d1367598040-tw.jpg
 

Attachments

  • tw.jpg
    tw.jpg
    96.1 KB · Views: 59
Last edited:
  • Like
Reactions: hesho90

    hesho90

    Points: 2
    Helpful Answer Positive Rating
SAM_1937.JPG
Code:
sbit LCD_EN at RB0_bit;
sbit LCD_RS at RB1_bit;
sbit LCD_D4 at RB4_bit;
sbit LCD_D5 at RB5_bit;
sbit LCD_D6 at RB6_bit;
sbit LCD_D7 at RB7_bit;

sbit LCD_EN_Direction at TRISB0_bit;
sbit LCD_RS_Direction at TRISB1_bit;
sbit LCD_D4_Direction at TRISB4_bit;
sbit LCD_D5_Direction at TRISB5_bit;
sbit LCD_D6_Direction at TRISB6_bit;
sbit LCD_D7_Direction at TRISB7_bit;




void main() {


TRISB = 0;
TRISD = 0x00;
LCD_init();
Lcd_Out(1, 1, "hello");

while(1);
PORTD = ~PORTD;
Delay_ms(1000);
}

will you check my code
 
Last edited:

Also, if the green/yellow components are LEDs, do they have series resistor to limit their current? They might account for the excessive current and hot regulator. You MUST add decoupling capacitors as well.

Brian.
 

i fixed the wires and the plugged it in black Squares show then Disappears the led just to show if there is power and it was then i take them out the the hot problem is off
 

its is 4mhz do i wire the rw with the vss or the breadboard gnd and the pot -/+ with the lcd vss/vdd or the board one
 

i did thast still the same problem

will you look at this if you can
 

The lcd is H44780 compatible since the display commands on the datasheet are the same as all H44780 controller

SAM_1946.JPG

how do i know if it need a controller or not
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top