View Full Version : Seven Segment Display
mlipham
08-31-2009, 12:08 PM
Hey,
I have the EK2500 eval kit from Synapse. I am migrating from the eval board to a prototype version. Basically, our prototype will have two large 7-segment displays. I am interested in how Syanpse got the two-digit display to work on the eval board. I am tracing the code back to a script called setSegments(segments). This is actually a built-in SNAPpy module in the RF modules. Does anyone know how I can get access to this? I would like to see the code in this module. From what I have read, the two-digit display on the eval board is controlled by only using two IO pins. This would be great if I could get our prototype to work this way.
Any help greatly appreciated,
Mark
kbanks
08-31-2009, 05:08 PM
We do not provide source code or hardware schematics for our products (we made an exception for the SN171 Proto Board because there is so little hardware on it).
Still, I agree it would be great if your (larger) seven-segment displays worked the same as the ones on the SN163 and SN111 boards. Here is how that external display hardware "looks" to the RFE.
Synapse "demo board" LED displays are controlled by 4 logical signals, multiplexed onto 2 physical pins (we have some very clever hardware designers).
CLK and ON/OFF control are both on RFE GPIO 13.
GPIO 13 low turns the display off, GPIO 13 high turns it on.
(You will sometimes see us writing GPIO 13 low before going to sleep in some of our example scripts, now you know why).
In addition, a low-going pulse (--_--) on this pin "clocks" a data bit into the external hardware.
DATA and DIGIT SELECT are on RFE GPIO 14.
GPIO_14 low selects the right-hand digit, high selects the left-hand digit.
(better check me on this).
Individual data bits are clocked in most significant bit first, with a low (0) corresponding to a LIT segment. (The setSegments() built-in normally takes care of inverting the requested values for you).
So, if you will connect external hardware that conforms to this hardware interface, you can continue to use the setSegments() built-in to drive your custom display.
If your script NEVER calls setSegments(), then the core firmware leaves these pins alone. This means you can experiment with these pins using standard setPinDir()/writePin() calls, in order to verify your understanding of the existing demo hardware.
Any help beyond what I just gave you (in this post) is probably within the scope of Custom Solutions work.
kbanks
11-24-2009, 02:58 PM
If you put your example code (I assume it is some form of PIC Basic) inside of [ c o d e ] ... [ / c o d e ] (but without the extra spaces, others will be able to read it easier.
Also, can you tell us a little about how the RF Engine then interfaced with the easypic3?
bcuming
06-09-2010, 10:58 AM
I need to add a 7 segment LED display too. Your comment "So, if you will connect external hardware that conforms to this hardware interface, you can continue to use the setSegments() built-in to drive your custom display" Can you give me an example which 7 segment product/part number will work?
Thanks
kbanks
06-09-2010, 05:46 PM
We do not provide source code or hardware schematics for our products...
So, re-read my functional description and then look at the 74AC299MTR shift register and the LDD_E302NI dual digit seven segment display.
If you need more detail than that, you will have to contact the Custom Solutions Group.
Also, if you look in the example scripts that come with version 2.4, there is now a SevenSegment.py example script (for platforms that do not support the setSegments() built-in.) This script should supplement the descriptions I gave in this thread.
Hi
I'm interested in using/adopting the method on eval board to implement two seven segment displays. However it is already apparent to me that i will not be able to use the built-in function since i'm using all 8 AD inputs in a forthcoming project. I'm still using platform 2.3.5 and am currently working on an existing project and do not want to disrupt this work, however does the SevenSegment.py example script mimick the built-in function so that i may be able to re-assign to more convenient GPIOs?
If so, is this script more or less equivalent in its use of cpu time as the buit-in script?
thanks
e
Jheath
03-10-2011, 09:50 AM
The original setSegments function is in fact a built-in for most (not all) platforms.
Due to memory size restrictions this functionality was moved to a separate sevenSegment.py import file. This file will call the built-in SNAPpy function automatically for applicable platforms (ex. RF100). For all other platforms, the segment operation is manually executed within the "SetSegments" and "updateSevenSegmentDisplay" functions.
You should be able to use this to define your own pin configuration. However, the manual operation is much slower than the built-in function calls. Some 'flicker' might be seen on the display.
John Payson
08-01-2011, 02:37 PM
I'm interested in using/adopting the method on eval board to implement two seven segment displays
There are a variety of means by which one may use two I/O pins to control an arbitrary number of outputs with a small amount of external logic. I would suggest the easiest approach would probably be to use a non-multiplexed display, driven using a cascaded sequence of 74HC595 shift registers or some equivalent with current limiting built in. If the device has an external latch-enable pin, use one external latching chip (e.g. half of a 74HC74) to generate it.
Feed one GPIO pin to the rising-edge clock of the shift register chain and /RD of the 74HC74. Feed the other GPIO pin to the data-in of the shift register chain and CP of the 74HC74. Wire the async. set input of the 74HC74 high, and wire the D input to the /Q output. Wire the Q or /Q output of the 74HC74 to the latch-enable of the shift register chain.
The two GPIO pins should idle high. To shift a bit into the shifter chain, drive the first GPIO low, set the second high or low as appropriate, and then drive the first GPIO high. Once all bits are loaded, while the first GPIO is high, drive the second pin low (if it isn't already), then high, then low, then high. That will generate a momentary high pulse on the 74HC74's Q and a momentary low pulse on /Q.
This approach will allow any number of outputs to be controlled using two GPIO pins; if the LEDs aren't multiplexed, one will only need to shift out data when the display contents change.
vBulletin® v3.8.0, Copyright ©2000-2012, Jelsoft Enterprises Ltd.