PDA

View Full Version : display driver



Klaus
- 15th April 2008, 22:34
I was planning to use a 18F4550 to collect data from 24 bit counter/shiftregister and also enter data from keypad. I thought I could also use the additional I/O ports to drive 7 segment displays. However I want to provide the shift clock, counter gate and reset from the 4550. The counter gate is 1 second, so when all this is in a main program loop, I can't see how i can loop the display at the same time fast enough to refresh the display. I am not an experienced programmer and this is basically my first time trying to do something like this, so hopefully someone can give me some advice. I was thinking I could use a dedicated PIC just for the display, and go with a lesser processor than the 4550 for the other functions.
Klaus

mister_e
- 15th April 2008, 22:46
The main advantage of PIC over Stamp is their interrupt Feature, you can setup a background timer to refresh your display, scan your keypad while doing something else.

Do you have any schematic of your current design?

Klaus
- 15th April 2008, 23:06
File attached

mister_e
- 15th April 2008, 23:31
From what I feel, 74hct165 and 74hct404 could be removed the whole thing could be done in software. What's your "clock" signal looks like?

Timer interrupt to scan your keyboard and refresh your display... main loop to process your clock.

Klaus
- 15th April 2008, 23:35
It's a 6 MHz pulse. I'm displaying the change in frequency once per second. I did not think that the processor was fast enough to handle that.

mister_e
- 15th April 2008, 23:39
Oh yeah, so basically it's a kind of frequency counter? how much accuracy you need? What's the threshold (+/- 10Kz, +/- 1Mhz)?

Klaus
- 16th April 2008, 13:43
I'm looking for very small changes in frequency. As little as 20 Hz. This is why I have a 24 bit counter. The counter is updated once per second, and the new count is always subtracted from the base count. This device is intended to measure accumulated thickness of material deposited on a substrate. The crystal, which is located near the substrate, is also coated and thereby loaded with the material which causes the frequency to decrease. The change in frequency can be related to thickness of coating of the material based on density of material and other factors.

mister_e
- 17th April 2008, 22:16
So that's something an internal PIC counter can do without much problem (maybe some overflow handling or some prescaler thingy) ... but always possible. No real need for extra external counter.