Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

74LS174 2-wire LCD interface

Status
Not open for further replies.
Wonder if you can supply VRef- with a negative voltage?

I've used both a 4.096V and 2.5V Vref+ and LM34/35 with great success.
Reference Voltage Low - Minimum AVSS - 0.3V

I've switched this thing back to the 3.125V setting from the comparator voltage reference module, which actually gives me 3.113V. Still works fine. Having some odd problems with my math though. I calculate it on paper and it's perfect. The program does the same thing and I get incorrect results. It's something about how C does the math. I'm putting in debug LCD printouts at each step, trying to see where it screws up so I can compensate or do it a different way.
 
I added a post earlier mentioning a method I found in one of the 74HC595 data sheets for combining the SCLK and RCLK signals to effectively produce a 2 pin interface but then I deleted the post because I couldn't find the method in either of the two data sheets I have on my hard drive and I realized that you would still need an 'E' line in addition to the '595 SCLK and RCLK lines. Sorry!

The method was to drive SCLK from your PIC with a small RC delay to the RCLK pin (a 100 ohm resistor between the pins and a 200nf cap' on the RCLK pin). This method keeps the serial data in sync' so you won't be one data bit behind as you would be if you tied SCLK and RCLK directly together.

Mike
 
Last edited:
Futz,

Your **broken link removed** keeps getting better and better. The PWM backlight brightness control you added is cool.

I'm trying to duplicate the functionality of your 16F88 / 74LS174 LCD demo' as much as possible using an 8 pin PIC as the host and I wonder if you think my method for driving and reading a switch matrix would work? (the swx label is defined as input gpio.3)

Mike

Code:
void lcd_buttons()              // read LCD switch matrix
{ char i;
  SwData = 0;                   // clear 'live' sw data var'
  data = 0;                     //
  for(i=0; i<6; i++)            // clock out six '0' bits
  { clock = 1; clock = 0;       // to clear the '174
  }
  data = 1;                     //
  clock = 1; clock = 0;         // col 0, '00001' (Q5..Q1)
  data = 0;                     //
  if(swx == 1)                  //
    SwData |= 0b00000001;       //
  clock = 1; clock = 0;         // col 1, '00010'
  if(swx == 1)                  //
    SwData |= 0b00000010;       //
  clock = 1; clock = 0;         // col 2, '00100'
  if(swx == 1)                  //
    SwData |= 0b00000100;       //
  clock = 1; clock = 0;         // col 3, '01000'
  if(swx == 1)                  //
    SwData |= 0b00001000;       //
  clock = 1; clock = 0;         // col 4, '10000'
  if(swx == 1)                  //
    SwData |= 0b00010000;       //
}
 

Attachments

  • 174 Clock.PNG
    174 Clock.PNG
    45.6 KB · Views: 388
Last edited:
Your **broken link removed** keeps getting better and better. The PWM backlight brightness control you added is cool.
If you liked that, you're going to really like my new **broken link removed**. :D I'm at day 2 and have the LCD working, but nothing else yet.

I'm trying to duplicate the functionality of your 16F88 / 74LS174 LCD demo' as much as possible using an 8 pin PIC as the host and I wonder if you think my method for driving and reading a switch matrix would work? (the swx label is defined as input gpio.3)
That's a cool idea! Have you tested it yet? I'd have to spend some time thinking about it before I could say whether I think it'll work. But I've been busy cutting, stripping, counting pins, soldering...
 
If you liked that, you're going to really like my new **broken link removed**. :D I'm at day 2 and have the LCD working, but nothing else yet.
It looks very nice and so does that prototype board with SOIC part spacing.

That's a cool idea! Have you tested it yet? I'd have to spend some time thinking about it before I could say whether I think it'll work. But I've been busy cutting, stripping, counting pins, soldering...
No I haven't tested it yet. I don't have a 74LS174 or a 74HC164 in my parts inventory so I'm just experimenting with BoostC code at this point.

Mike
 
LCD display problem

Hi Mike

I am very much enspired for 2-wire LCD interfacing & chosen the same for my LCD display application. Same 74LS174 i am using for displaying on LCD.

I am using HY-1602H-803 LCD from Shenzhen AV displays. I am facing two problems-

1. When i use 32MHz bus freq i can display the string properly. Here problem is for first line i have to give LCD_cmd(0x01) rather than 0x80 & second line is not get initialised? even cursor is not coming on second line, can u pls help me!!

2. When i changed bus clk freq from 32MHz to 8MHz, my LCD displays specific characters only like D,P to Z (in small & capital too) and 0 to 9 numbers. other than these characters printing gives some garbage display on LCD.

pls help me for above queries..

Regards,
Supri
 
Hi Futz

I am very much enspired for 2-wire LCD interfacing & chosen the same for my LCD display application. Same 74LS174 i am using for displaying on LCD.

I am using HY-1602H-803 LCD from Shenzhen AV displays. I am facing two problems-

1. When i use 32MHz bus freq i can display the string properly. Here problem is for first line i have to give LCD_cmd(0x01) rather than 0x80 & second line is not get initialised? even cursor is not coming on second line, can u pls help me!!

2. When i changed bus clk freq from 32MHz to 8MHz, my LCD displays specific characters only like D,P to Z (in small & capital too) and 0 to 9 numbers. other than these characters printing gives some garbage display on LCD.

pls help me for above queries..

Regards,
Supri
 
Sounds like a timing issue. First of all make sure your code can control the LCD directly...that is, in parallel..to make sure you are sending all the correct commands in the correct order. Then I would slow the bus down even further. 8MHz still sounds a little too high for an LS part....and if this is on a breadboard, the parasitic capcitance could ruin the rise/fall times, slewing the clock/data.

Blueteeth
 
Actually LCD works well with 32MHz. No problem with characters. But the same init, command functions are running. But print string is not working as i told some characters are not displaying properly.

Also i stuck for second line...will u give some suggestions for trying to solve it..??
 
By the way, i like this 2 wire LCD interface with the buttons, nice job. congratulations to author!
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top