led-stat LED meter / parallel port?

led-stat LED meter / parallel port?

Post by Benjamin Alm » Fri, 03 Feb 1995 01:12:19



the led-stat.txt file and 'meter' program are quite wonderful! nice job,
people! I got it off of sunsite recently.. it works great.. For those who
don't know what it is, it takes the current CPU load and according to
that, outputs a certain bitmapped pattern through the parallel port to a
little LED-meter that the user makes.. and it basically displays a CPU
usage bargraph that you can mount on your PC case or so... it's neat...

i have a question.. is there any way the parallel port can output more than
1 byte of data simultaneously? or just those 8 bits? I don't know a great
deal about the PC's hardware system, but I'd like to 'enhance' the meter for
my pc... :) Thanks!

I've thought about getting a LCD display or something with a builtin
chipset to display more complex stuff, but i really can't afford one...

--
     _______       _____
H  `/       \_____/  ___)'   From: Ben Alman       [][][] []  [] [][][] []

H A  :IE]==|===|=================================] []     []  [] [][][] [][][]
N C  :IE]==|===|=================================] []     []  []     [] []  []
E K / ,. Ooo _____  \_    Running Linux 1.1.81     []     [][][] [][][] []  []
R  '\_______/     \___)      and XFree86-3.1       Why Are We Here? Because...

 
 
 

led-stat LED meter / parallel port?

Post by Pixelate » Fri, 03 Feb 1995 10:47:06




>Secondly.. If you want an LCD like I have, a non-backlit 40x2 display
>runs about $13 .. My backlit 40x2 cost $25.  I'll give you the device
>driver code I wrote, if you want it.

Actually, this sounds interesting.  Any chance of, say, uploading
this somewhere?

[ ...pardon me while I extend the post so I have more lines of new text.
[ "Sea Colon Backslash Son in law?  You have a son-in-law file?"
--
Richard Cooley Extraordinaire           "Yeah.  Arrgh."


"It seems I've found myself on a voyage of the damned." The Doctor

 
 
 

led-stat LED meter / parallel port?

Post by Steve Richards » Fri, 03 Feb 1995 10:01:08


   i have a question.. is there any way the parallel port can output more than
   1 byte of data simultaneously? or just those 8 bits? I don't know a great
   deal about the PC's hardware system, but I'd like to 'enhance' the meter for
   my pc... :) Thanks!

   I've thought about getting a LCD display or something with a builtin
   chipset to display more complex stuff, but i really can't afford one...

First part:  Yes, you can demux the port .. it only takes a few IC's.
You don't really need to have all of the bits on at the same time,
though, since this is just a display.  You can do what is done in
industry a lot in alarm clocks, etc, and that is to multiplex the
segments.  For instance, you could use one output bit, and 4 address
bits, and if you write a sufficiently fast routine, you can give the
illusion of having 16 LEDs lit or unlit.. You just flip through each
address, setting the output bit accordingly, very quickly.  This is a
trivial task, both in hardware and software.  Actually, now that I
think of it, you could do it with some latches, too.. Which'd reduce
the needs on the software end..

Secondly.. If you want an LCD like I have, a non-backlit 40x2 display
runs about $13 .. My backlit 40x2 cost $25.  I'll give you the device
driver code I wrote, if you want it.

Either way, it's easy to do.

Steve.
--

  Worcester Polytechnic Institute - Electrical and Computer Engineering '97
   WPI CS department hardware repair/maintenance/installation/sales person
 Linux hacker, musician, LnL'er, SFS Secretary, coffee *, MST3K fan, gweep

 
 
 

led-stat LED meter / parallel port?

Post by Brian La » Sat, 04 Feb 1995 05:33:08



:    i have a question.. is there any way the parallel port can output more than
:    1 byte of data simultaneously? or just those 8 bits? I don't know a great
:    deal about the PC's hardware system, but I'd like to 'enhance' the meter for
:    my pc... :) Thanks!

:    I've thought about getting a LCD display or something with a builtin
:    chipset to display more complex stuff, but i really can't afford one...

: Secondly.. If you want an LCD like I have, a non-backlit 40x2 display
: runs about $13 .. My backlit 40x2 cost $25.  I'll give you the device
: driver code I wrote, if you want it.

: Either way, it's easy to do.

  I'd be interested in seein gyour device driver code. I have a daemon
that runs in the background displaying the loadaverage, date/time and
memory usage on a 16x2 LCD hooked to the parallel port.

    Brian

--
------------------------------------------------------------------------------
 "Everyone is a prisoner holding their own key." | Chaos Labs (360)569-2911
  http://nyx10.cs.du.edu:8001/~blane/home.html   |   Electronics/uP files
------------------------------------------------------------------------------

 
 
 

led-stat LED meter / parallel port?

Post by Mark Smi » Sat, 11 Feb 1995 18:09:10


: You can't output more than one byte simultameously on a parallel port.
: However, it wouldn't be too diffucult to create a demuxing circuit with
: two latch chips and a flip-flop.  I'm not sure exactly how it would be
: wired off-hand, but basically STROBE toggles the flip-flop to determine
: which latch receives the next byte from the computer.  If you want to
: get fancy, you can use the RESET line to resyncronize by having it set
: or reset the flip-flop.  All the software has to do then is output the
: two bytes.  Byte order is basically determined by how you set you
: latches to receive.  Effectivly, you have 16 bits to do with as you
: please.

  I would think that using, say 2 or three bits of the output byte
as an address would work great.  Use, say bits 0 and 1 as an address
decode, and route the other 6 bits to the latches.. You'd only be
using 6 of the bits of each latch, but you'd get an effective of
24 bits and you wouldn't have to worry about the flip-flop sync
and all that stuff with the reset line..

        Of course if you REALLY wanted to get fancy, you could combine
both of these ideas and use the flip-flop thing to select the first
byte as the address, and the second byte as the data..
        But what in TARNATIONS would one do with 2048 leds..  :)

--
        Mark Smith
        PolyCat Support
        x1189

 
 
 

led-stat LED meter / parallel port?

Post by Damian Fra » Sun, 12 Feb 1995 00:01:58


: You can't output more than one byte simultameously on a parallel port.

This is not true.  There are also status lines that you can use.  I can't
recall offhand how many.

: However, it wouldn't be too diffucult to create a demuxing circuit with
: two latch chips and a flip-flop.  I'm not sure exactly how it would be
: wired off-hand, but basically STROBE toggles the flip-flop to determine
: which latch receives the next byte from the computer.  If you want to
: get fancy, you can use the RESET line to resyncronize by having it set
: or reset the flip-flop.  All the software has to do then is output the
: two bytes.  Byte order is basically determined by how you set you
: latches to receive.  Effectivly, you have 16 bits to do with as you
: please.

: Larger frames could be supported by adding more latches and control
: circuitry.

This _is_ true, and would work, if you have the experience required.

--
  ________________   _______________________________________________
 /  Damian Frank  \ / "The price of seeking to force our beliefs on \

|    WPI CS '97    | beliefs on us."        -- Mario Cuomo           |
 \________________/ \_______________________________________________/

 
 
 

led-stat LED meter / parallel port?

Post by Andrew Turnqui » Sat, 11 Feb 1995 10:13:46


: i have a question.. is there any way the parallel port can output more than
: 1 byte of data simultaneously? or just those 8 bits? I don't know a great
: deal about the PC's hardware system, but I'd like to 'enhance' the meter for
: my pc... :) Thanks!

You can't output more than one byte simultameously on a parallel port.
However, it wouldn't be too diffucult to create a demuxing circuit with
two latch chips and a flip-flop.  I'm not sure exactly how it would be
wired off-hand, but basically STROBE toggles the flip-flop to determine
which latch receives the next byte from the computer.  If you want to
get fancy, you can use the RESET line to resyncronize by having it set
or reset the flip-flop.  All the software has to do then is output the
two bytes.  Byte order is basically determined by how you set you
latches to receive.  Effectivly, you have 16 bits to do with as you
please.

Larger frames could be supported by adding more latches and control
circuitry.

        --Andy

--
| Andrew Turnquist         __| "If you think this sounds confusing you


| Finger me for PGP 2.3 public encryption key.

 
 
 

led-stat LED meter / parallel port?

Post by Holger Peters » Sun, 12 Feb 1995 17:04:47



>>        But what in TARNATIONS would one do with 2048 leds..  :)
>why, build a 64x64 grid and run life on it, of course!

[Nostalgie ON]
I still remember one very fast implementation of this Game. It
was written in 8080-Assembly by Ward Christensen (of XModem fame)
an ran on a memory-mapped 64*16 videoboard.
[Nostalgie OFF]

Holger

 
 
 

led-stat LED meter / parallel port?

Post by Randy Smi » Sun, 12 Feb 1995 21:41:01






>>: You can't output more than one byte simultameously on a parallel port.
>>: However, it wouldn't be too diffucult to create a demuxing circuit with
>>: two latch chips and a flip-flop.

>>  I would think that using, say 2 or three bits of the output byte
>>as an address would work great.  Use, say bits 0 and 1 as an address
>>decode, and route the other 6 bits to the latches..

>And then there are those Handshake-Line's...

>Connect the three lines to Adress-Input's of an 74#138, and the Strobe
>to one Enable of the '138. You'll be able to control 8 different 8-Bit
>Latches without too much hassle.

Remember that the '138 has inverted outputs, so you would need something
like `374 octal flip-flops or bus-decoded latches instead of straight '373
latches.

I've built a box that's something like that (with 3 74HC373s), and the
only problem I ran into was ringing and crosstalk on the parallel port
lines.  This is pretty easy to solve with 1k Ohm/.01uF low-pass filters
on the clock lines.  The data lines tend to take care of themselves after
you cool off the handshake lines.  You could probably get away with a
smaller cap if you want some speed (15kHz max for the above values).

Randy Smith

 
 
 

led-stat LED meter / parallel port?

Post by Michael Shiel » Sun, 12 Feb 1995 04:08:07




>    But what in TARNATIONS would one do with 2048 leds..  :)

You wouldn't -- you'd drive an alphanumeric LCD panel.
--
Shields.
 
 
 

led-stat LED meter / parallel port?

Post by cloister be » Sun, 12 Feb 1995 05:42:37




>: You can't output more than one byte simultameously on a parallel port.
>: However, it wouldn't be too diffucult to create a demuxing circuit with
>: two latch chips and a flip-flop.  I'm not sure exactly how it would be
>: wired off-hand, but basically STROBE toggles the flip-flop to determine
>: which latch receives the next byte from the computer.  If you want to
>: get fancy, you can use the RESET line to resyncronize by having it set
>: or reset the flip-flop.  All the software has to do then is output the
>: two bytes.  Byte order is basically determined by how you set you
>: latches to receive.  Effectivly, you have 16 bits to do with as you
>: please.
>  I would think that using, say 2 or three bits of the output byte
>as an address would work great.  Use, say bits 0 and 1 as an address
>decode, and route the other 6 bits to the latches.. You'd only be
>using 6 of the bits of each latch, but you'd get an effective of
>24 bits and you wouldn't have to worry about the flip-flop sync
>and all that stuff with the reset line..  
>    Of course if you REALLY wanted to get fancy, you could combine
>both of these ideas and use the flip-flop thing to select the first
>byte as the address, and the second byte as the data..
>    But what in TARNATIONS would one do with 2048 leds..  :)

why, build a 64x64 grid and run life on it, of course!
 
 
 

led-stat LED meter / parallel port?

Post by Holger Peters » Sun, 12 Feb 1995 05:56:25




>: You can't output more than one byte simultameously on a parallel port.
>: However, it wouldn't be too diffucult to create a demuxing circuit with
>: two latch chips and a flip-flop.
>  I would think that using, say 2 or three bits of the output byte
>as an address would work great.  Use, say bits 0 and 1 as an address
>decode, and route the other 6 bits to the latches..

And then there are those Handshake-Line's...

Connect the three lines to Adress-Input's of an 74#138, and the Strobe
to one Enable of the '138. You'll be able to control 8 different 8-Bit
Latches without too much hassle.

Quote:>    Mark Smith

Greetings, Holger
 
 
 

1. led-stat LED meter / load generator

I've build a LED meter. It works fine on my printer port and shows the
actual load on my linux machine. I wrote a little program to test the
meter with a predetermined load. This code generates the load specified
by command line parameter:

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>

double load;

void timer (sig)
int sig;

{
  unsigned long us = load * 1000;
  usleep (us);
  signal (SIGALRM, timer);
  alarm (1);

int main (argc, argv)
int argc;
char * argv[];

{
  if (argc>1) sscanf (argv[1], "%lf", &load);
  else for (;;);

  for (;load>1.0;load-=1.0)
    if (!fork()) for (;;);

  signal (SIGALRM, timer);
  alarm (1);

  for (load=1.0-load;;);
  return 0;

Please dont use the -O flag to optimize this code!

Gerald.

--
Name : Gerald Fiedler                 | Address: Reichenhainerstr. 51/303

URL  : http://www.tu-chemnitz.de/~gfi |          Germany
--
--
Name : Gerald Fiedler                 | Address: Reichenhainerstr. 51/303

URL  : http://www.tu-chemnitz.de/~gfi |          Germany

2. Install Linux first or NT40 first??

3. LED is C32 then blank, no signal both in monitor and LED

4. Is it possible for a file has different names under different shells

5. My LED meter v0.1 (src included)

6. Simple remaining of frog3 CIA

7. My LED performance meter thing...

8. symbolic link loop

9. LED meter v0.2 available on sunsite

10. LED meter

11. LED meter v0.2 available on sunsite

12. Hi, I have installed Slack 3.3 ( Pentium 133 ,chipset Triton VX ,EIDE ); after the login the hard disk's led remain on ( the led is led on

13. Parallel laplink abuse leads to death of kernel secondary timer