Maker Pro
Maker Pro

Need Some Help Figuring Out How to Use the PDSP2112

Supercap2F

Mar 22, 2014
550
Joined
Mar 22, 2014
Messages
550
Hello Everyone!! :)

Well I hacked some PDSP2112 8 digit displays out of some food equipment. And I was lucky enough to find the data sheet for them quite quickly after some googling. Here it is.

Now, it looks like all I need to do is put a binary value on the pins D0-D7 that selects the letter I want it to display. Then I should put another binary value on pins A0-A3 that selects what digit I want it to be displayed on. Then it looks like I need to load that info to the display by changing WR bar from high to low. But I don't know what to do with the rest of the pins, nor do I know what timing all this should happen in. And I don't even know if that is the way it operates.

I wonder if anyone would be willing give an in-depth explanation on how these thingys work? It might even be kind of cool if they made it into a resource!

But if know one has the time or the want-to to do it then that's fine... I just thought it might be kind of cool to be able to use these in some projects. :)

Also, If there are any resources that you know of on the internet that have a good explanation of how to use this type of display, then could you post a link to it?

Thanks very much for your time!! :)
Dan
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Pages 10 & 11 probably summarizes it the best.

The important thing to do is to set up the data and address pins before doing anything with the control signals. Page 4 gives you the timings for the various setup and hold times. Other than clear, the longest time is 0.3μs (clear takes 3μs).

Note that there's an error on the line "digit 6" where all the numbers should be one to the right!

Even if you wait a minimum of 3μs between each state, you'll be able to update the display fast enough for almost any purpose.

As an example (wait == wait 0.3μs)

set all pins to 0 (except CE, WR, FL, and RST set to 1) -- a do-nothing state
wait -- allow the state to be registered
set RST to 0 -- start the "clear process
wait 3μs
set RST to 1 - disable the reset pin
wait 3μs -- maximum wait for reset to be effective
set CE to 0 -- get access to display
set address pins for digit 1 -- we want digit 1
set data pins for character H -- we want the character H
wait -- let this get set up
set WR to 0 -- tell the display to place H at position 1
wait -- wait for it
set WR to 1 -- turn off the write enable
wait -- wait for it to register properly
set address pins for digit 2 -- now continue for digit 2
set data pins for character e
wait
set WR to 0
wait
set WR to 1
wait
set address pins for digit 3 -- and digit 3
set data pins for character l
wait
set WR to 0
wait
set WR to 1
wait
set address pins for digit 4 -- and so on.
set data pins for character o
wait
set WR to 0
wait
set WR to 1
wait
set address pins for digit 5
set data pins for character !
wait
set WR to 0
wait
set WR to 1
wait

By the way -- excellent luck on finding the datasheet. These would be useless without it!

You could also check to see if there's a library for driving this display. If it's common enough, maybe someone has already written some code to make it easier for you.
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
It looks like it's designed to connect directly onto the address, data and control buses of a CPU. This is the internal bus structure used inside a microcontroller to communicate between the different parts - the processor core, the RAM, the ROM, the peripherals and anything else that can be accessed directly within the memory or I/O space. This is the way things are done in systems where the address and data buses, and the control signals, were all interconnected between various ICs, rather than fully contained within a single IC.

If you want to drive it from a microcontroller, you will need to provide a steady 4-bit value on the address bus, a steady 8-bit value on the address bus (if you are writing to it), and some other control signals, then perform the read or write access by arranging to have -RD or -WR low simultaneously with -CS low.

You may also need to provide appropriate levels on the other pins; some of them may be able to be connected permanently high or low, and some may need to be driven by the micro.
 

Supercap2F

Mar 22, 2014
550
Joined
Mar 22, 2014
Messages
550
Wow thanks Guys!! I really didn't think anyone would take the time to explain it!

Well unfortunately I still have not finished learning C, so I can't use a PIC yet. I'll have to use a PICAXE - *gasp*! The PICAXE at max can only have a 2.7μs pause period. And you have to increment it in 2.7μs pauses (i.e. you can only have a pause 2.7μs long, 5.4μs long, 8.1μs long etc). So does the 0.3μs pause have to be 0.3μs? Or can I make it higher, like 2.7μs for the 0.3μs pause, and 5.4μs for the 3μs pause?

If the pauses do have to be just about 0.3μs and 3μs I guess I will have to give up trying to drive this display until I learn how to use PICs.

I hope that made some kind of sense! :)
Dan
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
The pauses are specified as a minimum, they can always be higher.

You will not lose much speed by just pausing 5.4uS for each operation. Once set up it could do a character every 10.8 uSec + the time to move the data, say 4 more uS, so say 14.8uS per character or 67567 characters per second. Faster than I can read!

Bob
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
The display needs at least 12 control signals. You may find it's cleaner to send the data using one or two shift registers, e.g. 74HC595s. These can be cascaded. The interface between the PICAXE and the shift registers is called SPI - serial peripheral interface - and is widely used. It requires only three pins on the PICAXE - serial data (also called MOSI - Master Out Slave In), serial clock, and latch clock.

It's quite a lot slower than direct parallel I/O, because you have to send the data one bit at a time, but it saves pins, and is expandable, so it's good if you need to drive lots of signals and timing isn't critical. And for a display, it won't be.

The PICAXE may include SPI capabilities. Some PICs have an SPI peripheral built in, which can transfer data quite quickly, but if not, the PICAXE system may have built-in functions to "bit-bang" the I/O pins.
 

Supercap2F

Mar 22, 2014
550
Joined
Mar 22, 2014
Messages
550
OK, thats great news for me!! I'll have a look at some shift registers in the next couple of days and see what I can find out. I will report back here if I get it working or if I have any more questions. :)

Thanks again for your time Guys! I understand this a whole lot better now! :)
Dan
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Cool :)

Not sure if I made this clear or not, but you should drive at least one pin of the display from a directly controllable pin on the PIC. Probably the -CS signal. Then you set up the address, data, -WR, and any other signals you need, using the shift register chain, and pulse -CS low then back high again.
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Yeah, sorry, -CE. Chip Enable, Chip Select, whatever :)

And when there's no way to draw an overbar, I use a "-" prefix to indicate active low. There are other conventions - initial or trailing backslash, initial or trailing asterisk, "n" prefix, "-bar" suffix, ...
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
This particular display has a number of control pins. I'm not sure that the CE pin is appropriate.

The datasheet indicates a Tds being the time the data must be valid before the WE pin is asserted. It is listed as 50ns. I'm not sure that setting all the pins (including WE) and then strobing CE is a good idea.

For simple stuff, CE could remain permanently asserted and WE could be the pin hard wired to the microcontroller. (for more complex arrangements (especially where you are controlling multiple displays you might have (say) 4 different outputs of your shift register dedicated to CE for each of 4 displays. All the other pins (including WE) are connected in parallel. That way the data you shift into the register both sets up the data *and* enables the correct display(s).

However, the 74HC595 sets all the bits at once, so you don't see the bits shifting along (unless you operate it that way). Whilst it may be a little slower, you could write all 12 bits three times. One with WE not asserted, then asserted, then not asserted. This will probably take long enough that you may not need a further delay (on a picaxe).
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
The datasheet indicates a Tds being the time the data must be valid before the WE pin is asserted. It is listed as 50ns. I'm not sure that setting all the pins (including WE) and then strobing CE is a good idea.
Right. I agree.
For simple stuff, CE could remain permanently asserted and WE could be the pin hard wired to the microcontroller. (for more complex arrangements (especially where you are controlling multiple displays you might have (say) 4 different outputs of your shift register dedicated to CE for each of 4 displays. All the other pins (including WE) are connected in parallel. That way the data you shift into the register both sets up the data *and* enables the correct display(s).
Yes, good. It makes more sense to drive the -CS pin(s) from the shift register (or just tie it low if there's only one display) and drive -WR directly.
However, the 74HC595 sets all the bits at once, so you don't see the bits shifting along (unless you operate it that way). Whilst it may be a little slower, you could write all 12 bits three times. One with WE not asserted, then asserted, then not asserted. This will probably take long enough that you may not need a further delay (on a picaxe).
That's what I wanted to avoid, because of the time taken to send three words to the shift registers. It will certainly be slow enough, especially if bit-banging is used.

Actually, probably just two words would be needed - one with all the pin states, with -WR low, then one with everything the same except -WR would be high. AFAIK the display will load the data on the rising edge of -WR, right?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
AFAIK the display will load the data on the rising edge of -WR, right?

The summary on page 10 and 11 make it look level sensitive and the fact that the address pins need to be set up before WE is asserted (Tas) and held after is is de-asserted (Tah) tend to confirm this (See the Write cycle timing diagram on page 4).

It is possible it still *could* be edge sensitive, but I wouldn't want to rely on it. It could be sensitive to either edge anyway!

And as a note to readers. I'm just assuming that you will read the datasheet and note that when I say WE I mean WE-bar or WE-1 or -WE or WE'. And because it is inverted logic, "asserted" means 0 and de-asserted means 1. Kris is a lot more polite and thoughtful than I am :)

It will certainly be slow enough, especially if bit-banging is used.

Yeah, for all but the clear function I would assume you would be correct. Of course if you had a fast uC and coded it in assembler you could prove us false I suspect.
 

Supercap2F

Mar 22, 2014
550
Joined
Mar 22, 2014
Messages
550
Well after some studying, here's what I came up with:
DISPLAY_10_13_14_#1.jpg

The shift registers are 4015s. I think that's how they should be hooked up, but I'm not 100% sure. Pin 7-9 in the PDSP2112s data sheet says "Substr. bias" where all the pins are defined (page 6). I'm assuming that that means leave them unconnected. o_O Also the -CLKSEL pin selects a internal or the external clock. I have it hooked up so that it selects the internal clock... Is that right?

If this configuration looks good to you guys, I will write up some code and finish the schematic.

Thanks again!!:):)
Dan
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Yeah, that's fine.

I would have used 74HC595's, but the difference in this case is not significant.

Yes, I would go for the internal clock. I believe that the external clock is required for things such as multiple displays where you want to synchronise the flashing of digits across all displays. With only one display that is moot.
 

Supercap2F

Mar 22, 2014
550
Joined
Mar 22, 2014
Messages
550
The reason I picked the 4015 is because I have a book that explains how a bunch of CMOS IC chips work, and they didn't have the 74HC595 listed in there... But now looking back, I think it would be better to use the 74HC595 because they go for 12¢ cheeper on ebay then the 4015 does! :p

I will have a look-see at the data sheet for the 74HC595 tomorrow, and try and redraw the schematic for it. :)
Dan
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
The 4015 is perfectly fine in this case. If you've got some, use them.

Note that 4000 series, whilst a little slower, (not that this will be a concern) are also tolerant of a wider supply voltage.

But sure, take a look at the 595 and decide for yourself which you want to use.

The main differences are:

  • Permissible power supply range
  • 2 x 4 bit vs. 1 x 8 bit
  • The 595 can freeze the outputs and transfer them all at once, the 4015 ripples them along.
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
You have -CE tied to VCC. That won't work at all, because it's active low! You MAY be able to tie it low, but that's not how the display is supposed to be used. If you look carefully at the timing diagrams in the data sheet you'll see how it is intended to be used. What will happen if -CE is held low? Will it work just fine? I don't know. You could try it and see.

I recommend that you prototype the whole thing up on breadboard, and initially, use direct I/O to drive -CE, and possibly -FL. Make sure you can get the display to do everything you want it to do. Make sure you can write the configuration word to it, and read the data sheet carefully to make sure you won't be making any useful feature unavailable by tying -FL high. Then see what happens with -CS tied permanently low. Check that it works when powered up in that state too.

Re the decision between 4015 and 74HC595. In this case it doesn't matter, because the address and data lines are ignored while -WR and -RD are high, so the data rippling through them doesn't matter. The 74HC595 also requires an extra "latch clock" signal, which you can avoid if you use 4015s. The 74HC595 is likely to remain available for longer than the 4015 I suspect.
 

Supercap2F

Mar 22, 2014
550
Joined
Mar 22, 2014
Messages
550
The 4015 is perfectly fine in this case. If you've got some, use them.
No, I don't have any 4015s. In fact I have very few CMOS chips. That's why I want to go with the cheapest chip..;)
You have -CE tied to VCC. That won't work at all, because it's active low! You MAY be able to tie it low, but that's not how the display is supposed to be used. If you look carefully at the timing diagrams in the data sheet you'll see how it is intended to be used. What will happen if -CE is held low? Will it work just fine? I don't know. You could try it and see.
Opps, missed that one! o_O
I recommend that you prototype the whole thing up on breadboard, and initially, use direct I/O to drive -CE, and possibly -FL. Make sure you can get the display to do everything you want it to do. Make sure you can write the configuration word to it, and read the data sheet carefully to make sure you won't be making any useful feature unavailable by tying -FL high. Then see what happens with -CS tied permanently low. Check that it works when powered up in that state too.
Yes, I usually wire up my projects on a breadboard before I do anything else. I think will drive most of the pins directly at first, and then see how many shortcuts I can take, like you said. :)

Here's the updated schematic:
DISPLAY_SCHEMATIC_10_15_14_#2.jpg
If it looks OK to you guys, I will write up some code.:)

Thanks again Guys!!
Dan
 
Last edited:
Top