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.

Your thoughts: port sharing 7seg display and LCD.

Status
Not open for further replies.

Blueteeth

Well-Known Member
Hi,

I'm designing a PIC devlopment board (again) and want to have a 7 segment display with a standard character LCD. Nothing special there. The LCD will have its R/W pin tied to ground, forcing the data lines as permenant inputs, and the seven segment display (4 digits) is multiplexed.

THey aren't meant to be used at the same time,.. I have hidden the LED display under the LCD, which is pluggable, this saves precious board area.

The thing is, as I'm making this single sided, and cramming everything on a 160x100mm board, routing it without a mass of top jumper wires is proving difficult. What I've found to make things easier is if I connect the LCD data lines directly to the LED cathodes on the display. This means they are connected AFTER the LED series resistor. I have provided a picture.

Now, assuming we don't turn on any of the 7seg displays transistor drivers, no current can flow through the LED's, the display is off, and the LCD display will see normal logic levels. But when running the LED display.... n the off chance the 'user' plugs in an LCD, even though the LCD display won't be strobed (the E line is jumpered) its data lines will see 5v - LED vf.

That means, a logic 1 would appear as 5v, a logic 0 would be 5-2 = 3v. Obviously this isn't going to communicate with the LCD, but it isn't meant to beused at the same time anyway.

My question is (finally got there), would this possibly damage the LCD? or perhaps cause the inputs to draw any significant current? Or am I just being overly cautious?

Please note, this schem isn't finished. I am trying to make the whole board DIY friendly... so I am having to change the schematic 'on the fly' to make it easier to route.
 

Attachments

  • LEDvsLCD.png
    LEDvsLCD.png
    11.6 KB · Views: 208
ok, so I guess the above idea was a bit odd. I've gone back to the board and used some logic buffers (non inverting) as drivers, and a way of making PCB routing easier. I have one non tecnhical question for those who use development boards.

Would you like to have the option of running either the LCD display, or 7 segment LED display from SPI?

I am planning on the following scheme. It's overly complicated to design, but should make things relatively straight forward for the user to configure, allowing a versatile microcontroller board, where one isn't forced to use a single port for say the LCD or LED display, or have to use hundreds of jumper wires.

Essentially, I'm using a parallel buffer and a serial to parallel shift register, with their outputs tied. Using tristate output enable means one can select between the two outputs. This 8-bit output is connected to both the LCD and seven segment display, with the shift register 'load' tied to the E strobe of the LCD. Although its not finished it sohuld allow the following options with a couple of jumpers:

1) LCD in 4 bit mode, parallel on port B. 6 lines required.

2) LCD in 4 bit mode, serial via SPI (shift register). 3 lines required. (plus backlight control).

3) Seven segment display on port B. 8 lines required for A-DP, extra 3 lines for 'digital select' via a line decoder. Total: 11 lines. These digit select lines can be sockets requiring only 3 'wires' to be placed from selected IO to decoder.

4) Seven segment display on SPI. 3 lines required for A-DP, extra 3 lines for 'digital select' via a line decoder. total 6 lines.

Because my board is designed to take 8, 14, 18, 28 and 40 pin PIC's, I didn't want to hardwire the LCD/LED displays to port D, as this would mean one could only use them with 40 pin PIC's. With the above scheme, one could use either display with 18 and 28 pin PIC's too, AND have many IO's to spare. Also meaning one wouldn't have to wire up the displays using wires, or lots of dip switches. It would be possible to run the LCD from an 8 pin PIC, which is always handy for quick debugging and simple prototyping idea's.

Again, I realise this is horrendously complicated. But many dev boards seperate each 'module', requiring the user to use jumper wires for every line (6 for LCD, and 11 for the LED display) one might as well just breadboard it if its going to require a mass of wires on the board. Some devboards like the 'bigPIC4' use DIP switches. Handy, but they take up space, and generally, you'll have to flick several switches at a time for a certain configuration. It also means one doesn't always know what micro pins are connected to what, requiring the user to go check the paperwork every time its used.

The use of 'cheap' SMT logic chips, should make life a bit easier, whilst keeping the versatility of the dipswitch scheme. Meaning only a few jumpers are required for the user. Not only that but with the pinout of things like the 74HC541/573, it actually makes routing IO's easier. (less jumper wires for single sided boards).

All the above focuses on using either PORTB on any PIC, or SPI (either PORTC on 28/40 PIC's, or wire sockets for the custom pinouts on 18 PIC's). So it doesn't touch PORTA or D, leaving the analogue pin's free for analogue/general IO, and port D for extra switches/LED's.

Although this is just my own project, my own custom devboard, would anyone be interested in a advanced dev board? Seems I might be able to get pretty much everything thats on the bigPIC4 onto this, along with a solderless breadboard for custom circuits :) All on eurocard 160x100mm PCB, designed for DIY PCB makers. Another handy feature is, its stackable. The arduino made this idea popular its its been around for yonks, ala PC104.

Blueteeth
 
Last edited:
Boards are getting made up in a couple of weeks, I'll post pictures if anyone is interested
 
Hi Mike. Thanks for replying, as it reminded me I had this thread!

Well, once agian, work as calmed down, so I get to revisit the vast number of 'half done' projects I have on the go... its getting ridiculous, well into the high 40's. And, this thread was one of them.

Well, I abandoned the idea of the original schematic, instead directly connecting the multiplexed 7-seg display to a micro's port. As LED's are diodes, I can use a single jumper to disable the 'common anode drivers', effectively disconnecting them without affecting the port pins used as inputs. So... no boards.

What I *did* do was add a parallel and serial interface to the LCD. Again, with a single jumper, the LCD can be controlled either via SPI (74HC595), or parallel (74HC541). The reason for the parallel buffer was to isolate the parallel inputs from the shift registers outputs. Its all very complicatred so if you're interested I'll post a schem, bit effectively its a stupidly complicated design for a PIC dev board - made even more horrible by the limitation of single sided. But the initial design complicated as an effort to create a dev board that is 'easy to use' - so not hundreds of jumpers, just single ones for each funciton.

When I revisited the project, I found over 18 different versions in my eagle folder :( Seems I got a bit obsessed with trying new things, so I'm stucking with some decisions and reducing options. Because designing a PCB is jsut donkey work, but deciding what goes on the board, how it is connected to what micro socket (its for 8,14,18,28 and 40 pin pics) and where it goes is crippling.

I know you're a great PIC user Mike, so even though you probably have some very useful boards, if you're interested, I'm going all out forthis one. MikroElektronicka EASYPIC6 - in 160x100mm with a small breadboard :) (Plus USB, opamp gain stages, and aux shift registers).
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top