Searching \ for 'led' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/displays.htm?key=led
Search entire site for: 'led'.

No exact or substring matches. trying for part
PICList Thread
'2.5 digit LED from Stamp?'
1995\07\16@031545 by David Baker

flavicon
face
It appears the Stamp List has died? I thought I would post here & see how
it goes - I guess the Stamp people are still here, anxiously awaiting the
Stamp II.

We have an LCD display at work which the person using says is too small for
him to see. It is an LCD display hooked to the serial output of a computer.
It displays the depth of some sensors that are put into the ground & has to
read a maximum of 19.9 metres to 0.1 metre accuracy.

I figure the easiest way around this would be to hook a Stamp into the
serial line, collect the numbers & power some big (2 inch) LED 7 segment
displays. I thought I would run it through here for comments first. I have
played with these devices a bit but haven't gotten too technical yet. Some
points that come to mind:

7 segments x 2.5 digits means 16 I/O pins + 1 for the RS-232. Is there any
easy way of using less pins? If not I guess I need a Stamp stretcher as
well.

Can I run a 7 seg display directly from the Stamp or stretcher? The spec
sheet I have says 20 or 25 mA per pin but only 40 or 50 mA total! This
doesn't sound like much. Anyone recommend some good buffer chips?

How about programming space/speed? I can vary the baud rate down to 2400 or
1200 or even less if necessary I guess but there are some garbage
characters before the numbers that have to be discarded. Does anyone think
it's impossible to collect the characters, decode them & run 3 displays,
all in 256 bytes? I figure some sort of lookup table for each digit is in
order.

Why isn't the Stamp II out yet? Sure would make life easier!

Regards,

Dave

--
-------------------------------------------------------------------------
|       David Baker        |  Internet   ID (home) - spam_OUTdavidTakeThisOuTspambaker.pc.my  |
|   Electronics Engineer   |  Internet   ID (work) - .....davidKILLspamspam@spam@gmetra.po.my |
|                          |  Fax                  - 60-3-2612870       |
|  Kuala Lumpur, Malaysia  |  Compuserve ID        - 70461,2360         |
-------------------------------------------------------------------------

1995\07\16@131556 by Bill Cornutt

flavicon
face
----------
>It appears the Stamp List has died? I thought I would post here & see how
>it goes - I guess the Stamp people are still here, anxiously awaiting the
>Stamp II.
>
>We have an LCD display at work which the person using says is too small for
>him to see. It is an LCD display hooked to the serial output of a computer.
>It displays the depth of some sensors that are put into the ground & has to
>read a maximum of 19.9 metres to 0.1 metre accuracy.
>
>I figure the easiest way around this would be to hook a Stamp into the
>serial line, collect the numbers & power some big (2 inch) LED 7 segment
>displays. I thought I would run it through here for comments first. I have
>played with these devices a bit but haven't gotten too technical yet. Some
>points that come to mind:
>
>7 segments x 2.5 digits means 16 I/O pins + 1 for the RS-232. Is there any
>easy way of using less pins? If not I guess I need a Stamp stretcher as
>well.

A 7 segment display requires seven lines to drive the segments plus one for
the decimal point.  And three digits would take three lines to select
the digit.  Therefore it would take 11 lines in the conventional way.
AMD use to make a chip that would handle eight digits.  It has been
a long time sense I used it but I think you put the value on its pins
in parallel for each digit is order along with a clock.  Then the
chip would handle the decoding and multiplexing.  It took eight
parallel input lines and also two or three clock/control lines.
The good thing about this chip is  that it does the decoding,
multiplexing, and driving (buffering) of the display.

When not using any external chips, the seven segements could be
driven with seven lines using a npn transistor for each segment
and a pnp transistor for the digits (my solid state theory is
limitted, so you had better check to make sure that you wouldn't
draw too much current through the base of the transistors).  And
you could also hardwire the decimal point to save a i/o line.

You may have a brightness difference in the decimal point because
on its current not going through a segement transistor.  If this
is noticeable, then connect a driver to it and hardwire the input
to the driver so that it is always on.  Or stick a little diode
in its circuit to get the same voltage drop as a driver would have.

The CMOS chip 4049-4050 can both sink and source a lot of current,
so these may be a good ic to use for both segement and digit select.
Because they come in six packs (as do all good things), you would
need only two ic's.

The segments of the led will have to have a current limiting resistor
in the circuit so that too much current will not destroy the led.
This resistor should be placed in the driver circuit for each of
the seven segments, and the decimal point.

Again, my solid state theory is limited, but....
If you are using a 5v supply, then you could figure there is a 0.6v
drop across the segment driver, 0.6v drop across the led, and
a 0.6 volt drop across the digit select driver.  Therefore to
determine the value of current limiting resistor, use 3.2v as the
voltage across the resistor. (but I could be wrong, so check it out
first)

With more than one digit it is normal to multiplex them.  Because
of multiplexing, the current ratings for the led's gets complicated.
I think the specifications for led's may have two current ratings.
One is the "average max current" and the other is the "max current".

So the average current would be influenced by the oh/off time ratio.
Seems like the thing is multiplex at 60 times a secomd and multiplexing
8 segments (or eight digits if you turn on a common segment and then
select the digits have that segment), would give you a on time of
about 2 ms and a off time of 14ms.  And by putting more current
through the led (even if for a shorter time) our eyes see it as a
brighter display.

Again, the Advance Micro Devices chip handles all that for you.

And that is my opionion!

  ---------
  Bill Cornutt
  billcornspamKILLspaminfoserv.com
  Located in Ione California USA.
  A small town in Northern California.
  Sitting against the foothills of the Mother Lode.
  ----------------------------------------------------

1995\07\16@181258 by First Last

flavicon
face
David Baker wrote:
DA>I figure the easiest way around this would be to hook a Stamp into the
DA>serial line, collect the numbers & power some big (2 inch) LED 7 segment
DA>displays. I thought I would run it through here for comments first. I have
DA>played with these devices a bit but haven't gotten too technical yet.

I commonly use a serial to parallel shift register to drive 7 segment
displays:

you need only 2 pins - clock and data
I use ls164 with the Q leads connected to cathodes of display
common anode connects to 2 to 2.5 volts via a simple transistor
regulator.

The 8th bit of the shift register can connect to decimal point, or to
next
shift register if you need multiple digits.
You need a simple lookup table to convert number to 7 segment
then shift it out.
I think there are some chips to do this specifically but this is a low
cost solution.

Hope this helps,  Gary Skinner,  Electronic Solutions Inc

1995\07\16@185733 by William Chops Westfield

face picon face
   7 segments x 2.5 digits means 16 I/O pins + 1 for the RS-232. Is there any
   easy way of using less pins?

Well, 10 IO pins if you multiplex the digits, and 7 IO pins if you do the
decimal->7seg decode externally to the stamp:


--4---[7447]--7---D1--D2--D3
___3______________/___/___/

The 7447 is an old TTL part for doing the 7 seg decode.  You can use a
suitably programmed PAL or ROM instead if you're so equipped as to make
this easier.  You may need transistors for the 3 wires.

I don't know if the stamp is fast enough to multiplex a display in software.

Even 7 pins is "almost all of them"...

BillW

1995\07\17@015543 by Tom Mornini
flavicon
face
> Why isn't the Stamp II out yet? Sure would make life easier!

The Stamp II is coming soon to a project near you. Pre-release units
shipped weeks ago and have been very well received (and bug-free!).

We are very near software completion, and at that point have approx.
2 weeks (if everything goes correctly and smoothly) to manufacture a
significant quantity. The first build will cover all existing back-orders
and general availability should be within 6 weeks.

Software was to "go gold" on Friday, but the engineer got a wild hair
up a certain orifice and decided to add native keypad and LCD support.
This could delay things until Friday or so. The unit now includes X10
output, fantastically improved serial I/O (38.4K baud, with hardware
handshake!, and time-outs for both SERIN and SEROUT), DTMF output, and
a command called COUNT that counts the number of line transitions in a
given amount of time (great for tachometers and related projects).

Here is a copy of the pre-release docs that went out with the first units.
They are very rough and don't include descriptions of some of the staple
Stamp instructions, but rest assured that the II will do everything the I
does.

Note that this document includes PC high-bit graphic characters and will
look best when viewed on a PC monitor or printer.

                               BASIC Stamp II

                              ZDDDDDDDDDDDDDD?
                       SOUT DD41           24CDD VIN
                        SIN DD42           23CDD VSS
                        ATN DD43           22CDD RES
                        VSS DD44           21CDD VDD
                         P0 DD45           20CDD P15
                         P1 DD46           19CDD P14
                         P2 DD47           18CDD P13
                         P3 DD48           17CDD P12
                         P4 DD49           16CDD P11
                         P5 DD410          15CDD P10
                         P6 DD411          14CDD P9
                         P7 DD412          13CDD P8
                              @DDDDDDDDDDDDDDY
                                   BS2-IC

Pin     Name    Description
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
1       SOUT    Serial output           Connect to pin 2 of PC serial DB9 (Rx)
2       SIN     Serial input            Connect to pin 3 of PC serial DB9 (Tx)
3       ATN     Serial attention        Connect to pin 4 of PC serial DB9 (DTR)
4       VSS     Ground                  Connect to pin 5 of PC serial DB9 (GND)
5       P0      I/O pin 0
6       P1      I/O pin 1
7       P2      I/O pin 2
8       P3      I/O pin 3               Each I/O can source 20ma and sink 25ma.
9       P4      I/O pin 4
10      P5      I/O pin 5               P0-P7 and P8-P15, as groups, can each
11      P6      I/O pin 6               source a total of 40ma and sink 50ma.
12      P7      I/O pin 7
13      P8      I/O pin 8
14      P9      I/O pin 9
15      P10     I/O pin 10
16      P11     I/O pin 11
17      P12     I/O pin 12
18      P13     I/O pin 13
19      P14     I/O pin 14
20      P15     I/O pin 15
21      VDD     +5V                     5V regulated output / 5V input
22      RES     Reset I/O               may be pulled low, don't drive high
23      VSS     Ground
24      VIN     Regulator input         5V-15V regulator input



Internal Perspective:

The BS2 has 2K bytes of EEPROM which holds the executable BASIC program and any
data.  Memory not used by the BASIC program can be read and written at run-time
as a data bank, or initialized with data at download time.  This memory is only
affected by downloading or run-time modification.

There are 32 bytes of RAM which serve as variable space and I/O pin interface
for the BASIC program.  This memory can be accessed as words, bytes, nibbles,
or bits.  Each time the BASIC program is run anew, this memory is cleared to
all zeroes.

So, the 2K byte EEPROM is for program and data, and only affected by initial
downloading or run-time modification.  It survives power-down.  The 32 bytes of
RAM are for run-time variables and I/O pin access.  This memory is cleared each
time the BS2 is powered up, reset, or downloaded to.


The 2K-byte EEPROM is arranged as follows:

          byte $000 DBD    Data start
                     3          |
                     3          |
                     3          |
                     3          |
                     3      Data end
                     3
                     3
                     3
                     3
                     3
                     3
                     3      Program end
                     3           |
                     3           |
                     3           |
                     3           |
          byte $7FF DAD    Program start


The 32-byte RAM is arranged as follows:

WORD                BITS                  Description             R/W
-------------------------------------------------------------------------------
$0-  x x x x  x x x x  x x x x  x x x x   Pin input states        read-only
$1-  x x x x  x x x x  x x x x  x x x x   Pin output latches      read/write
$2-  x x x x  x x x x  x x x x  x x x x   Pin directions          read/write
$3-  x x x x  x x x x  x x x x  x x x x   variable space          read/write
$4-  x x x x  x x x x  x x x x  x x x x   variable space          read/write
$5-  x x x x  x x x x  x x x x  x x x x   variable space          read/write
$6-  x x x x  x x x x  x x x x  x x x x   variable space          read/write
$7-  x x x x  x x x x  x x x x  x x x x   variable space          read/write
$8-  x x x x  x x x x  x x x x  x x x x   variable space          read/write
$9-  x x x x  x x x x  x x x x  x x x x   variable space          read/write
$A-  x x x x  x x x x  x x x x  x x x x   variable space          read/write
$B-  x x x x  x x x x  x x x x  x x x x   variable space          read/write
$C-  x x x x  x x x x  x x x x  x x x x   variable space          read/write
$D-  x x x x  x x x x  x x x x  x x x x   variable space          read/write
$E-  x x x x  x x x x  x x x x  x x x x   variable space          read/write
$F-  x x x x  x x x x  x x x x  x x x x   variable space          read/write


Word $0 always reflects the read-state of all 16 I/O pins.  Whether a pin is an
input or output, it's logical state can be read in this word.  Word $0 is
accessed by the following symbolic names:

       INS     the entire 16-bit word

       INL     the low byte of INS
       INH     the high byte of INS

       INA     the low nibble of INL
       INB     the high nibble of INL
       INC     the low nibble of INH
       IND     the high nibble of INH

       IN0     the low bit of INS - corresponds to pin P0
        |
        |
        |
       IN15    the high bit of INS - corresponds to pin P15


Word $1 contains the output latches for all 16 I/O pins.  If a pin is in input
mode, this data is unused, but when a pin is in output mode, its corresponding
word $1 bit sets its state.  The bits are all readable and writable, regardless
of pin direction.  The following symbolic names access word $1:

       OUTS    the entire 16-bit word

       OUTL    the low byte of OUTS
       OUTH    the high byte of OUTS

       OUTA    the low nibble of OUTL
       OUTB    the high nibble of OUTL
       OUTC    the low nibble of OUTH
       OUTD    the high nibble of OUTH

       OUT0    the low bit of OUTS - corresponds to pin P0
        |
        |
        |
       OUT15   the high bit of OUTS - corresponds to pin p15


Word $2 contains the direction bits for all 16 I/O pins.  To place a pin in
input mode, its corresponding word $2 bit must be cleared to 0.  To put a pin
into output mode, its corresponding word $2 bit must be set to 1, at which
time its word $1 bit will determine whether it is high or low.  Word $2 has
these symbolic names:

       DIRS    the entire 16-bit word

       DIRL    the low byte of DIRS
       DIRH    the high byte of DIRS

       DIRA    the low nibble of DIRL
       DIRB    the high nibble of DIRL
       DIRC    the low nibble of DIRH
       DIRD    the high nibble of DIRH

       DIR0    the low bit of DIRS - corresponds to pin P0
        |
        |
        |
       DIR15   the high bit of DIRS - corresponds to pin p15


Words $3-$F are for general purpose variable use and have no pre-assigned
symbolic names.  The VAR statement is used to allocate this memory.



The above text has introduced the physical pin-out of the BS2 as well as
the internal EEPROM, RAM, and I/O structure.




Programming the BASIC Stamp II
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD


In the BASIC Stamp II, there are two general categories of BASIC statements:
compile-time and run-time.  Compile-time statements are resolved when you
compile the program (Alt-R or Alt-M) and do not generate any executable code.
Run-time statements, on the other hand, generate code and are executed at run-
time.

There are three compile-time statements.  They are used for declaring
variables, constants, and data.  They are:

               VAR     CON     and     DATA



               The VAR statment - for defining variables

Your program should begin with a declaration of all of its variables.  VAR
statements assign symbolic names to variable RAM (RAM not used by I/O - words
$3-$F).  This is done as follows:

       'Declare the variables

       cat     var     nib             'make "cat" a nibble variable
       mouse   var     bit             'make "mouse" a bit variable
       dog     var     byte            'make "dog" a byte variable
       rhino   var     word            'make "rhino" a word variable
       snake   var     bit(10)         'make "snake" a 10-piece bit variable

The compiler will group all words, bytes, nibs, and bits, and respectively
arrange them into unused RAM.  By pressing Alt-M, you can see a picture of
the RAM allocation.  First, the three I/O words are shown, then all words,
bytes, nibs, and finally, bits, are seen.  Empty RAM follows.  Alt-M is a quick
way to assess how much RAM you've used.

The VAR usage options are as follows:

       'define unique variables

       sym1    VAR     bit             'make a bit variable
       sym2    VAR     nib             'make a nibble variable
       sym3    VAR     byte            'make a byte variable
       sym4    VAR     word            'make a word variable

               'After bit/nib/byte/word a value may be placed
               'within parentheses to declare an array size:

       sym5    VAR     nib (10)        'make a 10 nibble array

       'define variables-within-variables or alias variables

       sym6    VAR     sym4.highbit    'make a bit variable of sym4's highbit
       sym7    VAR     sym4.lowbit     'make a bit variable of sym4's lowbit
       sym8    VAR     sym2            'make an alternate name for sym2

               'When using VAR to assign non-unique variables (a variable
               'name is used in lieu of bit/nib/byte/word(size)), a period may
               'be placed after the variable name and followed by modifiers.
               'Modifiers are used to identify sub-pieces of the initially-
               'mentioned variable.

       sym9    VAR     sym4.highbyte.lownib.bit2       'picky, picky...


       Here are all the variable modifiers:

       LOWBYTE                 'low byte of a word
       HIGHBYTE                'high byte of a word
       BYTE0                   'byte0 (low byte) of a word
       BYTE1                   'byte1 (high byte) of a word

       LOWNIB                  'low nibble of a word or byte
       HIGHNIB                 'high nibble of a word or byte
       NIB0                    'nib0 of a word or byte
       NIB1                    'nib1 of a word or byte
       NIB2                    'nib2 of a word
       NIB3                    'nib3 of a word

       LOWBIT                  'low bit of a word, byte, or nibble
       HIGHBIT                 'high bit of a word, byte, or nibble
       BIT0                    'bit0 of a word, byte, or nibble
       BIT1                    'bit1 of a word, byte, or nibble
       BIT2                    'bit2 of a word, byte, or nibble
       BIT3                    'bit3 of a word, byte, or nibble
       BIT4                    'bit4 of a word or byte
       BIT5                    'bit5 of a word or byte
       BIT6                    'bit6 of a word or byte
       BIT7                    'bit7 of a word or byte
       BIT8                    'bit8 of a word
       BIT9                    'bit9 of a word
       BIT10                   'bit10 of a word
       BIT11                   'bit11 of a word
       BIT12                   'bit12 of a word
       BIT13                   'bit13 of a word
       BIT14                   'bit14 of a word
       BIT15                   'bit15 of a word


In summary, to declare variables, VAR statements are used.  VAR statements
either declare unique variables or variables-within-variables/alias-variables.

For defining unique variables:

       symbol  VAR     size (array)

       - symbol is a unique name for a variable
       - size is either WORD, BYTE, NIB, or BIT
       - (array) is an optional expression which declares an array size

For defining variables-within-variables or alias-variables

       symbol  VAR     variable.modifiers

       - symbol is a unique name for a variable
       - variable is a defined variable name
       - .modifiers are optional and used to define variables-within-variables

The compiler will group all declarations by size (in the case of unique
variables) and assign them to unused RAM.  Alt-M lets you see the result of
this process.  Non-unique variables are in-whole or in-part derived from unique
variables and get assigned within the unique-variable memory.

Keep in mind that you may make alias names for the pin variables:

       keyin   var     in5             'make "keyin" a way to read P5's state.



               The CON statment - for defining constants

The CON statement is similar to the VAR statement, except that it is for
defining constant values and assigning them to symbolic names.  This is
handy for having a single declaration which gets accessed throughout your
program.  The CON syntax is as follows:

       symbol  CON     expression      'assign expression to "symbol"

       - symbol is a unique symbolic name for a constant
       - expression is a compile-time-resolvable constant

       level   CON     10              '"level" is same as 10 in program
       limit   CON     10*4<<2         '"limit" is 160

expressions after CON can contain the following binary operators and are
resolved left-to-right:

       +       add
       -       subtract
       *       multiply
       /       divide
       <<      shift left
       >>      shift right
       &       logical AND
       |       logical OR
       ^       logical XOR

example:
       growth  CON     100-light/gel   '"light" and "gel" are CON's, too



               The DATA statment - for defining data

EEPROM memory not used by your BASIC program can be used for data storage.
Keep in mind that your BASIC program builds from the end of memory towards
the start of memory.  This allocation is automatic.  Your data, on the other
hand, builds from the start of memory towards the end.  The sum of program and
data memory cannot exceed the 2K byte limit.  The compiler will always tell you
when you have a conflict.

DATA statements are used to build data into unused memory.  Initially, the DATA
location is set to 0.  It is advanced by 1 for each byte declared.  Here is an
example DATA statement:

table   DATA    "Here is a string..."

Usually, you will want to precede DATA statements with a unique symbol name.
The symbol name will be assigned a constant value (as if via CON) which is the
current data pointer.  The text following 'DATA' is usually a list of bytes
which can be constant expressions.  In the above example (assuming this was
the first DATA statement in the program), "table" becomes a constant symbol of
value 0; "Here is a string..." is broken into individual bytes and placed
into EEPROM memory sequentially.  Alt-M and two <SPACE>s will show you the
result of this line.

The DATA pointer may be altered at any time by an @ sign followed by a new
pointer value:

1995\07\17@015543 by Tom Mornini

flavicon
face
list    DATA    @$100,"some data"

DATA has a few variations of use to allocate defined and undefined data.
Defined data is fully declared and known at compile time.  Undefined data
is the mere allocation of data space, while not assigning values into the bytes
of EEPROM (to be done at run-time, instead).  Defined and undefined data are
declared as follows:

       for defined data:

fee     DATA    0,1,2,3,4,5,6,7,8,9     'actual bytes
fie     DATA    word 1000               'make two bytes: $E8 and $03
foe     DATA    0 (256)                 '256 bytes initialized as 0

       for undefined data:

fum     DATA    (1024)                  'reserved 1K byte of undefined data
scratch DATA    word (16)               'reserve 16 words of undefined data


Important concept:      Defined DATA and BASIC program memory are always
                       downloaded to the BS2.  Undefined data and unused
                       EEPROM memory are not downloaded.  This allows you
                       to change programs while keeping data, assuming both
                       programs defined the same stretch of memory as
                       undefined DATA.  Alt-M will show you maps of EEPROM
                       allocation.  This download/don't-download rule is
                       applied to 16-byte blocks.  If any byte within a 16-
                       byte block is defined DATA or BASIC program, that
                       whole block is downloaded.  Use Alt-M to see this.


In summary, DATA is used to define EEPROM byte usage that doesn't conflict
with the BASIC program storage:

- DATA can be preceeded by a symbol which will be assigned the constant value
 of the current DATA pointer.

- Byte-size data is assumed, but 'word' can be used to break a word into two
 bytes of storage.

- The @ sign is used to redirect the DATA pointer.  If a symbol preceeds a
 DATA statement and the first thing after DATA is @, the new pointer value
 is assigned to the symbol.

- Defined data is spelled out, so to speak, with numbers and letters.

- Defined data may be repeated at the byte or word level using (array).

- Undefined data may be reserved by using (array) unpreeceded by a value.

Note:   DATA can contain references to DATA symbols:

       t1              DATA    "Here's table 1...",0
       t2              DATA    "Here's table 2...",0
       t3              DATA    "Here's table 3...",0
       t4              DATA    "Here's table 4...",0

       t_starts        DATA    word t1, word t2, word t3, word t4



                       Run-Time Expressions
       ----------------------------------------------------

Run-time expressions can contain constants, variables, operators, and
parentheses.  They are resolved using 16-bit math.

Constants can be in several forms:

       label                   - a label may be assigned a constant via CON
       $BA1F                   - Hex
       %111001111              - Binary
       99                      - Decimal
       "A"                     - ASCII

       Note:  When more than one character is within quotes, they are
       separated by the compiler as such: "DOG" becomes "D","O","G".
       "String"+$80 becomes: "S","t","r","i","n","g"+$80.

Variables can be accessed a number of ways:

       somevar                 - Some variable
       wordvar.highbit         - Use modifiers to access sub-variables
       nibarray(index)         - A variable followed by an expression in
                                 quotes is indexed as an array (0=1st element)
       word.bit0(bitoffset)    - Scan a word, one bit at a time

       Say a variable were defined as such:

       string var byte (10)

       It could be accessed as:

       string                  - the 1st byte
       string (0)              - the 1st byte
       string (1)              - the 2nd byte
       string (9)              - the 10th (last) byte
       string.lownib(nibindex) - nibindex could be 0-19
       string.lowbit(bitindex) - bitindex could be 0-79


There are binary, unary, and conditional expression operators.

Unary operators preceed a variable or constant or (expression) and have
highest priority.  They are as follows:

       SQR     - Square root of unsigned 16-bit value
       ABS     - Absolute of signed 16-bit value
       ~       - One's complement of 16-bit value (bitwise not)
       -       - Two's complement of 16-bit value (negation)
       DCD     - 2^n decoder of 4-bit value (0...15 -> 1,2,4,8,16,...32768)
       NCD     - Priority encoder of 16-bit value
                 (=>32768,=>16384,=>8192,...=1 -> 15,14,13,...1 ; 0 -> $FFFF)
       COS     - Cosine of 8-bit value. Result is in the range of +-127,
                 unit circle is 0-255 radial units.
       SIN     - Sine of 8-bit value. Result is in the range of +-127,
                 unit circle is 0-255 radial units.

       Examples:
                       sin bytevar
                       sqr 50000
                       ~ in0

Binary operators take two terms and go between variables, constants, or
expressions.  They are as follows:

       HYP     - Hypotenuse of 2 signed 8-bit values
       ATN     - Arctangent of 2 signed 8-bit values; x ATN y.
                 0-255 radial units is returned.
       &       - Bitwise AND
       |       - Bitwise OR
       ^       - Bitwise XOR
       MIN     - limit value to minimum
       MAX     - limit value to maximum
       +       - addition
       -       - subtraction
       *       - multiply
       **      - multiply and return high 16-bits of result
       */      - multiply and return middle 16-bits of result
                 (use to simultaneously multiply by a whole and a part;
                 ie. 'value */ $0180' multiplies by 1 and a half)
       /       - divide
       //      - divide and return remainder
       DIG     - return decimal digit; '12345 dig 3' returns 2
       <<      - shift left
       >>      - shift right
       REV     - reverse order of bits, lsb-justified; '%100110 rev 6'
                 yields %011001

       Examples:
                       xpos hyp ypos
                       randword // 20
                       cos x atn sin x         'result same as x

Parentheses can be placed to special-order the pattern of expression
resolution.  Though unary operators have highest priority and binary operators
have secondary priority, and with those rules expressions are resolved left-to-
right, parentheses can override priority:

X+1*Y-1         'something's wrong here if we need (X+1)*(Y-1)
(X+1)*(Y-1)     'do it right

Up to 8 levels of parentheses can be used.


For use within conditional expressions (IF), there is a special unary operator
and several binary operators.  These conditional operators have highest
priority of all.

       NOT             - highest priority unary
       AND, OR, XOR    - highest priority binaries

       Note: These are arithmetically identical to expression operators:
                       ~       &       |       ^
             though they differ in application.

Lower-priority conditional binary operators (still higher than expression ops):

       <               - less than
       <=              - less than or equal to
       =               - equal to
       =>              - equal to or greater than
       >               - greater than
       <>              - not equal

       Note: These comparison operators return 0 for false and $FFFF for true.
             Combined with NOT, AND, OR, and XOR, complex tests can be done.


To summarize, here are some examples:

       outs = ~ dcd nibarray(index)    'lookup a nibble, decode it, not it
       IF x<1 or not y>3 and (z=0 xor r=3) then loopback



                               Run-Time Instructions
               ----------------------------------------------------
            Anywhere a value is requested, an expression may be placed

FOR...NEXT
----------------------------------------
The FOR...NEXT loop.

usage:  FOR variable = start TO end {STEP stepval}
       {some code}
       NEXT

STEP is for specifying a step value other than the default of 1; if specified,
stepval must be positive since whether to add or subtract stepval from variable
is determined dynamically at run-time (this allows '10 TO 0' without specifying
a negative STEP value.).

FOR...NEXT loops can be nested up to 16 deep.

Note: NEXT is stand-alone and implies the variable from the last FOR statement.


GOTO
----------------------------------------
Go to a new point in the program

usage:  GOTO joe

A branch to joe will occur, rather than execution continuing at the next
instruction.


GOSUB
----------------------------------------
Go to a subroutine (and then RETURN later).

usage:  GOSUB lightson

The execution point is remembered and then a branch to lightson occurs.  When
a RETURN is encountered (in lightson), execution continues at the instruction
following the GOSUB.

GOSUB's may be nested up to 8 deep and you are allowed 255 of them in your
program.


RETURN
----------------------------------------
Return from a subroutine.

usage:  RETURN

The execution point is set to the instruction after the GOSUB that got into
the subroutine executing the RETURN.

If a RETURN is executed without a corresponding GOSUB, execution begins anew
at the start of the program.  If 8 nested GOSUBs were executed and all returned
from, then a 9th RETURN will return execution to the instruction after the 8th
nested GOSUB.  This is because at program initialization, all 8 GOSUB stack
elements are cleared to 0 and there is a rotary 8-position stack pointer which
increments on GOSUBs and decrements on RETURNs.


IF
----------------------------------------
Branch conditionally.

usage:  IF conditionalexpression THEN label
       ie. IF x=1 then redoit

If the result of conditionalexpression is not 0, execution will be continued
at label.  Else, execution continues at the next instruction.


BRANCH
----------------------------------------
Branch according to an index.

usage:  BRANCH  index,(label0,label1,label2,...labelN)

If index=0, a GOTO label0 will be executed.  If index=1, a GOTO label1 will be
executed.  If the index exceeds the number of label entries, no branch will
occur and execution will proceed at the next instruction.


LOOKUP
----------------------------------------
Lookup a variable according to an index.

usage:  LOOKUP  index,(value0,value1,value2,...valueN),variable

If index=0, value0 will be written to variable.  If index=1, value1 will be
written to variable.  If the index exceeds the number of value entries, the
variable will not be affected.


LOOKDOWN
----------------------------------------
Lookdown a value and return an index.

usage:  LOOKDOWN value,??(value0,value1,value2,...valueN),variable

?? is a comparison operator: =,<>,>,<,<=,=>.  A comparison is made between
value and value0; if the result is true, 0 is written into variable.
If that comparison was false, another comparison is made between value and
value1; if the result is true, 1 is written into variable.  This process
continues until a true is yielded, at which time the index is written into
variable, or until all entries are exhausted in which case variable is
unaffected.


RANDOM
----------------------------------------
Pseudo-randomly iterate a variable.

usage:  RANDOM  wordvariable

wordvariable will be iterated.


READ
----------------------------------------
Read a byte from the EEPROM.

usage:  READ    location,variable

Location is 0-2047.  Variable will receive the byte read from location.


WRITE
----------------------------------------
Write a byte into the EEPROM.

usage:  WRITE   location,byte

Location is 0-2047.  Byte is 0-255.  Byte will be written into location.


INPUT, OUTPUT, LOW, HIGH, TOGGLE, REVERSE
----------------------------------------
Modify a pin's input/output high/low state.

usage:  INPUT   pin

Pin is 0-15.

modified:       OUTx    DIRx
----------------------------
INPUT           same    0
OUTPUT          same    1
LOW             0       1
HIGH            1       1
TOGGLE          flip    1
REVERSE         same    flip


DEBUG
----------------------------------------
Show variables and messages for debugging purposes.

usage:  DEBUG "Here we are!"    'show message when executed

When executed, the data after DEBUG will be sent to the PC for
display.  DEBUG data can be displayed in several modes.  Straight
data can be relayed to the PC, or you can have values printed in decimal,
hex, binary, or ascii.  In the number-printing modes, the result of an
expression can be printed or a complete relation can be shown between the
expression and its result.  For example:

       DEBUG dec X             'show variable X in decimal

               will yield (if x=1):

       X = 1

       DEBUG dec# X            'show variable X in decimal

               yields:

       1

To print numbers, there are several words which can preceed expressions:

       STR             'print string from byte array, 0=end of string
       DEC             'print in decimal
       SGN             'print in signed decimal
       HEX             'print in hexadecimal (4 digits)
       HEX1 - HEX4     'print in hex, 1-4 digits
       BIN             'print in binary (16 digits)
       BIN1 - BIN16    'print in binary, 1-16 digits
       ASC             'print in ascii, 1 character

To print only the resultant value of an expression, without the redundant text:

       STR#            'print string
       DEC#            'print in decimal
       SGN#            'print in signed decimal
       HEX#            'print in hexadecimal (4 digits)
       HEX1# - HEX4#   'print in hex, 1-4 digits
       BIN#            'print in binary (16 digits)
       BIN1# - BIN16#  'print in binary, 1-16 digits
       ASC#            'print in ascii, 1 character (this is the default)

DEBUG statements can contain many strings and numbers, separated by commas.  In
addition, there are several special control characters which are interpreted by
the DEBUG screen:

       name    value   effect
       ------------------------------------------------------
       CLS     0       clears the screen and homes the cursor
       HOME    1       homes the cursor
       BELL    7       beep the PC speaker
       BKSP    8       backspace - backs up the cursor
       TAB     9       advances to the next 8th column
       CR      13      carriage return - down to next line

       DEBUG   cls,dec ina,"   "       'cls, print ina in decimal, spaces too

Example program using DEBUG:

       count   var     byte

       loop:   debug sgn sin count     'show the signed-decimal sine of count
               count = count + 1       'increment count
               if count <> 0 then loop 'loop until count rolls over


STOP
----------------------------------------
Stop execution.

usage:  STOP

Execution is frozen, but low-power mode is not entered.  This is like
END, except that the I/O's never go high-z; they remain driven.  Reset
will end STOP.


NAP
----------------------------------------
Nap for a short period.

usage:  NAP x

Enter low-power mode for a short period.  When the period is over, the I/O's
will go high-z for ~18ms and execution will continue at the next instruction.

The x values for NAP are as follows:

       x       seconds
       ---------------
       0       .018
       1       .036
       2       .072
       3       .14
       4       .29
       5       .58
       6       1.2
       7       2.3


SLEEP
----------------------------------------
Sleep for x seconds (x=0 to 65535)

usage:  SLEEP x

Enter low-power mode and keep I/O's updated.  Every ~2.3 seconds the I/O's
will go high-z for ~18ms.  Approximately 50ua average current will be consumed.
When x seconds have been accrued in SLEEP mode, execution continues at the next
instruction.


END
----------------------------------------
End program.

usage:  END

Enter low-power mode and keep I/O's updated.  Every ~2.3 seconds the I/O's
will go high-z for ~18ms.  Approximately 50ua average current will be consumed.
END is terminated only by a hardware reset.

--  Tom Mornini ----------------------------------------------------------
--  Parallax, Inc.  ------------------------------------------------------
--  Makers of really cool PIC development tools & the BASIC Stamps  ------
--  http://www.parallaxinc.com           ftp://ftp.parallaxinc.com/pub  --

1995\07\17@033727 by Neil Thomson

flavicon
face
Have you thought of multiplexing the displays to reduce the number of pins neede
d i.e
8 data pins and 2 pins fed to a 2-4 line decoder so that only the relevant displ
ay gets fed the data at one time.

1995\07\17@174630 by Claus K|hnel

flavicon
face
A very simple way to drive eight seven-segment-displays in maximum is the
usage of Maxim's MAX7219 LED driver device. The MAX7219 is cascadable. For
serial communication only 3 pins of the BASIC Stamp are needed.

Claus Kuhnel

1995\07\18@142443 by Markus Imhof

flavicon
face
....
>I figure the easiest way around this would be to hook a Stamp into the
>serial line, collect the numbers & power some big (2 inch) LED 7 segment
>displays. I thought I would run it through here for comments first. I have
>played with these devices a bit but haven't gotten too technical yet. Some
>points that come to mind:
>
>7 segments x 2.5 digits means 16 I/O pins + 1 for the RS-232. Is there any
>easy way of using less pins? ....

Sure. Multiplexing. 7 Segments x 3 digits = 10 pins. You just have to
switch the digits one after the other.

>Can I run a 7 seg display directly from the Stamp or stretcher? The spec
>sheet I have says 20 or 25 mA per pin but only 40 or 50 mA total! This
>doesn't sound like much. Anyone recommend some good buffer chips?

I don't have the databooks here, but in the standard 74 series, there are
lots of LED-display drivers, including BCD-to-7-segment decoders (which
will bring you down to 6 lines - three for the BCD code and three for the
digit selection).

Bye
 Markus

1995\07\19@235301 by Stephen Kormilo

picon face
On Tue, 18 Jul 1995 20:24:10 +0100 you wrote:

Stuff deleted...

>I don't have the databooks here, but in the standard 74 series, there are
>lots of LED-display drivers, including BCD-to-7-segment decoders (which
>will bring you down to 6 lines - three for the BCD code and three for the
>digit selection).
>
>Bye
>  Markus

BCD code requires 4 lines, on the other hand, addressing 2.5 digits would
require only 2 lines, so only 6 lines are required, but not in the manner
indicated.

In addition to the BCD-to-7 Segment Decoder, a Digit driver (2 line to one of
four demultiplexer) chip would be required.  It's the usual tradeoff, more
external hardware makes it 'easier' on the micro (fewer connections & simpler
software), but the system becomes larger, more complex & more expensive.


----
Stephen Kormilo      Email: .....Stephen_KormiloKILLspamspam.....UManitoba.Ca
Electronics Technology,  Red River Community College
Winnipeg, MB,  CANADA


'Acknowledge (Was: Fuzzy controllers)'
1995\09\06@190308 by Ronny H. Kavli
flavicon
face
>>(Do not ask me about details regarding this code, as I _not_ am the
>> author of this code - Kavli)
>
>    No kidding, Ronny... How about asking the authors of FIDE for
>    permission before you go posting their copyrighted code to the
>    world?  Or at least acknowledging the copyright?

Since Andrew Warren has forced me :-) to investigate in this, the
author of the code I supplied is Raymod Carr. I don't know if he was
employed by Aptronix at the time the code was written or if the code
was bought by Aptronix at a later date or whatever.

In any case Raymond should be acknowledged for writing that code.
Newer versions of the code can be found by anonymous ftp at:

ftp.gre.ac.uk:/pub/robotics/motorola/mcu11/

Regards,
-------------------------------------------------------------------------------
Ronny H. Kavli                      This message was composed by 10,000 monkeys
EraseMEkavlispam_OUTspamTakeThisOuTludd.luth.se                  keying on 10,000 computers.  It was then
Lulea Academic Computer Soc.(Ludd)  merged using COBOL.  This was of course
Lulea University, Sweden            all done under a government contract.


'3 WIRE LED DISPLAY'
1995\11\08@204610 by Eric Seeley
flavicon
face
Does anyone know where I can purchase LT8522 led display referrenced in
AN592? Is there a "better" device? I'm looking for any serial led display
with at least 3 seven seg. displays and built in logic/latches for serial
interface.  Thanks, Eric Seeley

1995\11\09@043913 by Errington A

flavicon
face
A range of 3wire displays are made by III-V systems, and stocked by Farnell
in the UK.  They include 2 digit and 4 digit 7seg displays in red and
green.

They are all based on the MM5450N display driver chip, which takes 34 serial
data bits in on the 3 wire interface and controls 34 LED segment drivers.

Andy
---------------------------------------------------------------------
Andrew M Errington                               Tel: +44 1524 593678
Microcomputer Consultant                         Fax: +44 1524 844011
Lancaster University                      a.erringtonspamspam_OUTlancaster.ac.uk
Lancaster LA1 4YW     www.lancs.ac.uk/people/cpaame/cpaame.htm
---------------------------------------------------------------------

>Does anyone know where I can purchase LT8522 led display referrenced in
>AN592? Is there a "better" device? I'm looking for any serial led display
>with at least 3 seven seg. displays and built in logic/latches for serial
>interface.  Thanks, Eric Seeley

1995\11\09@082624 by Warren Crossfield

flavicon
face
Eric;

   Here's one used the other day...worked without any trouble at all!


   MAXIM MAX7219CWG-ND  (That's the Digi-Key part# for the SO-24 part)

   $8.27 ea.

   Serial input 8 digit LED Driver Multiplexed.


cheers.



                                           -Warren
_______________________________________________________________________________
Subject: 3 WIRE LED DISPLAY
From:    e_seeley%@spam@OWENS.RIDGECREST.CA.USKILLspamspamprdnet.polaroid.com at INET
Date:    11/8/95  9:45 PM

Does anyone know where I can purchase LT8522 led display referrenced in
AN592? Is there a "better" device? I'm looking for any serial led display
with at least 3 seven seg. displays and built in logic/latches for serial
interface.  Thanks, Eric Seeley

1995\11\10@122829 by Preben Granberg

flavicon
face
>Does anyone know where I can purchase LT8522 led display referrenced in
>AN592? Is there a "better" device? I'm looking for any serial led display
>with at least 3 seven seg. displays and built in logic/latches for serial
>interface.  Thanks, Eric Seeley
>
How about making a small program for a PIC to the job ?

Preben
Creative Micro
Hinbjerg 38
DK-2690 Karlslunde
Denmark
Tel +45 4615 4655
Fax +45 4215 3977

'Re : 3 wire LED display (well 2 wire)'
1995\11\10@131535 by Robin Abbott

flavicon
face
I suggest that an excellent device for 2 wire I/O expansion is the
M5450. This offers 34 output bits clocked in on a data and
clock line, the outputs only being transferred on the last
clock. It's perfect for up to 4, seven segment displays,
driven on a non-mux basis, good for other apps as well !

Robin

KILLspamrobin.abbottKILLspamspamdial.pipex.com

1995\11\10@140006 by reginald neale

flavicon
face
The Allegro (formerly Sprague) UCN5812 is a relatively inexpensive
display driver that can be used with a three-wire serial input.

Allegro MicroSystems Inc.
115 Northeast Cutoff, Box 15036
Worcester MA 01615

508-853-5000 voice
508-853-7861 fax

....Reg Neale.............standard disclaimer applies.......
"Ignorance is a renewable resource."    P. J. O'Rourke......


'Led Displays for PIC'
1996\05\04@062234 by Mohamad Shalan
flavicon
face
i want to get more information about the maxim 7219 ( price/where to get it)

                       thanx

1996\05\04@101935 by JACOB SCOTT

flavicon
face
You can call maxim at 1-800-998-8800 for free samples or literature.
-Jake

>i want to get more information about the maxim 7219 ( price/where to get it)
>
>                        thanx

'mail failed, returning to sender'
1996\05\30@145934 by myke predko

flavicon
face
Let's Try This Again...

|------------------------- Message log follows: -------------------------|
no valid recipients were found for this message
|------------------------- Failed addresses follow: ---------------------|
<RemoveMEpiclistTakeThisOuTspammitvma.mit.educ> ... unknown host
|------------------------- Message text follows: ------------------------|
Received: from dial042.passport.ca by passport.ca with smtp
       (Smail3.1.28.1 #3) id m0uPBcn-001CRJC; Thu, 30 May 96 13:35 EDT
Message-Id: <spamBeGonem0uPBcn-001CRJCspamBeGonespampassport.ca>
Date: Thu, 30 May 96 13:35 EDT
X-Sender: TakeThisOuTmykeEraseMEspamspam_OUTpassport.ca
X-Mailer: Windows Eudora Version 1.4.4
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
To: RemoveMEpiclistspamTakeThisOuTmitvma.mit.educ
From: mykeEraseMEspam.....passport.ca (myke predko)
Subject: Microchip PIC Seminars


Hi Folks,

We just had our first PC Seminar here in the great white North (Toronto).
If you haven't signed up for a session yet, you should really do so.  Lots
of useful information and a good presentation on the PIC and some good
example applications.  The session is a (very) good tutorial for MPLAB.  I
learned a few things that I hadn't discovered on my own yet.

I recommend that you bring a bag to carry the books home in (a few of the
people from work had to bum laundry bags from the Hotel the seminar was in,
to carry the docs in public transportation).  Also, ask a lot of questions...

The Toronto session was the first in which the PICStart Plus' were
available.  I've opened up the box and looked inside, but that's about it.
I'll try it out tonight and let everybody know what I think.  So far, it
looks a lot better than my PICStart 1B.  You get a single '84 as a sample in
the package.

What really surprised me about the session was the number of people present.
I guess there was about 150 in the Toronto Session.

Myke
Myke

"We're Starfleet officers, weird is part of the job."

Capt. Catherine Janeway


Myke

"We're Starfleet officers, weird is part of the job."

Capt. Catherine Janeway


'Driving LEDs (was: Suggestions for new PIC person)'
1996\06\06@001125 by Byron A Jeff
face picon face
>
> > The "hello world" of the PIC is to blink an LED tied to a pin.  I have
watched
> > several people implement this and have one warning:
> > If you can't see the LED blinking, check with a 'scope.  PICs aren't very
good
{Quote hidden}

Hmmm, I was having a discussion about bipolar LED's driven by PIC pins in
one of my classes I'm teaching this summer just this morning. The objective
was to drive 6 bi-polar LEDS (2 pin) using as few PIC port pins as possible.
Each LED should be able to show red,green,yellow, and off.

The design I hit upon after thinking a bit revolved around multiplexing
the 6 LEDs utilizing a common pin on one side. Something like:

Port pin---+-[220ohm]--+---[LED]------  Port pin
           |
           +-[220ohm]--+---[LED]------- Port pin
           |
           +-[220ohm]--+---[LED]------- Port pin
           |
           +-[220ohm]--+---[LED]------- Port pin

And so on. One led can be selected by tristating all but one port pin
on the right side. The selected LED's color can be picked by twiddling
with the left port pin and the one non-tristated port pin.

The question that popped into my mind during this design discussion was
the relevance of the position of the resistor. Does it matter if the resistor
is on the anode or the cathode side of an LED. Is putting the resistor on
the anode side simply a convention or is there some other reason that justifies
its placement. Should a bi-polar have resistance on both sides (I've done this
in previous designs)?

THe above configuration would be ideal because the left port pin could be
tied to the common terminal of a resistor pack somewhat simplifing the
wiring.

Thanks for any advice,

BAJ

1996\06\06@005341 by Steve Hardy

flavicon
face
{Quote hidden}

justifies
> its placement. Should a bi-polar have resistance on both sides (I've done this
> in previous designs)?
>

It makes no electrical difference which side the R is on.  Two 2-pin
devices in series may be used in any order.

BTW, the above circuit can also drive any 2 LEDs to arbitrary polarity
so long as consistent brightness isn't a problem.  How about 3 or more?
Have to think about that...

Regards,
SJH
Canberra, Australia

1996\06\06@013039 by Onat Ahmet

flavicon
face
       > I would suggest an easy remedy to this is to use a bipolar LED
       one of
       > the two-lead red/green types, available at Radio Shack or any
       mail-order
       > electronics house) connected as shown:
       >
       > Gnd----[220ohm]---+---[220ohm]----+5
       >                   |
       >                   +---[LED]------- Port pin
       >
       > that this can be a useful trick for driving more than one
       "independently-
       Hmmm, I was having a discussion about bipolar LED's driven by PIC
       pins in
       one of my classes I'm teaching this summer just this morning. The
       objective
       was to drive 6 bi-polar LEDS (2 pin) using as few PIC port pins as
       possible.
       Each LED should be able to show red,green,yellow, and off.

       The design I hit upon after thinking a bit revolved around
       multiplexing
       the 6 LEDs utilizing a common pin on one side. Something like:

        Port pin---+-[220ohm]--+---[LED]------  Port pin
                   |
                   +-[220ohm]--+---[LED]------- Port pin
                   |
                   +-[220ohm]--+---[LED]------- Port pin
                   |
                   +-[220ohm]--+---[LED]------- Port pin

       And so on. One led can be selected by tristating all but one port
       pin
       on the right side. The selected LED's color can be picked by
       twiddling
       with the left port pin and the one non-tristated port pin.

Actually, I think there is nothing new under the sun really ;)
If you know about LED sign boards, this is how they work! You
seem to have simplified it into a single line! (the initial
poster did it down to a single pixel!) I think it is a nice idea
though!

       The question that popped into my mind during this design discussion
       was the relevance of the position of the resistor. Does it matter if
       the resistor is on the anode or the cathode side of an LED.

       BAJ

Theoretically both are identical. You don't need to put a resistor
to both ends of a bipolar LED either. I do not know how this setup
works with high frequencies (well, we have seen radio beacons
recently), so I cannot comment on that... (Not that many people would
drive their LED's at these frequencies!)

Is there any "catch 22" to this?


| Ahmet ONAT  Kyoto Univ. Japan                                 |
| E-mail    : RemoveMEonatEraseMEspamEraseMEkuee.kyoto-u.ac.jp                           |
| WWW page  : http://turbine.kuee.kyoto-u.ac.jp/staff/onat.html |
|             My 6 leg walker, RC airplanes & more in home page |

1996\06\06@031027 by Keith Dowsett

flavicon
face
>        the 6 LEDs utilizing a common pin on one side. Something like:
>
>         Port pin---+-[220ohm]--+---[LED]------  Port pin
>                    |
>                    +-[220ohm]--+---[LED]------- Port pin
>                    |
>                    +-[220ohm]--+---[LED]------- Port pin
>                    |
>                    +-[220ohm]--+---[LED]------- Port pin

Hi,

  the problem with this design arises when you want all four LEDs running.
If we allow for 10mA through each LED the common pin has to source and sink
40mA. According to the 16C5X data sheet in front of me the specification is
sink 25mA and source 20mA. In addition to which there are limits on total
currents for each port, and for the total device.

One way around this is to use the common pin to drive a pair of transistors
but that increases the part count and we are still faced with a 40mA per
port limitation. Perhaps someone has a better solution.

Keith.
==========================================================
Keith Dowsett         "Variables won't; constants aren't."

E-mail:      RemoveMEkdowsettspam_OUTspamKILLspamrpms.ac.uk
Phone:       0181-740-3162
Fax:         0181-743-3987

Snail mail:  MRC Clinical Sciences Centre, Cyclotron Unit.
                Hammersmith Hospital. London W12 0NN.

1996\06\06@084308 by Rick Miller

picon face
Byron!!
Byron A Jeff wrote:

It *DOES* make a difference where you put the resistor,
since programmers invariably make *mistakes*.  With only
one resistor, it would be possible to burn out the left-hand
port pin if you were to drive too many of the right-hand
pins to the opposite polarity *simultaneously*.  That's all.

If you're careful, *really* careful, not to do that, then
all is well with only one resistor.  It makes absolutely
no difference which side of the LED you put the resistor
on, unless you want to use the roughly 1.3 V drop for some
sort of measurement purposes.

Use one "file" to hold bits to be driven during the "RED"
cycle and another to hold bits to be driven during the
"GREEN" cycle.  Yellow gets a bit in both.  Then cycle
through both files, one bit at a time.  That way you
can be pretty certain you're not going to drive more than
one LED at a time.

How 'bout loading the flag file into the data output
latches and then rotating the TRIS file with one bit
cleared?  :-)  Now you know I'm going to have to build
this thing, just to see it run.

You might also wish to lower the value of the current-
limiting resistor to allow the full 20mA that the pins
can put through it.  Since you're only going to be driving
the LEDs for very small duty cycles (1/12 at most) you
certainly won't have to worry about burning them out.
--
Rick Miller
<RemoveMErdmillerTakeThisOuTspamspamexecpc.com>

1996\06\06@131538 by Reginald Neale

flavicon
face
electronics house) connected as shown:
>>
>> Gnd----[220ohm]---+---[220ohm]----+5
>>                   |
>>                   +---[LED]------- Port pin
>>

This can also be used with separate red and green LEDs in inverse parallel,
e.g. a panel display to indicate TOO HIGH (red LED); TOO LOW (green LED);
or within range (tri-stated to open circuit - no LEDs).


{Quote hidden}

In a series circuit, the same current flows through all elements, so it
makes no difference which side the resistor is on. Also, if you only need
to light one of the LEDs at a time, you can simplify this by using a single
resistor at the port pin.

.....................Reg Neale.....................
"Ignorance is a renewable resource"   P.J. O'Rourke

1996\06\06@135517 by Byron A Jeff

face picon face
>
> >        the 6 LEDs utilizing a common pin on one side. Something like:
> >
> >         Port pin---+-[220ohm]--+---[LED]------  Port pin
> >                    |
> >                    +-[220ohm]--+---[LED]------- Port pin
> >                    |
> >                    +-[220ohm]--+---[LED]------- Port pin
> >                    |
> >                    +-[220ohm]--+---[LED]------- Port pin
>
> Hi,
>
>    the problem with this design arises when you want all four LEDs running.

I definitely do not want all four LEDs running at the same time. That defeats
the original spec which is that each bi-polar LED can have a color independant
of the others. If all four are driven simulteanously then only two of the
possible 4 colors can be achieved (One color and off).

The plan is to multiplex them: i.e. turn on one LED at a time with the corrent
color, show that color for a while, turn that LED off and move on to the next
one which can be turned on with a completely different color. If you do this
fast enough, the eye blends the flashing LED's into a solid (but dimmer)
color.

And as Rick Miller pointed out in another post, with careful programming
it's not even necessary to have one resistor per led but one resistor
period. The current will only flow through the LED activated. And it seems
that the order of the LED and resistor isn't important. That's good to know.

> If we allow for 10mA through each LED the common pin has to source and sink
> 40mA. According to the 16C5X data sheet in front of me the specification is
> sink 25mA and source 20mA. In addition to which there are limits on total
> currents for each port, and for the total device.

I'd pull the full 20ma through the currently activated LED.. It's only one
LED, not all 6 that turn on at once so there's no need to limit the current to
10 ma
>
> One way around this is to use the common pin to drive a pair of transistors
> but that increases the part count and we are still faced with a 40mA per
> port limitation. Perhaps someone has a better solution.

Correct. If brightness is a real problem (and in this application it isn't)
then each port pin would have to drive a transistor pair. But that raises
the next question: Can a transistor pair be tri-stated? If so how would you
do it?

Thanks for the reply,

BAJ

1996\06\06@212913 by Steve Hardy

flavicon
face
{Quote hidden}

A transistor buffer can be tristated using only one output port, providing
that the output leakage is insufficient to bias either transistor.  In the
case of leakage, beware that the following circuit divides the output
impedance by the transistor beta (approximately).

                  Vcc
                  /
          -------|NPN
         |        \
port -----|         +---- out
         |        /
         --------|PNP
                  \
                  GND

(Geez I hate ascii graphics).  The emitters are tied together.  The output
follows the state of the port (High, Low or hi-Z).  The only problem is that
to output is no longer that good old rail-to-rail CMOS swing.  Instead,
the output falls short of the supply by one Vbe. (about 0.6V).

The available current is the port current times the transistor beta; in
practise limited by the allowable transistor collector current - approx 500mA.

One question I have is whether the datasheet limitations for port current
may be exceeded if a reduced duty cycle is used.  E.g. for continuous
operation 25mA is OK, is 100mA OK for 25% duty cycle?  My guess is
probably not due to excessive voltage drop in the output drivers due to
FET channel resistance, however it would be interesting to experiment.

Regards,
SJH
Canberra, Australia

1996\06\07@104539 by Mark K Sullivan

flavicon
face
>A transistor buffer can be tristated using only one output port, providing
>that the output leakage is insufficient to bias either transistor.  In the
>case of leakage, beware that the following circuit divides the output
>impedance by the transistor beta (approximately).

Won't your circuit hold the port pin

1996\06\08@162506 by Dwayne Reid

flavicon
face
>                   Vcc
>                   /
>           -------|NPN
>          |        \
>port -----|--/\/\/-+---- out
>          |        /
>          --------|PNP
>                   \
>                   GND
>

>SJH
>Canberra, Australia
>

Steve - if you add a 10K resistor from bases to emitters, leakage becomes
MUCH less of a factor.

Dwayne

1996\06\09@072743 by David Knell

flavicon
face
[diagram snipped]

>Steve - if you add a 10K resistor from bases to emitters, leakage becomes
>MUCH less of a factor.

And, if the Vbe drop is a problem, you can swap the transistors over,
resulting in output swinging to the rails - Vce(sat) (typically 0.2-0.3V).

                    Vcc
                    /
           -------|PNP
           |        \
port -/\/\/ +        +---- out
           |        /
           --------|NPN
                    \
                    GND

This has a disadvantage that it can't be tristated & that both transistors
are turned on during switching, resulting in potentially large amounts
of current being drawn.

Rearranging like this:

                       Vcc
                 +--+-----
                 |  |
                 /  |
                 \  /
           --/\/\+-|PNP
           |        \
port -------+        +---- out
           |        /
           --/\/\+-|NPN
                 \  \
                 /  |
                 |  |  GND
                 +--+-----

with about a 5:1 ratio between the series resistors and the B-E
resistors ought to be OK for a 5V Vcc.  Your resistors need to
be large enough for the standing current drawn to be acceptable,
and small enough so that there's enough base drive to the transistors.

I guess that another worthwhile observation is that the PIC port
outputs cease to swing rail-rail as soon as you draw any current;
I think I remember measuring one at something like Vcc-0.4 V when
sourcing 4mA.  The original circuit adds a further 0.7V drop to this;
the one above should be generally oblivious to such things.

Dave
------------------------------------------------------------
David Knell
Tel: 01843 846558
Fax: 01843 846608
E-mail: RemoveMEdaveKILLspamspamdave-ltd.co.uk

1996\06\10@184335 by Dwayne Reid

flavicon
face
OUCH, Dave!

>And, if the Vbe drop is a problem, you can swap the transistors over,
>resulting in output swinging to the rails - Vce(sat) (typically 0.2-0.3V).
>
>                     Vcc
>                     /
>            -------|PNP
>            |        \
>port -/\/\/ +        +---- out
>            |        /
>            --------|NPN
>                     \
>                     GND
>

NO! NO!  BOTH transistors will immediately destroy themselves with VCC
anything above 2Vbe!  Note: each emitter-base junction is forward biased and
with the bases tied together, it doesn't matter what the port pin is doing!
Its crispy critter time!  Using individual base resistors is barely better
since stored charge means that both transistors will conduct during the
switching transition.

{Quote hidden}

This is somewhat better - but you will still have a problem during the
switching transition where both transistors are conducting at the same time.
This WILL cause an enormous current glitch on your power supply.

>
>I guess that another worthwhile observation is that the PIC port
>outputs cease to swing rail-rail as soon as you draw any current;
>I think I remember measuring one at something like Vcc-0.4 V when
>sourcing 4mA.  The original circuit adds a further 0.7V drop to this;
>the one above should be generally oblivious to such things.

The original circuit should swing to within about 0.8v since the current
drawn from the port pins is Io/beta - assuming typical 2n4401 / 2n4403
transistors with gain of about 100 at 200 mA - even at 200 mA output that is
only about 2 mA from the port pin.

If you modify your circuit to include some current limit, it will work without
collapsing your supply.

dwayne

1996\06\11@051224 by David Knell

flavicon
face
>OUCH, Dave!

[duff circuit snipped]

>NO! NO!  BOTH transistors will immediately destroy themselves with VCC
>anything above 2Vbe!  Note: each emitter-base junction is forward biased and
>with the bases tied together, it doesn't matter what the port pin is doing!
>Its crispy critter time!  Using individual base resistors is barely better
>since stored charge means that both transistors will conduct during the
>switching transition.

Err - I guess that's probably what I meant to draw.  I'll go and touch the
hot end of my soldering iron (that's the one with the metal point on, isn't
it?) with a finger to simulate the result of the above.

{Quote hidden}

Erm - will it?  With the port pin mid-rail (on its way up or down) both
transistors have a Vbe of about 0.4V & are therefore turned off, which is
the same state as with the port pin tri-stated.  Whether there is a period
when they both conduct will depend on the slew rate of the driving pin, the
amount of stored charge on the transistor's BE junction and the value of the
resistor between base and emitter.

Dave

'USART and LED dimming'
1996\06\28@091604 by Harrison Cooper

flavicon
face
Ya know, electrons are funny folks.  They come from all
sorts of places.  I was debugging a circuit that the test
tech just could not get to behave.  The thing would trigger
and run a timer, and as the timer ran the one of the LED's
would start to dim...hmmm, kinda like an RC circuit.  To make
a long story short, check to be sure you really do have Vss and
Vdd on the chip. It could be drawing power thru the serial link,
or who knows where else.  When you measure the supply, are you
really measuring on the chip, or just at the rails on the proto
board.  Speaking from experiance, its sometimes the real obvious
that you overlook (you just assume power is there).  It turned out
that the package driving the LEDs did not have Vdd connected (busted
trace _under_ the part).

1996\06\28@100358 by Scott Newell

flavicon
face
>Ya know, electrons are funny folks.  They come from all
>sorts of places.  I was debugging a circuit that the test
>tech just could not get to behave.  The thing would trigger
>and run a timer, and as the timer ran the one of the LED's
>would start to dim...hmmm, kinda like an RC circuit.  To make
>a long story short, check to be sure you really do have Vss and
>Vdd on the chip. It could be drawing power thru the serial link,
>or who knows where else.  When you measure the supply, are you
>really measuring on the chip, or just at the rails on the proto
>board.  Speaking from experiance, its sometimes the real obvious
>that you overlook (you just assume power is there).  It turned out
>that the package driving the LEDs did not have Vdd connected (busted
>trace _under_ the part).

Rechecked the supply, everything's ok at the rails and at the chip.

Thanks,
newell

1996\06\28@113613 by Harrison Cooper

flavicon
face
OK, voltage is OK, and remains stable assuming that you have
a hefty enough supply to keep the voltage at different loads.
Are you sinking or sourcing the LED's ?  If you have a scope,
can you look at the pins for the LED's and determine if the
dimming is caused by a current or strobe problem.  If its
current (meaning that the output does not oscillate), then
try buffering - you also mentioned that you are NOT putting
a series resistor.  You might also break the power circuit
and look at the current going to the PIC.  When you start
to exercise the part, such as during RS232 period, you might
be getting current spikes that may also be corrupting the
data.  Also check the supplies at the translator chip, or
even disconnect the translator and see how the LED's react.
Somehow, it needs to be narrowed down to hardware or software.

1996\06\28@122754 by Brian Read

flavicon
face
Hey Newell, do you have VCC and VSS tied to BOTH of
the VCC and VSS pins? This has burnt more than one
PIC'er. The internals are split up between the power
pins, so BOTH of the VCC and the VSS pins MUST be connected
to their respective rails.

Just a thought,
Brian

1996\06\28@165256 by Reginald Neale

flavicon
face
As others have mentioned, omitting series resistors for LED's is bad practice.
Just because the average supply voltage looks OK doesn't necessarily mean
much. Combination of LED's could be sucking the supply down for just a
microsecond at some particularly critical time. Make sure you've got
adequate filtering and bypassing right at the chip. Easy to tell if this is
part of the problem. Grab a suitable cap and just hold the leads on the
supply pins while it's operating.




.....................Reg Neale.....................
"Ignorance is a renewable resource"   P.J. O'Rourke


'High-Brightness LEDs'
1996\08\14@143407 by Christopher Zguris
picon face
As part of a PIC-based flasher project, I'm looking for high-brightness LEDs
in the 5000-7000 mcd range. Digi-Key and Mouser have 1640-2000 mcd, and
Jameco has a 7000 mcd, but I'm looking for sources in addition to Jameco
(cheaper, better, etc.). Quantities of around 100, at the moment. Any thoughts?

Chris

   ======================================================================
         Christopher Zguris  -  czgurisSTOPspamspamspam_OUTinterport.net  -  Uhhh, Ear?
                 1991 Honda VFR (Red, with red accessories)
            AMA, HSTA, CRV, HRCA, IVFROC, ex-Big Apple Vegetarian

                       BEAR RESISTANT FOOD CONTAINERS
      Made of high impact ABS plastic with stainless steel latches. The
       container is entirely flush and cannot be opened unless the bear
                         has a coin or screwdriver.
                              - CAMPMOR catalog
   ======================================================================

1996\08\14@160818 by Todd Peterson

picon face
At 02:33 PM 8/14/96 -0400, you wrote:
>As part of a PIC-based flasher project, I'm looking for high-brightness LEDs
>in the 5000-7000 mcd range. Digi-Key and Mouser have 1640-2000 mcd, and
>Jameco has a 7000 mcd, but I'm looking for sources in addition to Jameco
>(cheaper, better, etc.). Quantities of around 100, at the moment. Any thoughts?

Check out Marktech International Corp., (518)786-6591
Sorry, I don't know if they have a web site yet.

Todd Peterson, Computer Engineer   (spamBeGonetpetersonSTOPspamspamEraseMEnetins.net)
E-LAB Digital Engineering, Inc.

1932 Hwy. 20
P.O. Box 246
Lawton, IA 51030-0246
(712) 944-5344

Visit us at: http://www.netins.net/showcase/elab

1996\08\14@160943 by Paul Mathews

flavicon
face
Christopher Zguris wrote:
>
> As part of a PIC-based flasher project, I'm looking for high-brightness LEDs
> in the 5000-7000 mcd range. Digi-Key and Mouser have 1640-2000 mcd, and
> Jameco has a 7000 mcd, but I'm looking for sources in addition to Jameco
> (cheaper, better, etc.). Quantities of around 100, at the moment. Any
thoughts?
>
....


Currently, the very highest brightness red LEDs are made by Mitsubishi
Cable (800 262 6200), however, very good ones are offered by Marktech
(Toshiba, 518 786 6591), Sharp (800 642 0261), Siemens Opto (408 777
4968), Stanley (, and others.  Note that the brightness spec depends
strongly on coverage angle.  The easiest way to achieve a very high
brightness spec is to narrow the angle by means of a longer focal
length: brightness varies with the inverse square of coverage angle.
That's one reason why the jumbo packages achieve higher brightness: they
maintain low f# even with a longer FL.

Since you mention Digikey, I assume you're in USA, and the above are the
USA phone #s:


--

Paul Mathews, consulting engineer
AEngineering Co.
KILLspamoptoengspamBeGonespamwhidbey.com
non-contact sensing and optoelectronics specialists

1996\08\14@162225 by Mark K Sullivan

flavicon
face
Sharp and HP both have high brightness transparent substrate LEDs.  I have used
the Sharp and like them.  Warning: since the chip is "upside down" in the
package, the polarity may appear to be backwards to what you're used to.  This
is also true of the Marktech units.

- Mark Sullivan -

'PIC controlled freq generator'
1996\08\15@035248 by thoffman

picon face
OK, here's a good one:

I need to control an oscillator so that I can generate a frequency in
the range of 4-14MHz with a PIC. I'd really like to chop that range
into 256 or 65536 different freqs that can be controlled by shifting a
word into a shift register.

I hear some people shouting "A/D and VCO!", however, I need this guy
to be ROCK SOLID. As in no temperature drift (or very little). I'm
afraid that a VCO might not give me the stability... or will it? I've
rarely ventured out into the world of analog electronics.

Is there an off the shelf solution? I'd like 1 chip that I could hang
a crystal on and give it a digital number and have it output the
desired frquency. A simple divider won't work since I need the range
to be split up in even increments.

Any help will be much appreciated.
Tim

1996\08\15@120151 by Rick Sherman

flavicon
face
Tim Hoffman writes:
>
> OK, here's a good one:
>
> I need to control an oscillator so that I can generate a frequency in
> the range of 4-14MHz with a PIC. I'd really like to chop that range
> into 256 or 65536 different freqs that can be controlled by shifting a
> word into a shift register.
>
Take a look at the Fox F6053A it's a programmable ttl oscillator.
It can be programmed to work from 360khz to 120 Mhz. It's not cheap at
about $18-$20.



--
*==========================================================================*
* Rick Sherman                  * Virtual Computer Corporation
* EraseMErickspamEraseMEvcc.com                  * The Reconfigurable Computer Company.
* 818-342-8295                  *
*==========================================================================*

1996\08\15@144124 by Martin J. Maney

flavicon
face
On Thu, 15 Aug 1996, Tim Hoffman wrote:

> I need to control an oscillator so that I can generate a frequency in
> the range of 4-14MHz with a PIC. I'd really like to chop that range
> into 256 or 65536 different freqs that can be controlled by shifting a
> word into a shift register.
>
> I hear some people shouting "A/D and VCO!", however, I need this guy
> to be ROCK SOLID. As in no temperature drift (or very little). I'm
> afraid that a VCO might not give me the stability... or will it? I've
> rarely ventured out into the world of analog electronics.

Iwould expect it to be problematical to get a VCO with a wide range and
really good stability.  My first thought would be to use a VCO controlled
by a crystal-refenced PLL: you put the programmable divider between the
VCO output and the PLL input and you get an output frequency of n * Fref.

> Is there an off the shelf solution? I'd like 1 chip that I could hang
> a crystal on and give it a digital number and have it output the
> desired frquency. A simple divider won't work since I need the range
> to be split up in even increments.

I'm not familiar with what's available in this range these days.  Last
time I saw something like this it was about a half-dozen TTL chips plus a
handful of discrete parts, but that was a good many years ago.

Happy hunting!

1996\08\15@153005 by Mike Riendeau

flavicon
face
On Thu, 15 Aug 1996, Tim Hoffman wrote:

> I need to control an oscillator so that I can generate a frequency in
> the range of 4-14MHz with a PIC. I'd really like to chop that range
> into 256 or 65536 different freqs that can be controlled by shifting a
> word into a shift register.
>
> I hear some people shouting "A/D and VCO!", however, I need this guy
> to be ROCK SOLID. As in no temperature drift (or very little). I'm
> afraid that a VCO might not give me the stability... or will it? I've
> rarely ventured out into the world of analog electronics.

I think you need a PLL for solid stability. Motorola has a vast
selection of serial/parallel PLL synthesizer ICs in thier
communications data book for very reasonable prices.

Motorola's app. note ANE416 describing a radio synthesizer using the
MC68HC05B4 controller will give you a good idea of how to use these
chips. My article in the 20-Nov-95 issue of Electronic Design has
a very simple V-F converter which could perhaps be adapted to your
application with the appropriate selection of parts.

                                 Mike

'Bright LEDs'
1996\08\15@182350 by Jon Bertrand

flavicon
face
    People around here call me the LED junkie.

    Toshiba makes 18000mcd orange/red LEDs (20mA @ 2.4V) that will blow
    your eyeballs out of your head if you look at them.

    They are clear.  I don't recall what they cost.  Marktech sells them
    in the U.S.

    Toshiba also has a nice green LED at 8000 mcd - looks good  :)


    If you need the part numbers and phone numbers I can get them for you
    Monday.  Let me know.

    Jon Bertrand
    @spam@jonb@spam@spamspam_OUTcirris.com

'IR leds for remote ctrl'
1996\08\15@183441 by engmessi

flavicon
face
Hello, friends.

I am trying to find a good IR led (and receiver, also) for remote control
purposes. I heard about the TIL38, with a switched current of 2A (10
microsecond pulses, 1 millisecond frame) or 100 mA continuous. I could not
find these here in Brazil, though.

I am sure some of you have already dealt with these components and know
other options, as well as a good receiver and some good tips.

Which makes the best detector, a phototransistor or an infrared sensor
(those mounted in a smoked case) ?

The application is a 'too close' sensor. I want to oscillate the led and PIC
the reflected beam, reflected by a 'clear' (skin color) surface. I want a
range around 8 to 10 inches. Do you think I will have to use extra lenses ?

Thanks,


Pedro.


______________________________________________________
Pedro Drummond
Engenharia Mestra de Sistemas / SP / Brasil
Voice: 55-11-883.4799   Fax: 55-11-883.4926
e-mail: spamBeGonemestraspamKILLspamu-netsys.com.br
______________________________________________________

1996\08\15@200214 by Steve Hardy

flavicon
face
> From: Engenharia Mestra de Sistemas Sociedade Ltda
>               <.....mestraspam_OUTspamu-netsys.com.br>
>
> Hello, friends.
>
> I am trying to find a good IR led (and receiver, also) for remote control
> purposes. I heard about the TIL38, with a switched current of 2A (10
> microsecond pulses, 1 millisecond frame) or 100 mA continuous. I could not
> find these here in Brazil, though.
>
> I am sure some of you have already dealt with these components and know
> other options, as well as a good receiver and some good tips.
>
> Which makes the best detector, a phototransistor or an infrared sensor
> (those mounted in a smoked case) ?
>
> The application is a 'too close' sensor. I want to oscillate the led and PIC
> the reflected beam, reflected by a 'clear' (skin color) surface. I want a
> range around 8 to 10 inches. Do you think I will have to use extra lenses ?

For this application, there is no need to go to such lengths.  Unless
you want a high bandwidth for comms purposes, use a standard IR remote
control receiver module.  These are 3-pin devices which look a bit like
a TO-220 package without the heatsink.  They run off 5V and output a
TTL level signal.

Any IR LED can be used (preferably about 900nm wavelength).  This
should be modulated at 38-40KHz, in bursts lasting about 1ms.  If using
a PIC, this can be programmed to directly drive the LED (including the
40KHz modulation) as well as read the signal from the detector, where
it looks for a correlation.  Since you are only interested in a range
of 20-25cm, the LED can be driven directly from a PIC pin with a series
resistor.  I have used this approach many a time and it works a charm.
The detection threshhold is adjusted by varying the series resistor.

One thing I learnt early on is that the receiver, being very sensitive,
is susceptible to electrical interference.  Make sure it is well
shielded from the LED and other (relatively) high current PCB traces.
Use decoupling capacitors.  Make sure that the receiver is shielded
from direct line-of-sight to the LED.  The LED should be enclosed in an
opaque container with an aperture at the front.

The advantage of using an IR module is that it is much less susceptible
to ambient conditions (e.g. fluorescent lights) than rigging your own
using a photodiode.  The overall system cost should be lower.

Regards,
SJH
Canberra, Australia


PS:  The detector does not respond instantaneously to the IR signal.
In general, the delay is longer for a weaker signal.  By implementing
a timing function, it may be possible to estimate a range.  This would
help implement a bit of hysteresis if so desired.

1996\08\15@211954 by Paul Mathews

flavicon
face
Engenharia Mestra de Sistemas Sociedade Ltda wrote:
{Quote hidden}

One good source is Siemens:

T1-3/4 (5 mm bullet pkg) IR LEDs:
-------------------------------------------------------------
Hi power AlGaAs (880nm)         SFH484-2 and similar P/Ns
Hi power GaAs (940nm)           SFH415-U

The GaAs parts tend to have faster rise and falltimes.

Most IR LEDs will handle short pulses (microseconds) at currents up to
about 2 Amps provided that average current is within ratings.  Be
careful that your drive waveform never puts out long pulses, though.

For photodiodes, the world's most popular P/N is probably BPW34F, which
is an  IR filter 2 pin DIP.  For a lenses photodiode, consider the
SFH203 range, which has various suffixes depending on angular coverage
and filtering.

If you want to work with an integrated module, have a look at the
Hamamatsu S3599 or the Sharp IS471F.  These 4 pin devices require only
an external bypass capacitor, a resistor, and an LED to make a
modulated, EMI/RFI immune, sunlight immune sensor.  The unlensed
versions are quite cheap. To achieve your desired range, you can either
add a simple lens or boost the current drive to the LED with an external
transistor.

You can email me with further questions.
--

Paul Mathews, consulting engineer
AEngineering Co.
TakeThisOuToptoengKILLspamspamspamwhidbey.com
non-contact sensing and optoelectronics specialists

1996\08\15@215153 by EVAN CRANNA

flavicon
face
Hello Paul, I noticed your reply and you are obviously quite
knowledgable on the topic of IR control.  I have been trying to put
together a simple application using IR to control 24 volts in in 1 volt
increments from 0 to 24 volts max. I have been trying to use a Universal
type Remote transmitter (Mitsubishi mode) and a Sony SBX-1610-52-2j2 on
the receiver side. So far I have had zero luck. Have you ever used a
PIC16C84 in a similar application. ? Would you have any pointers in
the PIC code. ?

Any help would be appreciated, Thx
                               Evan

1996\08\15@222809 by Paul Haas

flavicon
face
On Thu, 15 Aug 1996, Engenharia Mestra de Sistemas Sociedade Ltda wrote:

> The application is a 'too close' sensor. I want to oscillate the led and PIC
> the reflected beam, reflected by a 'clear' (skin color) surface. I want a
> range around 8 to 10 inches. Do you think I will have to use extra lenses ?

I made something similar.  I used a PIC to modulate an IR LED at 40Khz and a
Sharp IR reciever (GPU(something)-X, sorry don't remember the part number).
It had a range of 6 inches with sunlight shining onto the wall, and 18 feet
with the blinds drawn.  It didn't work at all in my work room, because the
high efficiency lights are also high frequency lights.

If you control the lighting, then IR can work for you.  If the lighting isn't
under your control, use a different technology.  Under constant lighting
conditions, I could control the range by changing the current limiting
resistor.

--
Paul Haas
.....paulhspamRemoveMEhamjudo.com

1996\08\16@005256 by Paul Mathews

flavicon
face
Paul Haas wrote:
> I used a PIC to modulate an IR LED at 40Khz and a
> Sharp IR reciever (GPU(something)-X, sorry don't remember the part number).
> It had a range of 6 inches with sunlight shining onto the wall, and 18 feet
> with the blinds drawn.  It didn't work at all in my work room, because the
> high efficiency lights are also high frequency lights.
>
> If you control the lighting, then IR can work for you.  If the lighting isn't
> under your control, use a different technology.

I must comment on this response to the original query.

First, TV remote control IR links are not designed to operate in strong
light.  Their designers make the reasonable assumptions that: a) people
don't usually watch TV in strong light, and b) if you don't manage to
get the device to work, you will refine your aim and try again.

So, don't be surprised that they don't work as well in strong light.

On the other hand, it's fairly easy to design an active IR sensor that
works fine in an arbitrary amount of ambient light.  I've designed
sensors that work well in 1 million lux of ambient, without any change
in range from total darkness, with white target ranges up to 40 metres.
The 'secrets' are: directional optics, low impedance photodiode loading,
bandpass preamplification, and effective modulation/demodulation
(generally NOT with the square waves used in IR controls).  Proper
synchronous demodulation techniques can easily determine signal
presence/absence in SNRs worse than -40db.  The Hamamatsu S3599 chip
mentioned earlier is simple and cheap, has a 300nW threshold, and shows
no range reduction at 80,000 lux.  The addition of a single lens reduces
its field of view, and raises its ambient light tolerance, while
increasing its sensitivity.

Finally, I take issue with what I perceive to be the nature of the
reply, which I'll paraphrase thusly:  I tried this and couldn't make it
work, so there's no use in your trying.  It seems to me that the best
new ideas come from people who don't know that they "can't".

--

Paul Mathews, consulting engineer
AEngineering Co.
RemoveMEoptoengspamspamBeGonewhidbey.com
non-contact sensing and optoelectronics specialists

1996\08\16@005920 by Steve Childress

flavicon
face
Regarding...

If you want to work with an integrated module, have a look at the
Hamamatsu S3599 or the Sharp IS471F.  These 4 pin devices require only
an external bypass capacitor, a resistor, and an LED to make a
modulated, EMI/RFI immune, sunlight immune sensor.  The unlensed
versions are quite cheap. To achieve your desired range, you can either
add a simple lens or boost the current drive to the LED with an external
transistor.

You can email me with further questions.
--

Paul Mathews, consulting engineer
AEngineering Co.
spamBeGoneoptoeng@spam@spamspam_OUTwhidbey.com
non-contact sensing and optoelectronics specialists



I've not seen the "lensed" IR demodulatators - any pointers to a distributor?

1996\08\16@013510 by Paul Mathews

flavicon
face
Steve Childress wrote:
{Quote hidden}

The P/N for the lenses metal can version is:  S4282-72

I've always dealt directly with Hamamatsu.
Hamamatsu USA phone 908 231 0960
They're on the WWW via IndustryNet, and they have an email address
listed there.
--

Paul Mathews, consulting engineer
AEngineering Co.
optoengEraseMEspamwhidbey.com
non-contact sensing and optoelectronics specialists

'PIC controlled freq generator'
1996\08\16@212203 by Mr. Brooke Clarke

flavicon
face
Tim Hoffman wrote:
>
> OK, here's a good one:
>
> I need to control an oscillator so that I can generate a frequency in
> the range of 4-14MHz with a PIC. ..........
>
> Is there an off the shelf solution? I'd like 1 chip that I could hang
> a crystal on and give it a digital number and have it output the
> desired frquency......

Tim:

You might want to look into the Harris 45102 Numercially Controled Oscillator.
This NCO has 32 bits of frequency control but you could tie the unused ones to
ground if you only want 16 bits of control.  The input frequency can be up to
33 MHz on the low cost part and the output frequency varies as (input
word)/2^32.

See the January 1995 issue of electronics now for more info.

Have Fun,
Brooke


'LED mvong message.'
1996\10\28@012257 by Werner Terreblanche
flavicon
face
Andres


>I'm working on a project that's quite long (about 10K lines of code)
>for a moving-message-LED-display controlled by a 16C73 that has a lot
>of features. It's working nicely and it's almost finished.

Hmm.... I found this quite interesting.  I also made a number of
moving message displays a couple of years ago based on the PIC16C57.
(On those days the fancier models like the 16C73 did not exist yet.)

Even though the moving message display worked very well and ran very
smoothly, at the end of that project I was sorry that I didn't rather
use a bigger micro like the 8051 or something that I could program in
a high level language like C.   The PIC16C57 that I used was filled
to the brim with code and there was no more room for future expansion
and that eventually killed the project as far as I was concerned.

But I suppose the 16C73 is a far better choice than the 16C57 and at
least you get some fancy C compilers for the PIC microcontrollers
these days.     Best of luck with your project!

Regards

Werner

--
Werner Terreblanche   Tel +27 21 7102251   Fax +27 21 721278
RemoveMEwterrebEraseMEspamspam_OUTplessey.co.za (work) OR @spam@wernerRemoveMEspamEraseMEaztec.co.za  (home)

1996\10\30@012333 by Andres Djordjalian

flavicon
face
Hi Werner!

> Hmm.... I found this quite interesting.  I also made a number of
> moving message displays a couple of years ago based on the PIC16C57.
> (On those days the fancier models like the 16C73 did not exist yet.)
>....................
> But I suppose the 16C73 is a far better choice than the 16C57 and at
> least you get some fancy C compilers for the PIC microcontrollers
> these days.

I also started this project using a 16C57, but it soon proved too small
for what I had in mind. I could make it display text but it seemed
almost impossible to add the other features that where needed. If you were
able to complete a display controlled by a 16C57 I congratulate you!  The
16C73 is much more powerful, and now there is the 17C44 also, although it
could be cheaper!

I still can't say if it would had been better to use another micro. What I
like of PICs is their small package and speed. I needed speed for what I
had in mind, and I wanted to minimize costs and PCB complexity.

And also I guess the 4K-word ROM on the 16C73 is equivalent to almost 10K
bytes on another micro, and more if it's programmed with a HLL, so unless
there is a 16K or 32K ROM microcontroller that is cheap and fast I think
the 16C73 might be a good choice... But thanks for your comment!

>Best of luck with your project!

Thanks! Regards,
                                                       Andres

1996\10\31@040427 by Werner Terreblanche

flavicon
face
Andres Djordjalian <EraseMEaajordjspam@spam@ALEPH.FI.UBA.AR> wrote:


>I also started this project using a 16C57, but it soon proved too
>small for what I had in mind. I could make it display text but it
>seemed almost impossible to add the other features that where needed.
>If you were able to complete a display controlled by a 16C57 I
>congratulate you!

Thank you.  I won't tell you how long it took me develop that. :(
I also had  to implement 9600 baud  serial communications all with
this one PIC1657.  And this was still in the dark ages before
Internet, so I didn't have any application notes or a Piclist to
consult.  <grin>

>I still can't say if it would had been better to use another micro.
>What I like of PICs is their small package and speed. I needed speed
>for what I had in mind, and I wanted to minimize costs and PCB
>complexity.

Well, you get the 8051 devices also in very high speed models.  I
know a guy here who makes gigantic big graphical LED displays, and he only
uses the fast 8051 devices.   So speed is not really a problem
anymore for these devices, but ROM considerations and development
tools and compilers certainly is.  If you feel that you are more
confident with the PIC microcontrollers then that is certainly the
right way to go.


>And also I guess the 4K-word ROM on the 16C73 is equivalent to almost
>10K bytes on another micro, and more if it's programmed with a HLL, so
>unless there is a 16K or 32K ROM microcontroller that is cheap and
>fast I think the 16C73 might be a good choice... But thanks for your
>comment!

The only problem is that they are all one time programmable.  (Except
for the PIC16C84, but that one is too small for your application.)   I really
like the
Atmel devices, because they are cheap, multi programmable and low on
power consumption.  However, that is just my personal opinion.  I
have gone through this same process once before and if I have to do
it all over again, I would rather use the Atmel 89CXX processors.

--
Werner Terreblanche   Tel +27 21 7102251   Fax +27 21 721278
@spam@wterrebspam_OUTspam.....plessey.co.za (work) OR spamBeGonewernerEraseMEspamaztec.co.za  (home)


'LED mvong message.'
1996\11\02@101848 by Gerhard Fiedler
flavicon
face
At 02:22 30/10/96 GMT, Andres Djordjalian wrote:
>And also I guess the 4K-word ROM on the 16C73 is equivalent to almost 10K
>bytes on another micro, and more if it's programmed with a HLL, ...

What makes me wonder with such comparisons: 4k 16bit words already _equals_
8k with no added efficiency involved, so the 10k _bytes_ on another micro is
not too far off the 8k _bytes_ which is 4k words... Seems the microchip did
a good marketing trick to introduce 16bit _words_ as the base of their
codes: one of the big arguments is that all instructions are 1 word == 16bit
wide (on the bigger ones) -- but the average instruction in a typical 8031
code is way smaller than 2 bytes, as there usually are few with more than 2
bytes, but some with only 1. They just cannot claim that it is _one_ something.

1996\11\02@161937 by John Payson

picon face
> At 02:22 30/10/96 GMT, Andres Djordjalian wrote:
> >And also I guess the 4K-word ROM on the 16C73 is equivalent to almost 10K
> >bytes on another micro, and more if it's programmed with a HLL, ...
>
> What makes me wonder with such comparisons: 4k 16bit words already _equals_
> 8k with no added efficiency involved, so the 10k _bytes_ on another micro is
> not too far off the 8k _bytes_ which is 4k words...

Most PICs use 14-bit words; 4K words equals 7KBytes, not 8K.

>                                                      Seems the microchip did
> a good marketing trick to introduce 16bit _words_ as the base of their
> codes: one of the big arguments is that all instructions are 1 word == 16bit
> wide (on the bigger ones) -- but the average instruction in a typical 8031
> code is way smaller than 2 bytes, as there usually are few with more than 2
> bytes, but some with only 1. They just cannot claim that it is _one_
something.

Unless the author of the 8x51 code was space-concious, most opcodes used IN
PRACTICE are likely to be two bytes.  Further, let's look at some simple
code samples:

; Goal: add one variable to another (e.g. X=X+Y).  Assume both #'s are 8-bits
; PIC runs 4MHz; 8x51 runs at 12MHz

;PIC: 28 bits, 2us
       movf    Y,w
       addwf   X,f
;8x51 version 1: 24 bits, 3us [assuming X is in R1 and Y is in R2]
       mov     A,R1
       add     A,R2
       mov     R1,a
;8x51 version 2: 48 bits, 3us [assuming X and Y are in memory]
       mov     a,X
       add     a,Y
       mov     X,a

; Goal: as above, but 16-bit numbers.

;PIC: 84 bits, 6us
       movf    YL,w
       addwf   XL,f
       movf    YH,w
       btfsc   C
        incfsz YH,w
        addwf  XH,f
;8x51 version 1: 48 bits, 6us [assuming X is R1:R2 and Y is R3:R4]
       mov     A,R2
       add     A,R4
       mov     R2,A
       mov     A,R1
       addc    A,r3
       mov     R1,A
;8x51 version 2: 96 bits, 6us [assuming X and Y are in memory]
       mov     A,XL
       add     A,YL
       mov     A,XL
       mov     A,XH
       addc    A,YH
       mov     XH,A

;Goal: copy bit B1 to bit B2

;PIC version: 42 bits, 3us
       bcf     B2
       btfsc   B1
        bsf    B2
;8x51 version: 32 bits, 3us
       mov     C,B1
       mov     B2,C

;Goal: test a bit and branch

;PIC version: 28 bits, 2 or 3 us
       btfsc   Bit
        goto   Wherever
;8x51 version: 24 bits, 2us
       jb      Bit,Wherever

; Goal: test a bit and clear another memory location if it's set

;PIC version: 28 bits, 2us
       btfsc   Bit
       clrf    MemLoc
;8x51 version: 48 bits, 2 or 4 us
       jnb     Bit,Nope
       mov     MemLoc,#0
Nope:

;Goal: loop on a variable

;PIC version: 28 bits, 3us
       decfsz  Var,f
        goto   Loop
;8x51 version 1: 16 bits, 2us [loop control in R1]
       djnz    R1,Loop
;8x51 version 2: 24 bits, 2us [loop control in memory]
       djnz    Var,Loop

Most of these code samples represent things the 8x51 does quite well; as a
result, the PIC does not quite win out on a number-of-bits metric in many
cases, but comes very close.  In cases where it's often necessary to do
"simple" things in consequence of bits tests, the PIC may win out because
of it's "btfsx" instructions; in other cases, the 8x51 wins out.  On the
other hand, the PIC has an easy 5x speed boost available whereas the 8x51
generally does not.

1996\11\02@190333 by William Chops Westfield

face picon face
   ;8x51 version 1: 48 bits, 6us [assuming X is R1:R2 and Y is R3:R4]
           mov     A,R2
           add     A,R4
           mov     R2,A
           mov     A,R1
           addc    A,r3
           mov     R1,A
   ;8x51 version 2: 96 bits, 6us [assuming X and Y are in memory]
           mov     A,XL
           add     A,YL
           mov     A,XL
           mov     A,XH
           addc    A,YH
           mov     XH,A

Not to detract from your conclusions, but aren't you leaving out "effective
address fetch time" or something?  I have a hard time believing that any
processor can fetch twice as many bytes in its instruction stream and
maintain the same execution time...

BillW

'words vs. bytes (was Re: LED mvong message.)'
1996\11\02@201717 by Eric Smith

flavicon
face
BillW wrote:
> Not to detract from your conclusions, but aren't you leaving out "effective
> address fetch time" or something?  I have a hard time believing that any
> processor can fetch twice as many bytes in its instruction stream and
> maintain the same execution time...

Not sure about the 8051, but that is common on other processors.  On the
6502, many one and two byte instructions have the same execution time
(two cycles).

Eric

'LED mvong message.'
1996\11\02@203553 by fastfwd

face
flavicon
face
William Chops Westfield <PICLISTspamBeGonespamMITVMA.MIT.EDU> wrote:

> I have a hard time believing that any processor can fetch twice as
> many bytes in its instruction stream and maintain the same
> execution time...

What you're missing, Bill, is that it's very easy to go the OTHER
way... That is, to fetch HALF as many bytes in the same time.

Look at it from that perspective, and remember that the 8051 has an
internal divide-by-12 on its clock, and you'll see that all that's
happening is that the short instructions are executing much slower
than they absolutely have to.

-Andy

Andrew Warren - RemoveMEfastfwd@spam@spamspamBeGoneix.netcom.com
Fast Forward Engineering, Vista, California
http://www.geocities.com/SiliconValley/2499

1996\11\03@114836 by Gerhard Fiedler

flavicon
face
At 15:09 02/11/96 -0600, John Payson wrote:
>> At 02:22 30/10/96 GMT, Andres Djordjalian wrote:
>> >And also I guess the 4K-word ROM on the 16C73 is equivalent to almost 10K
>> >bytes on another micro, and more if it's programmed with a HLL, ...
>>
>> What makes me wonder with such comparisons: 4k 16bit words already _equals_
>> 8k with no added efficiency involved, so the 10k _bytes_ on another micro is
>> not too far off the 8k _bytes_ which is 4k words...
>
>Unless the author of the 8x51 code was space-concious, most opcodes used IN
>PRACTICE are likely to be two bytes.  Further, let's look at some simple
>code samples:

Thanks for the instructive samples. You're obviously right about the
possible speed boost, you'd have to use Dallas or some of the other newer
40MHz types to speed the 8031 up a bit. But they show also that the bit
count is not too far off, and the differences seem to be well within
differences of implementation (of the same solution by different
programmers...).

1996\11\03@114839 by Gerhard Fiedler

flavicon
face
At 16:02 02/11/96 PST, William Chops Westfield wrote:
>    ;8x51 version 1: 48 bits, 6us [assuming X is R1:R2 and Y is R3:R4]
>      ...
>    ;8x51 version 2: 96 bits, 6us [assuming X and Y are in memory]
>      ...
>
>Not to detract from your conclusions, but aren't you leaving out "effective
>address fetch time" or something?  I have a hard time believing that any
>processor can fetch twice as many bytes in its instruction stream and
>maintain the same execution time...

The examples were for a 8031 running @ 12MHz and a PIC running @ 4MHz. Does
this make your time less hard?

1996\11\03@164342 by John Payson

picon face
> At 16:02 02/11/96 PST, William Chops Westfield wrote:
> >    ;8x51 version 1: 48 bits, 6us [assuming X is R1:R2 and Y is R3:R4]
> >      ...
> >    ;8x51 version 2: 96 bits, 6us [assuming X and Y are in memory]
> >      ...
> >
> >Not to detract from your conclusions, but aren't you leaving out "effective
> >address fetch time" or something?  I have a hard time believing that any
> >processor can fetch twice as many bytes in its instruction stream and
> >maintain the same execution time...

One instruction cycle on the 8x51 is 12 clocks.  During this time, the MPU may
fetch
one or two bytes of code.  One of the reasons code density on the 8x51 is often
fairly
low is that many programmers don't bother to code for registers when
memory-based code

> The examples were for a 8031 running @ 12MHz and a PIC running @ 4MHz. Does
> this make your time less hard?

The most common speeds for an 8x51 are 12.0 and 11.0592MHz, though they are
available
in versions up to 40MHz.  The most common speeds for PICs are 4.0 and 3.579MHz
though
they are available up to 20MHz.  As a result, I thought the comparison
reasonable (I
personally prefer PICs, btw) even though 20MHz PICs are more common than 40MHz
8x51's.

1996\11\03@210816 by Dwayne Reid

flavicon
face
>At 02:22 30/10/96 GMT, Andres Djordjalian wrote:
>>And also I guess the 4K-word ROM on the 16C73 is equivalent to almost 10K
>>bytes on another micro, and more if it's programmed with a HLL, ...
>
>What makes me wonder with such comparisons: 4k 16bit words already _equals_
>8k with no added efficiency involved, so the 10k _bytes_ on another micro is
>not too far off the 8k _bytes_ which is 4k words... Seems the microchip did
>a good marketing trick to introduce 16bit _words_ as the base of their
>codes: one of the big arguments is that all instructions are 1 word == 16bit
>wide (on the bigger ones) -- but the average instruction in a typical 8031
>code is way smaller than 2 bytes, as there usually are few with more than 2
>bytes, but some with only 1. They just cannot claim that it is _one_ something.
>

Actually, the word size on a 16Cxx PIC is 14 bits.  But I think that you
miss the point about the word size.  Lets consider a 68hc11.  There are
three ways to address something, depending upon how far away that something
is from where you are right now.  Short jumps (+- 127 bytes) take a single
code space, longer jumps take two or three code spaces.  Since the PIC uses
a 13 bit address, these jumps usually (PCLATH problems notwithstanding) take
only ONE code space.

I have found that rewriting some of my old 'hc11 stuff into PIC format
really does result in a 2 to 3 times reduction in code size.  Part of that
is experience (I am a better programmer now than I was 5 years ago, part of
that is the PIC instruction set (it is possible to do certain things in a
much more elegant manner), and part is the inherent reduction possible
because of the longer word size.

Dwayne

'words vs. bytes (was Re: LED mvong message.)'
1996\11\05@152505 by Matthew Mucker

flavicon
face
>Not sure about the 8051, but that is common on other processors.  On the
>6502, many one and two byte instructions have the same execution time
>(two cycles).

WOW!!! Someone else remembers the 6502!?  Ah, the days of the VIC20...


 "DOS Computers manufactured by companies such as IBM, Compaq, Tandy, and
millions of others are by far the most popular, with about 70 million
machines in use wordwide. Macintosh fans, on the other hand, may note that
cockroaches are far more numerous than humans, and that numbers alone do
not denote a higher life form."

1996\11\05@205802 by Martin J. Maney

picon face
On Tue, 5 Nov 1996, Matthew Mucker wrote:

> WOW!!! Someone else remembers the 6502!?  Ah, the days of the VIC20...

I can't resist mentioning that I have a 6501 lurking in a dusty drawer.
:-)

1996\11\05@211035 by Eric Smith

flavicon
face
"Martin J. Maney" <.....maney@spam@spamEraseMEMCS.NET> wrote:
> I can't resist mentioning that I have a 6501 lurking in a dusty drawer.

I've got a 6501.  And a 6502 that is early enough that it doesn't have the
ROR instruction, which was added in September of 1975.

But I've rewritten most of the embedded system code I originally wrote for the
6502 and the Mitsubishi 8-bit parts (6502-like) to run on the PIC.

Cheers,
Eric

1996\11\06@112231 by myke predko

flavicon
face
>I've got a 6501.  And a 6502 that is early enough that it doesn't have the
>ROR instruction, which was added in September of 1975.

And I thought I was proud because I have the second 386sx built by Intel in
my drawer!

myke

Avoiding precedents does not mean nothing should ever be done.  It only
means that nothing should ever be done for the first time - Sir Humphrey
Appleby K.C.B.

'LED matrix multiplexing'
1996\11\10@174111 by Zhahai Stewart

flavicon
face
I am considering building a small LED matrix sign, probably
using 12 stackable 8x8 LED matrix blocks (approx 2"x2").  This
would produce a display surface of 8 rows each 96 wide - enough
for 16 chars of 5x8 with one space between.  (One use would be
a Caller ID I could read at night with my glasses off :-)

How is this generally done?  If I did 8 way multiplexing, with
20 ma current per LED, this would mean about 2 amps draw.  This
could be done with 96 high side drivers sourcing 20 ma each,
96 current limiting resisters, and 8 low side drivers sinking
about 2 amps each (fairly hefty).  Or reverse this, and have 96
low side drivers (at this current, could be PICs directly) and
8 x 2 amp high side drivers.  OR I could split up the common side,
into, say, 3 groups of 4 matrix blocks, each with it's own driver
(to keep the current in the shared driver down) - but this would mean
24 common side drivers (plus 96 on the other side).  Is there a
preferred architecture?

Questions:

Is 1/8 duty cycle enough?

That would mean an average of 2.5 ma current for each lit
LED, which seems rather small; would I need higher current?
(50 ma/LED means 5 amp drivers!).

Is there a prefered direction for scanning, like top row to
bottom row (vs side to side within each 8x8 block)?

Other suggestions?
  Thanks, Zhahai


@ Zhahai Stewart       .....zhahaiRemoveMEspamhisys.com
@ A Meme Gardener      http://rainbow.rmii.com/~hisys/zhahai.html
@ Standard Disclaimer  YMMV - Your Maya May Vary

1996\11\10@200207 by Byron A Jeff

face picon face
>
> I am considering building a small LED matrix sign, probably
> using 12 stackable 8x8 LED matrix blocks (approx 2"x2").

I thought the whole display was 2x2 (i.e. small) but i realize that
is would be 8x96 and 2 feet long...

> This
> would produce a display surface of 8 rows each 96 wide - enough
> for 16 chars of 5x8 with one space between.  (One use would be
> a Caller ID I could read at night with my glasses off :-)

I want a nice lit display for a security panel. Unfortunately it's
a bit too big for my tastes. I'm looking for something like 5 5x7
elements that fit on a 14 pin DIP...

>
> How is this generally done?  If I did 8 way multiplexing, with
> 20 ma current per LED, this would mean about 2 amps draw.

Which is absolutely too much...

>  This
> could be done with 96 high side drivers sourcing 20 ma each,
> 96 current limiting resisters, and 8 low side drivers sinking
> about 2 amps each (fairly hefty).  Or reverse this, and have 96
> low side drivers (at this current, could be PICs directly) and
> 8 x 2 amp high side drivers.

Wait I'm missing something. Aren't these displays internally multiplexed?
Something along the lines of having 16 pins with all the anodes of a row
connected together and all the cathods of a column? It would neve occur
to me to try to drive all 96 bits at the same time. Think one column at
a time.



>OR I could split up the common side,
> into, say, 3 groups of 4 matrix blocks, each with it's own driver
> (to keep the current in the shared driver down) - but this would mean
> 24 common side drivers (plus 96 on the other side).  Is there a
> preferred architecture?

How I've done it lately is to light one column at a time. I usually
use a 7445 BCD to 1-10 decoder because each pin can drive 80 ma (which
would be 10ma per led. Then all you'd need is one 8x10ma driver for
all the columns and one 7445 for each 10 columns (i.e. 10 for your application)
Another possibility is to use something like the Allegro Semi drivers
which can suck up a 1/2 A per line as long as only one line is on...


>
> Questions:
>
> Is 1/8 duty cycle enough?

Certainly. A typical PIC could drive this display in the 100's of kHz range.
That's why I'm suggesting 1/96 duty cycle. You can really
>
> That would mean an average of 2.5 ma current for each lit
> LED, which seems rather small; would I need higher current?
> (50 ma/LED means 5 amp drivers!).

Consider how long it's going to take you to set up 96 lines I'd go for
the much smaller duty cycle at much higher current.

>
> Is there a prefered direction for scanning, like top row to
> bottom row (vs side to side within each 8x8 block)?

Doesn't matter as long as it's fast enough. Typically I do one column
at a time from left to right.
>
> Other suggestions?

Yup. Up the current, drop the duty cycle. Remember you'll need at a minimum
96 bytes of memory, so it'll limit the choice of pics you can use.

>    Thanks, Zhahai
>
>
> @ Zhahai Stewart       .....zhahaiSTOPspamspam@spam@hisys.com
> @ A Meme Gardener      http://rainbow.rmii.com/~hisys/zhahai.html
> @ Standard Disclaimer  YMMV - Your Maya May Vary
>

1996\11\10@210411 by Bob Blick

picon face
Zhahai writes:

>I am considering building a small LED matrix sign, probably

>How is this generally done?
>
>Is 1/8 duty cycle enough?
>
>Is there a prefered direction for scanning, like top row to
>bottom row (vs side to side within each 8x8 block)?
>

"Typical" moving signs are run at 1/7 duty cycle, so 1/8 is close enough. I
made a sign with 1/10 duty cycle and it works fine
(http://www.bobblick.com/bob/projects/sign2.html).

Most signs run bottom to top, which gives a somewhat "italic" look when the
text moves horizontally right to left.


Cheers, Bob

1996\11\11@015403 by Werner Terreblanche

flavicon
face
>I am considering building a small LED matrix sign, probably
>using 12 stackable 8x8 LED matrix blocks (approx 2"x2").  This
>would produce a display surface of 8 rows each 96 wide - enough
>for 16 chars of 5x8 with one space between.  (One use would be
>a Caller ID I could read at night with my glasses off :-)

>How is this generally done?  If I did 8 way multiplexing, with
>20 ma current per LED, this would mean about 2 amps draw.  This
>could be done with 96 high side drivers sourcing 20 ma each,
>96 current limiting resisters, and 8 low side drivers sinking
>about 2 amps each (fairly hefty).  Or reverse this, and have 96
>low side drivers (at this current, could be PICs directly) and
>8 x 2 amp high side drivers.  OR I could split up the common side,
>into, say, 3 groups of 4 matrix blocks, each with it's own driver (to
>keep the current in the shared driver down) - but this would mean 24
>common side drivers (plus 96 on the other side).  Is there a preferred
>architecture?

Zhahai

 I used to make LED displays like the one you describe.  Mine worked
as follows:

I used a row of 74HC164 shift registers, all connected in series so
that whatever you clock in at the first one, would eventually get to the
last one.  Then every shift register was buffered by a ULN2803
driver.   If your display is 96 leds wide, then you will need 12 x
74HC164's and 12 x ULN2803's.   There will also be 96 resistors to
limit the current to the LED's.

The eight rows of  96 LEDS are switched on as a whole row, by means
of one of eight TIP31 transistors.   My duty cycle for each row was
about  2mS per row.


>Is 1/8 duty cycle enough?

Depends on the birghtness that you need from your display.  Use only
good bright LED's, and it should not be a problem.

>Is there a prefered direction for scanning, like top row to
>bottom row (vs side to side within each 8x8 block)?

I found that my direction of scanning caused a slant of the font in a
particular direction.  I rather liked a forward slant in it.

Please feel free to ask any more question.  If you want, I can even
provide you with some of my old display boards to do your prototyping
on, but you will have to do the microprocessor part yourself.

Rgds
Werner



--
Werner Terreblanche   Tel +27 21 7102251   Fax +27 21 721278
wterrebEraseMEspam@spam@plessey.co.za (work) OR RemoveMEwernerspamspamBeGoneaztec.co.za  (home)

1996\11\11@025942 by Eric Smith

flavicon
face
Werner Terreblanche <spamBeGonewterrebKILLspamspam@spam@PLESSEY.CO.ZA> wrote:
>   I used to make LED displays like the one you describe.  Mine worked
> as follows:
>
> I used a row of 74HC164 shift registers, all connected in series so
> that whatever you clock in at the first one, would eventually get to the
> last one.  Then every shift register was buffered by a ULN2803
> driver.   If your display is 96 leds wide, then you will need 12 x
> 74HC164's and 12 x ULN2803's.   There will also be 96 resistors to
> limit the current to the LED's.

Note that Allegro (formerly Sprague) and other vendors of analog driver chips
such as the ULN2803 also make driver chips with integral shift registers.  I
don't have any part numbers handy, but I've used them in the past.  They
reduce package count, but I'm not sure whether or how much they reduce the
parts cost.

Cheers,
Eric

1996\11\11@111311 by Reginald Neale

flavicon
face
>Werner Terreblanche <wterrebspam_OUTspam@spam@PLESSEY.CO.ZA> wrote:
>>   I used to make LED displays like the one you describe.  Mine worked
>> as follows:
>>
>> I used a row of 74HC164 shift registers, all connected in series so
>> that whatever you clock in at the first one, would eventually get to the
>> last one.  Then every shift register was buffered by a ULN2803
>> driver.   If your display is 96 leds wide, then you will need 12 x
>> 74HC164's and 12 x ULN2803's.   There will also be 96 resistors to
>> limit the current to the LED's.
>

Eric Smith said:
>Note that Allegro (formerly Sprague) and other vendors of analog driver chips
>such as the ULN2803 also make driver chips with integral shift registers.  I
>don't have any part numbers handy, but I've used them in the past.  They
>reduce package count, but I'm not sure whether or how much they reduce the
>parts cost.
>
They can. The Allegro 5810 thru 5818 are serial drivers from 10 to 32 bits.
They can be cascaded. All outputs can simultaneously sink 25 ma and still
stay within total package dissipation limits. On the design where I used it
a year or so ago, the 5812 (20 bits) was USD $2.58 in qty 100.


.....................Reg Neale.....................
Complete text of the winning entry in a recent good-government essay contest:
"Good Government.  Gooooood Government.   Sit.    Stay."

1996\11\11@111523 by Matthew Mucker

flavicon
face
>I am considering building a small LED matrix sign, probably
>using 12 stackable 8x8 LED matrix blocks (approx 2"x2").  This
>would produce a display surface of 8 rows each 96 wide - enough
>for 16 chars of 5x8 with one space between.  (One use would be
>a Caller ID I could read at night with my glasses off :-)
>
>How is this generally done?  If I did 8 way multiplexing, with

Zhahai,

I am currently using a Maxim MAX7219 chip to drive five seven-gegment LED
displays in my project.  The 7219 handles the scanning for up to eight
displays. It interfaces to the uP via a three-wire serial interface, and
you can daisy-chain several of them by connecting DATA OUT of one to the
DATA IN pin of the next one.

These parts are designed for seven-segment displays, but could easily
handle the type of work you're describing.  Just spend a few minutes with
the data sheet.  I don't know what the price of these babies are, but I
think it's about $7.00US each, which may be a bit high.  On the other hand,
each chip handles 64 individual LEDs and has features like brightness
control built in, and external parts count is really low-- one resistor!!!


The part is PERFECT for my project, and has made life considerable easier
for me.  Whether or not it's right for you is something only you can
decide, but I thought I'd let you know it was out there.

-Matt


 "DOS Computers manufactured by companies such as IBM, Compaq, Tandy, and
millions of others are by far the most popular, with about 70 million
machines in use wordwide. Macintosh fans, on the other hand, may note that
cockroaches are far more numerous than humans, and that numbers alone do
not denote a higher life form."

1996\11\11@112143 by Byron A Jeff

face picon face
> Eric Smith said:
> >Note that Allegro (formerly Sprague) and other vendors of analog driver chips
> >such as the ULN2803 also make driver chips with integral shift registers.  I
> >don't have any part numbers handy, but I've used them in the past.  They
> >reduce package count, but I'm not sure whether or how much they reduce the
> >parts cost.
> >
> They can. The Allegro 5810 thru 5818 are serial drivers from 10 to 32 bits.
> They can be cascaded. All outputs can simultaneously sink 25 ma and still
> stay within total package dissipation limits. On the design where I used it
> a year or so ago, the 5812 (20 bits) was USD $2.58 in qty 100.

2 questions as I have a couple of these parts:

1) Is there an online data sheet for these?
2) Are there any suppliers in low quantities? Like less than 10.

BAJ

1996\11\11@122722 by hjmuller

flavicon
face
> Date:    Sun, 10 Nov 1996 16:35:27 -600
> From:    Zhahai Stewart <spamBeGonezhahai@spam@spamHISYS.COM>
> Subject: LED matrix multiplexing
>
> I am considering building a small LED matrix sign, probably
> using 12 stackable 8x8 LED matrix blocks (approx 2"x2").  This
> would produce a display surface of 8 rows each 96 wide - enough
> for 16 chars of 5x8 with one space between.  (One use would be
> a Caller ID I could read at night with my glasses off :-)
>
[part of message supressed]
{Quote hidden}

Hi Stewart:
                I suggest that you use the MAX7129  DIP24 (from MAXIM). This is
a
SERIALLY INTERFACED, 8-DIGIT LED DISPLAY DRIVER and you can get a free sample
from WWW.MAXIM-IC.COM or PHONE 1-800-998-8800.
               Do you have any information about CALL ID system that you
mention ? I'm interested in this class of information, and other user on the
list too. (Have you Technical Specifications about CALL-ID?
               Bye, Hugo




-------------------------------
Hugo J. Muller
E-mail:    spamBeGonehjmullerspam_OUTspamRemoveMEsatlink.com
Parana - Entre Rios - Argentina
-------------------------------

1996\11\11@165348 by Dwayne Reid

flavicon
face
  snip
>> I used a row of 74HC164 shift registers, all connected in series so
>> that whatever you clock in at the first one, would eventually get to the
>> last one.  Then every shift register was buffered by a ULN2803
>> driver.   If your display is 96 leds wide, then you will need 12 x
>> 74HC164's and 12 x ULN2803's.   There will also be 96 resistors to
>> limit the current to the LED's.
>
>Note that Allegro (formerly Sprague) and other vendors of analog driver chips
>such as the ULN2803 also make driver chips with integral shift registers.  I
>don't have any part numbers handy, but I've used them in the past.  They
>reduce package count, but I'm not sure whether or how much they reduce the
>parts cost.
snip

Eric: I currently use a Texas Instruments TPIC5B595 which is an 8 bit SR
with output latch driving 8 150 mA mosfet open drain drivers.  In hundreds,
they cost about $1.10 Canadian (maybe $0.80 US).  They have all the
advantages of 74hc595 but with much higher current (sinking only, tho).
Most of my projects use 4 or 6 of them chained in series (mixing in hc595 is
ok).

Dwayne

'LED matrix multiplexing (Correction !!!)'
1996\11\11@235223 by hjmuller

flavicon
face
[Supressed message)
Hi Stewart:
                I suggest that you use the MAX7219  DIP24 (from MAXIM). This is
a
SERIALLY INTERFACED, 8-DIGIT LED DISPLAY DRIVER and you can get a free sample
from WWW.MAXIM-IC.COM or PHONE 1-800-998-8800.
               Do you have any information about CALL ID system that you
mention ? I'm interested in this class of information, and other user on the
list too. (Have you Technical Specifications about CALL-ID?
               Bye, Hugo

Sorry, in the previous message i write MAX7129 while the correct part number
is MAX7219. Thanks to Matt.


-------------------------------
Hugo J. Muller
E-mail:    .....hjmullerspamRemoveMEsatlink.com
Parana - Entre Rios - Argentina
-------------------------------

1996\11\12@025049 by fastfwd

face
flavicon
face
I forget who started this thread, but here's a bit of advice...

Many people have suggested that the easiest/best way to multiplex all
those LEDs is with very high currents and very low duty cycles.

That's fine for the finished product, since each LED will only be
subjected to those very high currents for a short time.

While you're debugging your software, however, you should limit the
LED current to whatever value your LEDs can handle CONTINUOUSLY.  If
you're single-stepping your code through an emulator (or if there's a
bug in your code that prevents the multiplexing from working
properly), this'll keep you from burning out hundreds of LEDs.

-Andy

Andrew Warren - fastfwdspam@spam@ix.netcom.com
Fast Forward Engineering, Vista, California
http://www.geocities.com/SiliconValley/2499

1996\11\12@104136 by Zhahai Stewart

flavicon
face
> > I am considering building a small LED matrix sign, probably
> > using 12 stackable 8x8 LED matrix blocks (approx 2"x2").

> >  This
> > could be done with 96 high side drivers sourcing 20 ma each,
> > 96 current limiting resisters, and 8 low side drivers sinking
> > about 2 amps each (fairly hefty).  Or reverse this, and have 96
> > low side drivers (at this current, could be PICs directly) and 8 x
> > 2 amp high side drivers.
>
> Wait I'm missing something. Aren't these displays internally
> multiplexed?

No, I believe that the 64 LED's in each of the twelve blocks are
arranged in an 8x8 matrix.  16 pins.  8 are cathodes for columns,
8 are anodes for rows (also available vice versa).  To me
the obvious way to scan them is to power one anode (of 8) at a
time, while driving the appropriate subset of cathodes (depending
one which LEDs in this row should be lit currently).

For 96 wide by 8 high (27" x 2", twelve x8x blocks), this means 96
individually controlled column drivers, and 8 massive row drivers.

There have been some great leads regarding low side drivers (for the
96 sinks).  What about the 8 high side (in this regard) high current
drivers, many amps each?  I now read that the peak current for some
of these LED blocks (per LED, 1/10 or less duty cycle) can be 80-100
ma!  (by 8, would be 640-800 ma per block, via the row anode, times
twelve is up to 10 amps!).  I don't have to have absolute maximum
brightness, so I could compromise this to much less current.  But it
seems that I still need 8 high current transistors for the
rows/anodes.

I have read that logic gate power MOSFETs when used high side
(between power and the LED anodes) take several volts (eg: 5)
above the power supply to switch!  That makes it hard to simply
interface them (as high side drivers) to PIC outputs.

How would I use a PIC output to switch approx 5 volts at 2-10 A
(most to least compromise) into each of the 8 anode/rows?  Only
one (or none) at a time is needed.  At LED multiplexing speeds;
no relays please :-)

I guess this also brings up the question of appropriate multiplexing
speeds.  Would a 16 msec cycle, with 2 msec per row, be a good
frequency?  Or does it need to be faster to avoid visible flicker?

Thanks for the help!
   Zhahai


@ Zhahai Stewart       EraseMEzhahaiRemoveMEspamSTOPspamhisys.com
@ A Meme Gardener      http://rainbow.rmii.com/~hisys/zhahai.html
@ Standard Disclaimer  YMMV - Your Maya May Vary

1996\11\12@111426 by Byron A Jeff

face picon face
{Quote hidden}

What you just described is internally multiplexed. A non multiplexed display
would have 64 anodes and 64 cathodes - a packaging nightmare.

I usually do the opposite - drive one cathode and control the anodes.

>
> For 96 wide by 8 high (27" x 2", twelve x8x blocks), this means 96
> individually controlled column drivers, and 8 massive row drivers.

You're still thinking in terms of driving an entire 96 element row. It's
not necessary I believe but of course the biggest display I've built only
had 40 columns. I drove one column at a time (max 7 LED on at a time using
5x7 displays). Looked great.

{Quote hidden}

Once again think smaller and faster. Like the post yesterday on the TI
TPIC6B595. This part has a shift register and latch with 8 low side drivers
that can sink 150ma continous, 500ma peak/pulsed. All in a 16 pin DIP.
Cascadeable too.  You'd need 12 of them and pulse one at a time (simply a
shift and latch).  Then you can drive all of the anodes with 8 transistors
2N2222 and 100 ohm current limiting resistors. The display will work fine
at 1/96 duty cycle. The 1/8 cycle isn't important and designing with
multiamp circuitry to get it is tough work. If it turns out you need
a faster duty cycle, then just find a duty cycle that works for you then
duplicate the anode circuitry.

Find a solution that works for one column (the sort side) then extend. Once
one column works, then you can have as many columns as you like.

Also consider how long it going to take the PIC to load up 96 bits of data
for each row. For one column all you need is a single 8 bit latch and 4-5
instructions to load it. 96 bits will requre either 96 bits shifted in or
require 12 8 bit latches. By working with one column at a time, you reduce
your data load capacity and time.

>
> I have read that logic gate power MOSFETs when used high side
> (between power and the LED anodes) take several volts (eg: 5)
> above the power supply to switch!  That makes it hard to simply
> interface them (as high side drivers) to PIC outputs.

Exactly. And you only need to do that for multiamp solutions. A one column
at a time solution will be less that 400 ma tops and that's pulsed.

BTW what are the peak/pulsed currents on the LEDs? And the duty cycle? That
should help determine a solution...

>
> How would I use a PIC output to switch approx 5 volts at 2-10 A
> (most to least compromise) into each of the 8 anode/rows?  Only
> one (or none) at a time is needed.  At LED multiplexing speeds;
> no relays please :-)
>
> I guess this also brings up the question of appropriate multiplexing
> speeds.  Would a 16 msec cycle, with 2 msec per row, be a good
> frequency?  Or does it need to be faster to avoid visible flicker?

I find that flicker is free at about 500 Hz. So a 96 column display would
need to be driven at about 48 khZ to be effective.

>
> Thanks for the help!

Thnk about 1 column at a time. You can control 96 columns using only 3 bits
of the PIC and a single shift an load for each column.

BTW Marshall Electronics has samples of the TI TPIC6B595. I plan to test
my next display with them.

BAJ

1996\11\12@130644 by Bob Blick

picon face
>I guess this also brings up the question of appropriate multiplexing
>speeds.  Would a 16 msec cycle, with 2 msec per row, be a good
>frequency?  Or does it need to be faster to avoid visible flicker?
>

Most signs run faster than this, but 16 msec cycle is actually fine. I just
tested one of my signs, and at 30 msec there is quite obvious flicker. At 20
msec or less I don't notice any flicker. I'm sure there are people out there
with "golden eyes" who will see flicker down to 10 msec, so that might be a
rate to shoot for.

On your topic of current, if you are making an indoor sign with that many
LEDs, you don't need a tremendous amount of current. An average current of 5
mA will be quite bright. Choose your LEDs carefully, though. There is a lot
of variation in efficiency(as well as price!).

Cheers, Bob

1996\11\12@152027 by Zhahai Stewart

flavicon
face
> Do you have any information about CALL ID system that you
> mention ? I'm interested in this class of information, and other
> user on the list too. (Have you Technical Specifications about
> CALL-ID?

No, I'm afraid I don't.  That was a later question :-)

If nothing else, I was thinking of starting from the Weeder Tech
caller ID PIC project.  Weeder Tech is at 513-752-0279.  Terry
Weeder writes up projects for Nuts-n-Volts magazine, as well as
selling interesting PIC based kits. (Caller ID, DTMF, X-10, IR..)

  Zhahai

@ Zhahai Stewart       RemoveMEzhahaiKILLspamspamTakeThisOuThisys.com
@ A Meme Gardener      http://rainbow.rmii.com/~hisys/zhahai.html
@ Standard Disclaimer  YMMV - Your Maya May Vary

1996\11\12@152033 by Zhahai Stewart

flavicon
face
>>>> I am considering building a small LED matrix sign, probably
>>>> using 12 stackable 8x8 LED matrix blocks (approx 2"x2").
>>>>
>>>> This could be done with 96 high side drivers sourcing 20 ma each,
>>>> 96 current limiting resisters, and 8 low side drivers sinking
>>>> about 2 amps each (fairly hefty).

>> [These are interally multiplexed]

>> No, I believe that the 64 LED's in each of the twelve blocks are
>> arranged in an 8x8 matrix.  16 pins.  8 are cathodes for columns,
>> 8 are anodes for rows

> What you just described is internally multiplexed.

OK.  Just not the way I use the term, no problem.

> You're still thinking in terms of driving an entire 96 element row.
> It's not necessary I believe but of course the biggest display I've
> built only had 40 columns. I drove one column at a time (max 7 LED
> on at a time using 5x7 displays). Looked great.

I am concerned that I could not get much brightness from a 1/96 duty
cycle.  Two modules I've looked at are spec'd at:

 max  80ma@1/16 or 15ma continuous (surplus)
 max 100ma@1/10 or 20ma continuous (new)

I'm not sure how much I can boost the max current with a low duty
cycle; I am assuming that there is a max dissipation limit (long
term as well as short term) as well as possibly other limits.
Suppose I boosted the former (surplus) module to 100 ma.  That would
be barely over 1 ma average current (at 1/96 duty cycle,
multiplexing).

Anybody else have any experience with such a stretched out
multiplexing cycle?  I presume it would work (at the 48 KHz
pulse/500 HZ cycle you suggest to avoid flicker), but be
fairly dim.  I have in mind using the display for multiple
purposes, some outdoors (tho not in direct sunlight).

You are right that it would simplify the electronics in some
ways.

But this would mean driving 8 LED's at time, with 100 ma
current each, so each of the 96 column drivers would have to
sink 800 ma (when all LEDs in that column were lit).  The row
drivers would only have to source 100 ma each, not a biggie.
With 1/96 multiplexing, I couldn't drop these currents much and
still be visible at all!  (Say to 160 ma/colum, 20 ma peak per
LED, at 1/96 duty cycle).

I'm still leaning more towards 96 column drivers each sinking up
to 100 ma (eg: the TPIC6B595 suggested), and 8 mongo high side
drivers handling one row each for all 12 blocks; or 16 each driving
6 blocks (48 LEDs each); or 24 each driving 4 blocks (32 LEDs each),
etc.  I am still open to alternatives, tho.

> Also consider how long it going to take the PIC to load up 96 bits
> of data for each row.

They need to load it only 8x full cycle frequency.  If the shift
registers were clocked.  I am figuring around 5 PIC instructions
per bit to test a data bit, set the data out line, and pulse the
clock out line (40 instructions inline for one byte), plus say 8
per byte to load each byte in to be tested or shifted, for an
average of about 6 instructions per bit - if it were bit banged.
Could do better with a SSP if available.  To load a 96 bit shift
register (for the columns) this would be around 600 instructions
per LED row, times 8 is 5000 instructions per full refresh (to
load the shift register).  For a 500 Hz full refresh, this would
require a faster PIC; for less, less so.

The alternative of loading one 8 bit row driver shift register 96
times per cycle rather than one 96 bit column driver 8 times per
cycle, comes out to about the same.

Loading either 8 bits parallel would cut the time a great deal, if
there are enough spare I/O pins.  (In the 1/8 cycle scheme, I could
use 12 edge triggered latches in a sequence, and clock out 8 bits
at a time).

Thanks for all the helpful discussion!
   Zhahai

@ Zhahai Stewart       spamBeGonezhahaispam@spam@hisys.com
@ A Meme Gardener      http://rainbow.rmii.com/~hisys/zhahai.html
@ Standard Disclaimer  YMMV - Your Maya May Vary

1996\11\12@154332 by Clyde Smith-Stubbs

flavicon
face
Zhahai Stewart <RemoveMEzhahaispam_OUTspamHISYS.COM> wrote:

> Anybody else have any experience with such a stretched out
> multiplexing cycle?  I presume it would work (at the 48 KHz
> pulse/500 HZ cycle you suggest to avoid flicker), but be
> fairly dim.

The human eye is more sensitive to peak brightness levels than
it is to average levels; in my experience a 1/10 duty cycle
looks about half as bright as a 1/1 duty cycle at the same
peak current. 1/96 is certainly low, but it might be worth
experimenting with. It's necessarily a subjective assessment.

It would be unwise to drive the display
at higher than rated peak current, though. And remember Andy's
warning about current limiting during development.


--
Clyde Smith-Stubbs       | HI-TECH Software,       | Voice: +61 7 3354 2411
clydespamspamhitech.com.au      | P.O. Box 103, Alderley, | Fax:   +61 7 3354 2422
http://www.hitech.com.au | QLD, 4051, AUSTRALIA.   |
---------------------------------------------------------------------------
For info on the World's best C cross compilers for embedded systems, point
your WWW browser at http://www.hitech.com.au, or email spam_OUTinfospam_OUTspamspam_OUThitech.com.au

1996\11\12@193632 by Dave Mullenix

flavicon
face
>> Do you have any information about CALL ID system that you
>> mention ? I'm interested in this class of information, and other
>> user on the list too. (Have you Technical Specifications about
>> CALL-ID?

Here in North America, caller ID information is sent as standard 1200 baud
ASCII text between the first and second ring.  The signals are exactly like
the ones used by your 1200 baud modem.

1996\11\12@194101 by Gonzalo Palarea

flavicon
At 09:37 AM 11/12/96 -600, you wrote:

>How would I use a PIC output to switch approx 5 volts at 2-10 A
>(most to least compromise) into each of the 8 anode/rows?  Only
>one (or none) at a time is needed.  At LED multiplexing speeds;
>no relays please :-)
>

The PIC should drive a transistor, which should drive the leds.

1996\11\12@195056 by William Chops Westfield

face picon face
   Here in North America, caller ID information is sent as standard 1200 baud
   ASCII text between the first and second ring.  The signals are exactly like
   the ones used by your 1200 baud modem.

Bell 202 or Bell 212?  (we'll assume it isn't Vadic 1200)

I haven't used a 1200bps modem in about 15 years.  Can you even put a modern
modem (ie, the 2400bps ones you can get for $10 surplus?) into a dedicated
1200bps mode where it won't need to train/etc before receiving digits?

BillW

1996\11\12@202632 by Byron A Jeff

face picon face
This is an extremely interesting discussion....

>
> >>>> I am considering building a small LED matrix sign, probably
> >>>> using 12 stackable 8x8 LED matrix blocks (approx 2"x2").
> >>>>
> > You're still thinking in terms of driving an entire 96 element row.
> > It's not necessary I believe but of course the biggest display I've
> > built only had 40 columns. I drove one column at a time (max 7 LED
> > on at a time using 5x7 displays). Looked great.
>
> I am concerned that I could not get much brightness from a 1/96 duty
> cycle.  Two modules I've looked at are spec'd at:
>
>   max  80ma@1/16 or 15ma continuous (surplus)
>   max 100ma@1/10 or 20ma continuous (new)

So in fact they could be pulsed higher at a lower duty cycle. But like you said
let's take the 100ma.
>
> I'm not sure how much I can boost the max current with a low duty
> cycle; I am assuming that there is a max dissipation limit (long
> term as well as short term) as well as possibly other limits.
> Suppose I boosted the former (surplus) module to 100 ma.  That would
> be barely over 1 ma average current (at 1/96 duty cycle,
> multiplexing).
>

Well the eye doesn't work linearly. The pulsed brightness seems brighter
than the average. So an led pulsed at 100ma and 1/100 cycle will seem
much much brighter than the same led continous at 1ma.

> Anybody else have any experience with such a stretched out
> multiplexing cycle?  I presume it would work (at the 48 KHz
> pulse/500 HZ cycle you suggest to avoid flicker), but be
> fairly dim.  I have in mind using the display for multiple
> purposes, some outdoors (tho not in direct sunlight).

I haven't dealt with outdoor situations but like I said earlier I've built
a 40 column display pulsed at 1/40 duty cycle at 11ma each. plenty bright.

{Quote hidden}

That's your target. The TPIC6B595 can handle it and sourcing 20ma is no
problem. Keep adding columns until you don't feel it's bright enough, then
stop and add another set of anode drivers.

>
> I'm still leaning more towards 96 column drivers each sinking up
> to 100 ma (eg: the TPIC6B595 suggested), and 8 mongo high side
> drivers handling one row each for all 12 blocks; or 16 each driving
> 6 blocks (48 LEDs each); or 24 each driving 4 blocks (32 LEDs each),
> etc.  I am still open to alternatives, tho.

Try the pulsed low to medium current solutions first. BTW using the system above
how exactly are you going to control brightness? If you current limit the
high side drivers, then you'll get variable brightness. If you current limit
the columns, you'll need 96 resistors (i.e. a 16 pin pack for each display).
By dropping the current using 1 column, you only need 8 resistors for the
whole display, and the brightness will be constant.


{Quote hidden}

OK now mine. Presume that port B is driving the anode drivers and Port A
the cathode serial drivers. On initialization the serial cathode string is
initialized by setting all drivers to 1. After that a single 0 is clocked
and latched into the drivers selecting successive columns. 6 instructions.
Now to prevent bleed from one column to the next the row drivers have to
be turned off between successive columns. So Port B has to be cleared, The
column switched, and portB loaded with the next value. Presuming that
indirect access is used to get the data for each column, we're talking
about 10/11 instructions total:

disploop clrf  portb
        bsf   porta,clock
        nop
        bcf   porta,clock
        nop
        bsf   porta,latch
        nop
        bcf   porta,latch
        movf  INDF,W
        movwf portb
        incf  FSR,F
        decfsz count,F
        goto  disploop

To get 500Hz per column a 2.688 Mhz clock is required. Probably a bit
faster because a small delay between columns is required.

>
> The alternative of loading one 8 bit row driver shift register 96
> times per cycle rather than one 96 bit column driver 8 times per
> cycle, comes out to about the same.

I guess I wasn't playing fair because I planned to load the short side in
parallel, and not bother to latch it (unless of course you need port B
for some other activity.)

BTW the senario above leaves 3 portA pins available on an 18 pin PIC for
communication.

>
> Loading either 8 bits parallel would cut the time a great deal, if
> there are enough spare I/O pins.  (In the 1/8 cycle scheme, I could
> use 12 edge triggered latches in a sequence, and clock out 8 bits
> at a time).

Could do that. I kind of like the cathode shift registers because no real
data is involved, just clocking and latching a bit that only changes at
the beginning of a cycle.
>
> Thanks for all the helpful discussion!
>     Zhahai
>
> @ Zhahai Stewart       zhahaispam_OUTspamhisys.com
> @ A Meme Gardener      http://rainbow.rmii.com/~hisys/zhahai.html
> @ Standard Disclaimer  YMMV - Your Maya May Vary
>

'LED matrix multiplexing (Correction !!!)CNID'
1996\11\12@204055 by Lauw Lim Un Tung

flavicon
face
hi,

It's better if you build your project with MC145447 (CNID IC) and display
the result to small LCD 16x2 than you make scanning display with LED
Matrix, because it has more difficulties.

_______________________________

       Lauw Lim Un Tung
       Pecindilan 5/14
       Surabaya 60273
         INDONESIA
phone  : 62-31-318895
e-mail : RemoveMEtungKILLspamspam@spam@peter.petra.ac.id
_______________________________

On Tue, 12 Nov 1996, William Chops Westfield wrote:

>     Here in North America, caller ID information is sent as standard 1200 baud
>     ASCII text between the first and second ring.  The signals are exactly
like
>     the ones used by your 1200 baud modem.
>
> Bell 202 or Bell 212?  (we'll assume it isn't Vadic 1200)
>
> I haven't used a 1200bps modem in about 15 years.  Can you even put a modern
> modem (ie, the 2400bps ones you can get for $10 surplus?) into a dedicated
> 1200bps mode where it won't need to train/etc before receiving digits?
>
> BillW
>

1996\11\12@211656 by Ian Stirling

flavicon
face
>
> >I guess this also brings up the question of appropriate multiplexing
> >speeds.  Would a 16 msec cycle, with 2 msec per row, be a good
> >frequency?  Or does it need to be faster to avoid visible flicker?
> >
>
> Most signs run faster than this, but 16 msec cycle is actually fine. I just
> tested one of my signs, and at 30 msec there is quite obvious flicker. At 20
> msec or less I don't notice any flicker. I'm sure there are people out there
> with "golden eyes" who will see flicker down to 10 msec, so that might be a
> rate to shoot for.

Put a 100hz display next to a 50hz, the difference is quite marked, especially
when looking away from it.


>
> On your topic of current, if you are making an indoor sign with that many
> LEDs, you don't need a tremendous amount of current. An average current of 5
> mA will be quite bright. Choose your LEDs carefully, though. There is a lot
> of variation in efficiency(as well as price!).
>
> Cheers, Bob
>


--
Ian Stirling.                        |  http://www.mauve.demon.co.uk/
AKA Caeser, Bolonewbie.              |  With information on the PDA I'm making.

1996\11\12@224814 by Dave Mullenix

flavicon
face
At 04:50 PM 11/12/96 PST, you wrote:
>    Here in North America, caller ID information is sent as standard 1200 baud
>    ASCII text between the first and second ring.  The signals are exactly like
>    the ones used by your 1200 baud modem.
>
>Bell 202 or Bell 212?  (we'll assume it isn't Vadic 1200)

I'm not sure.  Whichever was the standard in America back when 1200 baud was
hot.

>I haven't used a 1200bps modem in about 15 years.  Can you even put a modern
>modem (ie, the 2400bps ones you can get for $10 surplus?) into a dedicated
>1200bps mode where it won't need to train/etc before receiving digits?

It's been a while since I played with 1200 baud too.  I've never done
anything with caller ID because I don't subscribe to the service, but if I
did, I'd use one of the 1200 baud modem chips.

1996\11\12@230931 by Byron A Jeff

face picon face
>
> hi,
>
> It's better if you build your project with MC145447 (CNID IC) and display
> the result to small LCD 16x2 than you make scanning display with LED
> Matrix, because it has more difficulties.

Lauw,

You kind of missed the original reason for the LED display: he wanted to be
able to see the display without glasses and presumably in the dark too...

BAJ

'Caller ID modulation (was Re: LED matrix multiplex'
1996\11\12@230941 by Eric Smith

flavicon
face
Dave Mullenix <djmullenspamBeGonespam.....FACSTAFF.WISC.EDU> wrote:

> Here in North America, caller ID information is sent as standard 1200 baud
> ASCII text between the first and second ring.  The signals are exactly like
> the ones used by your 1200 baud modem.

Yes, except that most people don't have a 1200 baud modem.  In the early
1980s, people commonly used Bell 212 modems that operated at 1200 bps, using
600 baud phase shift keying (PSK).

Caller ID uses Bell 202 compatible signalling, which is true 1200 baud
frequency shift keying (FSK), but only half duplex.  However, FSK is ideal
for rapid transfer of small amounts of data, as it does not require any
training sequence.  (That's also why credit card validation systems use
FSK.)  However, Bell 202 was never popular for use with personal computers.

Many currently produced modems support Bell 212, but very few support
Bell 202 for general use.

Modern modems use quadrature amplitude modulation (QAM):

       standard        data rate       buad rate
                       (bps)

       V.22bis         2400            600
       V.32            9600            2400
       V.32bis         14400           2400
       V.34            up to 28800     various, up to about 2700 IIRC
       V.34bis         up to 33600     various

The easiest way to receive caller ID signals is with a chip specifically
designed for that purpose, such as the Motorola MC145447.

Cheers,
Eric

'LED matrix multiplexing'
1996\11\13@053254 by Kalle Pihlajasaari

flavicon
face
Hi all LED matrix fans,

A few comments.

Large Backlit LCD displays are available and might be suitable
in some circumstances.

To minimise the number of drivers required you should reorganise
your matrix into as close to a square as possible electrically.

For 8 x 96 you have 768 LEDs (sqrt = 27.7...) 'nice' numbers
are 24 x 32 which would give you a 1:24 multiplex with 32
collumns.  This will be a total of 56 drivers as opposed
to the 104 with the skinny display layout.  About half the number.

The multiplex time and max current are altered by about 3 (better
or worse depending on which way you were planning to drive the
skinny arrangement)

Now the problems are:

No longer quite as logical display arrangement
Possibly more high current drivers.
Slightly more code.

Cheers
--
Kalle Pihlajasaari     KILLspamkallespam.....data.co.za
Interface Products     Box 15775, Doornfontein, 2028, South Africa
+27 (11) 402-7750      Fax: +27 (11) 402-7751

1996\11\13@085847 by Byron A Jeff

face picon face
>
> Hi all LED matrix fans,
>
> A few comments.
>
> Large Backlit LCD displays are available and might be suitable
> in some circumstances.
>
> To minimise the number of drivers required you should reorganise
> your matrix into as close to a square as possible electrically.
>
> For 8 x 96 you have 768 LEDs (sqrt = 27.7...) 'nice' numbers
> are 24 x 32 which would give you a 1:24 multiplex with 32
> collumns.  This will be a total of 56 drivers as opposed
> to the 104 with the skinny display layout.  About half the number.

True it's 32 cathode drivers. Each now has to sink 32*20ma = 640ma. That's
more than 1/2 AMP. Packaging comes into play then. Of course it's easy
to find power MOSFETs that can sink that kind of current, but then you
have to wire each one individually. Plus you still need a controller to
select which one(s) are on...

>
> The multiplex time and max current are altered by about 3 (better
> or worse depending on which way you were planning to drive the
> skinny arrangement)
>
> Now the problems are:
>
> No longer quite as logical display arrangement

Not a big deal.

> Possibly more high current drivers.

This is the killer in my estimation.

> Slightly more code.

Just a bit...

BAJ

1996\11\13@093609 by Ray Gardiner

flavicon
face
Brilliant flash!(pun)...this is easy, all you need to do is use
the new 8 pin pics use one for every column of leds if need be and then
simply drive each one from a clocked serial bus. let's say each
column is 8 leds, and then any width, The central controller
simple clocks the bit patterns to each 12Cxx, this way you can have
100% duty cycle and you are distributing data (low power) rather than
switching all those FETS uselessly. What's more the system could be
extended by adding rows without affecting display brightness. As mux
methods do.
                                       ray gardiner

{Quote hidden}

Ray Gardiner, Shepparton, Victoria 3630,  Australia,   spam_OUTrayspamKILLspamnetspace.net.au

1996\11\13@103432 by Byron A Jeff

face picon face
>
> Brilliant flash!(pun)...this is easy, all you need to do is use
> the new 8 pin pics use one for every column of leds if need be and then
> simply drive each one from a clocked serial bus. let's say each
> column is 8 leds, and then any width, The central controller
> simple clocks the bit patterns to each 12Cxx, this way you can have
> 100% duty cycle and you are distributing data (low power) rather than
> switching all those FETS uselessly. What's more the system could be
> extended by adding rows without affecting display brightness. As mux
> methods do.

A cool idea to say the least. A 12CXX and 3 TPIC6B595's could drive two
panels (8x16) and still have a pin left over for getting data. The TPIC6B595's
are 86 cents in 25-100 quantity, so the cost wouldn't bee too bad...

BAJ

'LED matrix multiplexing (eyes & duty cycles, MAX 7'
1996\11\13@210255 by Zhahai Stewart

flavicon
face
> Zhahai Stewart <RemoveMEzhahaiRemoveMEspamEraseMEHISYS.COM> wrote:
>
> > Anybody else have any experience with such a stretched out
> > multiplexing cycle?  I presume it would work (at the 48 KHz
> > pulse/500 HZ cycle you suggest to avoid flicker), but be
> > fairly dim.
>
> The human eye is more sensitive to peak brightness levels than
> it is to average levels; in my experience a 1/10 duty cycle
> looks about half as bright as a 1/1 duty cycle at the same
> peak current.

Given the highly non-linear response of the eye (closer to log, I
believe), I have a hard time knowing what half as bright is.  As
bright as the same LED at half the current?

How about this: What duty cycle at 20 ma tends to approximate the
brightness of an identical LED at constant X ma (eg: 5ma)?  This
should allow an A/B sort of test: set the constant current then
increment/decrement the duty cycle to match - or vice versa.

I'm certain this experiment has been done many times.  Anybody know
the results (or have a ready way to test this now?)

====

As for the LED matrix, I think the Maxim 7219 is very interesting, if
the price is reasonable.  One such chip would handle *everything* for a
single 8x8 LED block: 8 anode drivers, 8 cathode drivers, internal
clock and multiplexing, 8x8 internal RAM, serial shift register,
current limiting (no R's needed even).  It even has brightness
controls in 16 levels (as well as current set by one resistor).

I had seen the chip mentioned (Scott Edwards?) for controlling
7-segment LEDs (up to 8 of them), but didn't know it could also be
configured to control LED matrixes (by disabling the internal
BCD-to-7-seg decoding).

Only problem (other than price and availability) is that the peak
current is <40ma, typ 37ma.  This is less than half the peak for the
LED blocks (80 or 100ma).  I could live with that; close enough.

Thanks for the pointer, folks!  (Anybody got a source for a dozen or
so at good prices?)
    Zhahai

@ Zhahai Stewart       KILLspamzhahaispamspamBeGonehisys.com
@ A Meme Gardener      http://rainbow.rmii.com/~hisys/zhahai.html
@ Standard Disclaimer  YMMV - Your Maya May Vary

1996\11\14@024221 by Matthew Mucker

flavicon
face
At 07:58 PM 11/13/96 -600, you wrote:

>I had seen the chip mentioned (Scott Edwards?) for controlling
>7-segment LEDs (up to 8 of them), but didn't know it could also be
>configured to control LED matrixes (by disabling the internal
>BCD-to-7-seg decoding).

Yes, this is possible, and I am using this technique to display some letters
on a 7-segment LED display now.  (I was one of the ones who originally
suggested to 7219 also.)  BTW, my 7219 is a sample, so I have no idea what
the cost is.  The chip is not in my (somewhat outdated) copy of the Digi-Key
catalog, so if someone out there knows of a supplier, I'd appreciate the
knowing the name of the supplier, their phone number, the catalog number and
the unit price in onsies.


>Only problem (other than price and availability) is that the peak
>current is <40ma, typ 37ma.  This is less than half the peak for the
>LED blocks (80 or 100ma).  I could live with that; close enough.


Hmmmmmm... I don't know what to think of this.  Even though the peak current
of the chip is less than that of the LEDs, with the built in scanning
circuitry, that's a sacrifice that you may be willing to make, especially if
the scanning frequency is high enough that you wouldn't want to use peak
current anyway.  (I'm at my downstairs machine, the data sheet is at my
upstairs machine.)

Please keep us posted on your research... it's an interesting real-world
example of choosing the better of several possible solutions.  I'd like to
know which method you settle on and what your reasons were for making that
decision.

-Matt

(no .sig about Macs and cockroaches on the downstairs machine.)

1996\11\14@040921 by Shel Michaels

picon face
In a message dated 96-11-13 11:06:17 EST, BAJ writes:

<< TPIC6B595's are 86 cents in 25-100 quantity, so the cost wouldn't bee too
bad...
>>

Tell me, where do you folks buy PICs that Digikey doesn't carry - do the
local reps carry them?  Are they at good prices?

TIA,
Shel Michaels

'Yet another LED project'
1996\11\14@173902 by W. Lee Vick, Jr.

flavicon
face
PIC.gurus,

       I also have a little LED project and was looking for some help with
it. I'd like to build a box which determines the order of finish of a pine
box derby (small wooden cars about 7" by 3" which run down a slotted track)
race. Ideally there will be one micro controlling things, 6 sensors (one for
each lane in the race), and 6 7-segment LED's which will show the position
in which the cars finished, and a button for resetting the system for the
next race. Thanks to info on the 595 I've figured out how to use it for
displaying the race results (or whatever else I want to display). My
questions are about the micro,the sensors, and the LED's:

       1. Can anyone recommend a good IR TX/RX pair which is small, cheap,
and will work over distances of about 3". Also, how do I wire this thing up?
Do I just treat it as a normally open switch?

       2. Any recommendations for 7-segment LED's? Ideally they'd have
current limiting resistors built in (to save wiring - I'm just an engineer
so my wire-wrapping skills are very suspect), be cheap (a recurring theme -
hey, this is for the Cub Scouts and they're not rich), and be as big as
possible (and no, I don't want to pay $5-10US each for 3" high versions).

       3. I figure I need about 14 I/O pins, maybe an INT, and a timer or
two. Which PIC should I use?

       I thank you, and if I can get all this working then the little Cub
Scouts thank you.

                                       Cheers,

                                       Lee.

************************************************************************
* Lee Vick           *   I had a nightmare that I was in an elevator   *
* leevickspamspamti.com     *   with Kenny G and Michael Bolton, a gun, and   *
* +1 713-274-2241    *      just one bullet... So I shot myself.       *
************************************************************************
* Standard disclaimer: TI as an organization is much too smart to      *
*                      to agree with anything I have to say.           *
************************************************************************

1996\11\14@192940 by Steve Hardy

flavicon
face
> From: "W. Lee Vick, Jr." <RemoveMEwlvickspamBeGonespamRemoveMEmicro.ti.com>
>
> PIC.gurus,
>
>         I also have a little LED project and was looking for some help with
> it. I'd like to build a box which determines the order of finish of a pine
> box derby (small wooden cars about 7" by 3" which run down a slotted track)
> race. Ideally there will be one micro controlling things, 6 sensors (one for
> each lane in the race), and 6 7-segment LED's which will show the position
> in which the cars finished, and a button for resetting the system for the
> next race. Thanks to info on the 595 I've figured out how to use it for
> displaying the race results (or whatever else I want to display). My
> questions are about the micro,the sensors, and the LED's:
>
>         1. Can anyone recommend a good IR TX/RX pair which is small, cheap,
> and will work over distances of about 3". Also, how do I wire this thing up?
> Do I just treat it as a normally open switch?

Since you work for TI (I assume Texas Instruments) they make optoelectronic
devices like this - you should take advantage of your employer's resources.
My employer makes tape drives.  These contain such sensors for determining
whether the tape is loaded.  Unfortunately, I have no idea who actually
makes the sensors.

>
>         2. Any recommendations for 7-segment LED's? Ideally they'd have
> current limiting resistors built in (to save wiring - I'm just an engineer
> so my wire-wrapping skills are very suspect), be cheap (a recurring theme -
> hey, this is for the Cub Scouts and they're not rich), and be as big as
> possible (and no, I don't want to pay $5-10US each for 3" high versions).

A bit optimistic price-wise unless you can find some surplus.  HP make
LED displays.  I got HDSP3400's which are reasonably cheap, a few cm
high and good efficiency.  Current limiting resistors not built-in so
you should use resistor packs if wiring is a problem.

Forget wire wrapping!  Making a PCB is so easy these days.  But first,
prototype the circuit on a breadboard.

>
>         3. I figure I need about 14 I/O pins, maybe an INT, and a timer or
> two. Which PIC should I use?

Well you don't need a timer if you are only interested in the _order_
of events, unless you need an overall timeout in case one of the cars
goes "off the rails".  You don't even need interrupts because the PIC
is fast enough to do everything by polling.  You just set up one humungous
program loop which updates and multiplexes the display, queries the
start button and reads the sensors as appropriate.  The number of I/O
pins is a bit of a killer otherwise you could use an 18-pin device.  You
will have to go for a 28-pinner such as 16C73.

Because of the simple application (not timing or interrupt critical) it
would be easy for you to completely test the software operation using
MPSIM.  This would almost guarantee that you would only have to burn the
EPROM once.

{Quote hidden}

I would have lined them up and plugged both of 'em at once.

Regards,
SJH
Canberra, Australia

1996\11\15@002319 by Tony Matthews

flavicon
face
I would like to suggest omitting the tr/rx modules as they are not
really necessary.A non modulated light source(led..)on one side and a
light detector on the other side (solar cell,photocell,phototransistor)
with a single op_amp 741 a diode two capacitors and two resistors you
get a clean positive or neagative pulse despite varying light conditions
and at very little cost X6 as to where to put the signal learning that
is why I am here.:).Tony M.

W. Lee Vick, Jr. wrote:
{Quote hidden}

1996\11\15@062248 by efoc

flavicon
face
Steve,
       here is my idea... you can use a pic16c84 for this

you will need a BCD to sevensegment decoder driver chip for each 7
segment display a 3 to 8 decoder like the 74138 a binary to decimal
decoder and a few diodes plus the opto switches

now you can set up the optos to conect to the decimal decoder one per
line and also take the output via a diode to the PB0 line take thoutput
from the decimal decoder to the PB1,2,3 lines. now by setting up the pic
so its generates an int when the PB0 line is toggled you can read the
output on the decimal decoder to tell which opto caused it. now for the
output you can connect the input of the bcd to 7 segment driver/decoders
to the PA0,1,2,3 pins and the input of the 3 to 8 decoder to PB4,5,6 the
O/P of the 3 to 8 is used to drive the output enable pins of the bcd to
7 seg decoders. now you can multiplex the outputs with the PB4,5,6 pins
and the number is a binary on the PA0,1,2,3 pins. the software should be
updating the displays in its normal loop from a table updated by the int
loop. finaly a Reset could be achived with the PB7 pin scaned in the
same loop as the multiplexing. There that aint so bad is it. If you need
a hand with the code for the 16C84 give me an Email and i'll try and
help as much as I can.

Cheers Peter.......

--
==================================
= New Ideas come from those who  =
= didn't know it wasn't possible =
==================================

'Caller ID (was Re: LED matrix multiplexing (Correc'
1996\11\15@083052 by Hank Gupton

flavicon
face
You wrote:

>Here in North America, caller ID information is sent as standard 1200 baud
>ASCII text between the first and second ring.  The signals are exactly like
>the ones used by your 1200 baud modem.

 My modem uses the "full duplex" version of Bell's 1200 baud protocol.  My
understanding was that Caller ID used the prior "half duplex" protocol
(sender gets full band rather than half band).  I forgot the protocol's
name.  Yes, I know that would be helpful.

 -- Hank

1996\11\15@083717 by Louis A. Mamakos

flavicon
face
> You wrote:
>
> >Here in North America, caller ID information is sent as standard 1200 baud
> >ASCII text between the first and second ring.  The signals are exactly like
> >the ones used by your 1200 baud modem.
>
>   My modem uses the "full duplex" version of Bell's 1200 baud protocol.  My
> understanding was that Caller ID used the prior "half duplex" protocol
> (sender gets full band rather than half band).  I forgot the protocol's
> name.  Yes, I know that would be helpful.
>
>   -- Hank

What most people think about when they hear "1200 bps modem" is a Bell 212
compatible modem.  This is a full-duplex modem, and actually a 600 baud
PSK modem, with two bits encoded per symbol.

The modems used for callid are the (even older) Bell 202 compatible modem,
and they are half duplex plain FSK modems, much like the older Bell 103
300 bps modem.  These are 1200 bps with (I believe) a low speed back
channel.  For caller id applications (and also, strangely enough,
Amateur Packet Radio), it's the 1200 bps FSK modem you need to implement.

Louis Mamakos

'LED matrix multiplexing (Correction !!!)CNID'
1996\11\15@085002 by Hank Gupton

flavicon
face
Lauw Lim Un Tung wrote:

>It's better if you build your project with MC145447 (CNID IC) and display
>the result to small LCD 16x2 than you make scanning display with LED
>Matrix, because it has more difficulties.

 Bingo!  The datasheet's on the Web at

   http://design-net.com/books/dl136/pdf/mc145447rev1.pdf

 an answer in a can.  Interesting reading.  Thank you.

 -- Hank

'Yet another LED project'
1996\11\15@093622 by W. Lee Vick, Jr.

flavicon
face
Steve,

       A few comments on your comments (for you and others to comment on)...

>>         1. Can anyone recommend a good IR TX/RX pair which is small, cheap,
>> and will work over distances of about 3". Also, how do I wire this thing up?
>> Do I just treat it as a normally open switch?
>
>Since you work for TI (I assume Texas Instruments) they make optoelectronic
>devices like this - you should take advantage of your employer's resources.
>My employer makes tape drives.  These contain such sensors for determining
>whether the tape is loaded.  Unfortunately, I have no idea who actually
>makes the sensors.

       Well, TI is HUGE and I don't work anywhere near anyplace where they
make these sensors. It's not like we have a company store where we can go
and pick up sensors, chips, laptops, or missiles cheap (TI makes all those
things and more). One would hope it would be a little easier to get things
from inside but in companies as big as this that's not always possible.

{Quote hidden}

       OK, what I meant to say was that I can live with 1" high LED's but
if someone happened to know where I could get 2" for the same price, I'd be
happy to hear that. Define reasonably cheap for those HDSP3400's.

{Quote hidden}

       Right, I want the timer so I can set up a loop to shift the current
data I want to display out to the display circuitry and then latch it in -
this loop would be run every half second or so. Start up the system with
dashes displayed where the numbers go, start the timer routine, then all I
have to do is change some RAM locations and the display will take care of
itself. I COULD always do this in the main loop, but I'd rather loop on
polling the lane sensors to keep the resolution small.

>> ************************************************************************
>> * Lee Vick           *   I had a nightmare that I was in an elevator   *
>> * @spam@leevickSTOPspamspam@spam@ti.com     *   with Kenny G and Michael Bolton, a gun, and   *
>> * +1 713-274-2241    *      just one bullet... So I shot myself.       *
>> ************************************************************************
>
>I would have lined them up and plugged both of 'em at once.

       Thought of that. But there is the possibility the bullet would
deflect and not handle the one in the back. This is one where ya gotta go
with the worst case scenario. ;-)

       Thanks!

                                       Cheers,

                                       Lee.

1996\11\15@113546 by fastfwd

face
flavicon
face
W. Lee Vick, Jr. <PICLISTspamBeGonespamspamBeGoneMITVMA.MIT.EDU> wrote:

> I'd like to build a box which determines the order of finish of
> a pine box derby (small wooden cars about 7" by 3" which run down a
> slotted track) race. Ideally there will be one micro controlling
> things, 6 sensors (one for each lane in the race), and 6 7-segment
> LED's which will show the position in which the cars finished, and a
> button for resetting the system for the next race.

Lee:

It's been done.  If you're only interested in HAVING one of these
things, rather than in BUILDING it, call John Shreffler at New
Directions, Inc.  He sells something called "The Judge"... LCD timer;
2- to 8-lane capability; 1st, 2nd, and 3rd-place indicators, etc.

New Directions can be reached at 703 319 0840.

-Andy

Andrew Warren - spamBeGonefastfwdspamix.netcom.com
Fast Forward Engineering, Vista, California
http://www.geocities.com/SiliconValley/2499

1996\11\16@081521 by Matthew Mucker

flavicon
face
At 04:30 PM 11/14/96 -0600, you wrote:
>PIC.gurus,
>

>        2. Any recommendations for 7-segment LED's? Ideally they'd have
>current limiting resistors built in (to save wiring - I'm just an engineer
>so my wire-wrapping skills are very suspect), be cheap (a recurring theme -
>hey, this is for the Cub Scouts and they're not rich), and be as big as
>possible (and no, I don't want to pay $5-10US each for 3" high versions).
>

Lee,

I would again recommend Maxim's 7219 chip.  No current limiting resistors
needed, will drive up to 8 seven segment displays, and only takes three
output pins.  I have code to dirve the 7219 and will share it with any
interested parties.  The datasheet is available online from Maxim.

Digi-Key sells these little puppies, but they're not cheap-- about $8.25
each.  However, for what they do, in my opinion they're worth every cent.
Sure makes designing hardware a whole lot easier, and uses three pins to
drive up to 64 individual LEDs.  And yes, though it's designed to drive
seven segment displays, you can configure the chip (quite easily) to drive
an 8x8 (or smaller) matrix of LEDs.

-Matt

1996\11\19@003448 by Barry Bine

picon face
>        I also have a little LED project and was looking for some help with
>it. I'd like to build a box which determines the order of finish of a pine
>box derby <snip> 6 7-segment LED's which will show the position
>in which the cars finished <snip>

       You can simplify things in one of two ways... dump the 7-seg LED's
and just use 36 discrete LED's as follows (example):

Car # >         1  2  3  4  5  6

Position   1st        X
          2nd  X
          3rd              X
          4th     X
          5th           X
          6th                 X

       Or... interface your PIC's serial port to a PC and use either a dumb
terminal program or some quick and dirty program to display results.  The
only problem with this will be performing RS-232 level conversion.

>        1. Can anyone recommend a good IR TX/RX pair which is small, cheap,
>and will work over distances of about 3". Also, how do I wire this thing up?
>Do I just treat it as a normally open switch?

       I have had good luck with IR pairs from Radio Shack... about $2 or
$3 a pair.  If you use an IR detector you'll have to drive the base of an
NPN switching transistor (15 for $3 at RS) in order to amplify the levels as
follows:

       +5   +5
       |     |
       /     /
       \     \_________ Active low
       /     /          input to PIC
       \   |/
       |___|
       |   |\
    IR V     |
       -     |
       |     |
      ---   ---
       -     -

       Even cheaper and easier is to use CDS photocells from Radio Shack
and just use the AD inputs of a PIC16C74.  Look for a sudden drop in light
levels (increase in voltage):

       +5
       |
       /
       \
       /
       \___________analog input to PIC
       |
       |
  photoresistor
       |
      ---
       -

       Pick your resistors experimentally.  Place the photoresistor so that
the car passes over it.

       Have fun...

                                       - Barry

'Searching for source of LED backlight 40x2 LCD mod'
1996\11\19@043852 by NEIL GANDLER

flavicon
face
I am searching for a distributor of led backlight LCD modules 40x2.
Distributors with a good selection. The 40x2 modules from Digi-key
have crazy viewing angles. I just learned the $50 hard way. I
prefer sources that have reasonable prices in small quantities (~$50)
What would also be helpfull is an LCD module with seperate LED
connections. The above mentioned module has its LED GND connected
to system ground. I would like to use my low side driver (DS75452)
to control brightness, through my PIC PWM output. I would appreciate
any help.

       Neil Gandler

'LEDs revisited'
1996\11\19@231243 by Matthew Mucker

flavicon
face
To the person who is building an LED caller id display--

In issue 31 (Feb. 1993) of Circuit Cellar Ink, Tom Cantrell describes a
part by HP-- the HDSP-211x.  The '211x is an eight-character LED display.
Each character is made of an array of 5x7 LEDs.  It's a 28-pin DIP part
that includes all the driver circuitry to display ASCII characters-- you
could even do the caller's name!  It's available in red, yellow, and green.
It allows custom character creation.  It is driven with a parallel
interface.  The article does not go into technical detail, but it appears
from a diagram that the pins are  labelled !RD, !WR, D0-D7, A0,A2, A3, A4,
!FL, !CE, !RST, CLK and CLS.

The article is three years old, but if the part is still available, even if
it's expensive, it's GOTTA be cheaper than all the support circuitry that
would be needed for individual drivers.  Plus, the interface will be a lot
easier, cutting your development time and costs.

Let me know what you find out.

-Matt


P.S. The HDSP-250x is the same part but is 7mm high, versus 5mm for the '211x.



 "DOS Computers manufactured by companies such as IBM, Compaq, Tandy, and
millions of others are by far the most popular, with about 70 million
machines in use wordwide. Macintosh fans, on the other hand, may note that
cockroaches are far more numerous than humans, and that numbers alone do
not denote a higher life form."

'Searching for source of LED backlight 40x2 LCD mod'
1996\11\21@211935 by Kalle Pihlajasaari

flavicon
face
Hi Neil,

>  I am searching for a distributor of led backlight LCD modules 40x2.
> Distributors with a good selection. The 40x2 modules from Digi-key
> have crazy viewing angles. I just learned the $50 hard way. I
> prefer sources that have reasonable prices in small quantities (~$50)
>  What would also be helpfull is an LCD module with seperate LED
> connections. The above mentioned module has its LED GND connected
> to system ground. I would like to use my low side driver (DS75452)
> to control brightness, through my PIC PWM output. I would appreciate
> any help.

A few weeks ago I was quoted a onesies price of US$235 for a 40 x 2 LCD with
a transflective setup (works with the Backlight off) from the local chapter
of AVNET a very large component house.  The local chapter is called AVNET Kopp
but only because it merged with Kopp last year.

I don't know of details for any other countries but can make call to find out
if you send me e-mail.

Cheers
--
Kalle Pihlajasaari     spam_OUTkalleSTOPspamspamip.co.za
Interface Products     P O Box 15775, DOORNFONTEIN, 2028, South Africa
+ 27 (11) 402-7750     Fax: 402-7751

'LEDs revisited'
1996\11\22@055619 by fastfwd

face
flavicon
face
Matthew Mucker <RemoveMEPICLISTspamspamMITVMA.MIT.EDU> wrote:

> In issue 31 (Feb. 1993) of Circuit Cellar Ink, Tom Cantrell
> describes a part by HP-- the HDSP-211x.  The '211x is an
> eight-character LED display. Each character is made of an array of
> 5x7 LEDs.
> ....
> The article is three years old, but if the part is still available,
> even if it's expensive, it's GOTTA be cheaper than all the support
> circuitry that would be needed for individual drivers.

Matt:

I wouldn't bet on it; last time I checked, those things cost $20-$30
each, in quantity.

-Andy

=== Andrew Warren - TakeThisOuTfastfwdspamspamRemoveMEix.netcom.com                 ===
=== Fast Forward Engineering - Vista, California          ===
===                                                       ===
=== Custodian of the PICLIST Fund -- For more info, see:  ===
=== http://www.geocities.com/SiliconValley/2499/fund.html ===

1996\11\22@141311 by Eddie Starling

flavicon
face
This HDSP-211x sounds like what I was looking for. Does anybody know where I can get it in single quantities. Also, I would like a larger display, does anybody know of one that can be had in single quantities?

Eddie Starling
(516)549-6066
KILLspamedstarspamspamspam_OUTix.netcom.com

----------
From:   Matthew Mucker[SMTP:mmuckerRemoveMEspamAIRMAIL.NET]
Sent:   Tuesday, November 19, 1996 1:19 PM
To:     Multiple recipients of list PICLIST
Subject:        LEDs revisited

To the person who is building an LED caller id display--

In issue 31 (Feb. 1993) of Circuit Cellar Ink, Tom Cantrell describes a
part by HP-- the HDSP-211x.  The '211x is an eight-character LED display.
Each character is made of an array of 5x7 LEDs.  It's a 28-pin DIP part
that includes all the driver circuitry to display ASCII characters-- you
could even do the caller's name!  It's available in red, yellow, and green.
It allows custom character creation.  It is driven with a parallel
interface.  The article does not go into technical detail, but it appears
from a diagram that the pins are  labelled !RD, !WR, D0-D7, A0,A2, A3, A4,
!FL, !CE, !RST, CLK and CLS.

The article is three years old, but if the part is still available, even if
it's expensive, it's GOTTA be cheaper than all the support circuitry that
would be needed for individual drivers.  Plus, the interface will be a lot
easier, cutting your development time and costs.

Let me know what you find out.

-Matt


P.S. The HDSP-250x is the same part but is 7mm high, versus 5mm for the '211x.



 "DOS Computers manufactured by companies such as IBM, Compaq, Tandy, and
millions of others are by far the most popular, with about 70 million
machines in use wordwide. Macintosh fans, on the other hand, may note that
cockroaches are far more numerous than humans, and that numbers alone do
not denote a higher life form."

'LED matrix multiplexing (eyes & duty cycles, MAX 7'
1996\11\22@141714 by vince

flavicon
face
Matthew Mucker wrote:

    <Snipped>
>
> -Matt
>
> (no .sig about Macs and cockroaches on the downstairs machine.)

Well stick to the downstairs machine then!

'caller-id, was Re: LED matrix multiplexing (Correc'
1996\11\23@213824 by aab

flavicon
face
>    Here in North America, caller ID information is sent as standard 1200 baud
>    ASCII text between the first and second ring.  The signals are exactly like
>    the ones used by your 1200 baud modem.

>I haven't used a 1200bps modem in about 15 years.  Can you even put a modern
>modem (ie, the 2400bps ones you can get for $10 surplus?) into a dedicated
>1200bps mode where it won't need to train/etc before receiving digits?

Modern modems decode caller id directly. The tones occur between the
first and second ring so no retrain is necessary.

The caller id decoder kits available consist of a Motorola MC145447P
caller id decoder chip and a MAX232 RS-232 driver. The 145447 could
be hooked to a pic software or hardware UART (there I mentioned PICs :-)


--
Best regards,
Andy Burgess
EraseMEaabSTOPspamspamRemoveMEcichlid.com


'Philips 3-wire (Data, Strobe and Acknowledge) prot'
1996\12\13@215918 by ang (Chee Foon Tiang)
flavicon
face
Anybody got any pointers to the Philips 3-wire DSA protocol
used mainly in their CD controller... as all their WWW sites
have rather old links and their site search engine always
returns error (or something to the same effect).

Thanks,
Peter Tiang

1996\12\14@004041 by Todd Peterson

picon face
At 09:16 AM 12/14/96 +0800, you wrote:
>Anybody got any pointers to the Philips 3-wire DSA protocol
>used mainly in their CD controller... as all their WWW sites
>have rather old links and their site search engine always
>returns error (or something to the same effect).


Sorry, I wish I did have something about this Philips protocol to tell you.
Hopefully someone more informed about it will respond.

But your question brings up something that really irks me:  I am looking at
doing a project using Philips I2C Bus and, through a series of phone calls,
happened to end up talking with the Philips in-house patent attorney about
it.  He told me some news that disturbed me:  he said, and I paraphrase
fairly close to the original - ' I won't say thay Microchip is breaking the
law using I2C YET, but they do not have a valid license.'  He then allowed
me to 'guess' (he wouldn't tell me outright) who all that manufactures of
microcontrollers that does have a license - virtually every one I could
think of (about 15-20).  he said he couldn't tell me much more about it yet,
but that 'Microchip will try to tell me differently'.  I, of course,
contacted MCHIP and they told me they DID have a license.  It worries me,
though, as the Philips Attorney told me he would certainly get something in
writing from Microchip stating they will back their claim to the I2C license
before marketing any product I designed.  Microchip, was to fax me something
but it didn't arrive (about a month ago).  Anybody know what's going on
here?  No, I'm not imagining things, even though it is late.  I do have
names of people I spoke with and will gladly provide them privatly.

Anyone know for sure why I was told by Philips that Microchip was on their
bad list?

Thanks,

Todd Peterson
E-LAB Digital Engineering, Inc.
(712) 944-5344

http://www.netins.net/showcase/elab

Hey, check out our new PC Interface IC, the EDE300!

'HELP with an LED Driver'
1996\12\16@155859 by Scott Horton

flavicon
face
I am using a PIC16C84 to drive some 7 segment LED displays.  My problem is
that the LED's are those BIG (3 inch) ones and each segment needs 40mA.  I
was going to use a 2803 to drive them but with all 7 segments on, it looks
like the power was too high.

Can some of you suggest the best (simplest/cheapest) way to drive these
LED's.  Right now, I'm planning to have a 4511 decoder switch individual
2N2222's for each segment.

Thanks for any help/suggestions.

Scott

1996\12\16@172219 by Zhahai Stewart

flavicon
face
> I am using a PIC16C84 to drive some 7 segment LED displays.  My problem
> is that the LED's are those BIG (3 inch) ones and each segment needs
> 40mA.  I was going to use a 2803 to drive them but with all 7 segments
> on, it looks like the power was too high.

> Can some of you suggest the best (simplest/cheapest) way to drive these
> LED's.

You could use multiple ULN2803's or ULN2003's, keeping the package
dissipation within bounds on each;  (ie: Don't use all channels per pkg).
They're cheap.  {For any reader who is unfamiliar, there are 8/7 channel
DIP packaged darlington low side drivers.)  This may be closest to your
current design (no pun intended) and thereby simple in that way; also
cheap.

You could consider the the MAX7219, which will handle everything for up
to 8 zeven-segment-plus-decimal LED displays.  It has high side drivers,
low side drivers, BCD-7 segment decoders, oscillator, current limiters,
RAM for the BCD, intensity modulation via PWM, shift register input
(fewer pins).  Around $8 in small quantities, US.  I believe that
Harris/Intersil have a similar parallel interfaced chip in the ICL7218.
Being N-way multiplexed (for N digits), this may be less bright than you
wish, tho you can probably up the peak current some to compensate.  This
may be the simplest, in that one chip and a single current setting resistor
handles up to 8 digits; you don't even need current limit resistors per
segment.  (You can also use the MAX7219 in direct undecoded mode, with
individual control of each segment).  Check the Maxim web pages.

Or you could substitute the TI TPIC6B595 8 bit SIPO latched shift register
with low side drivers; I think these can handle your 40ma / segement
continuous current, unlike the ULN2803.  Again, fewer pins needed, but
you need to handle multiplexing the high side, or use one per digit
unmultiplexed.  This is back to your earlier design, but with a shift
register/latch with more drive.  Check the Texas Instruments web pages.
   Zhahai

@ Zhahai Stewart       spam_OUTzhahaiRemoveMEspamEraseMEhisys.com
@ A Meme Gardener      http://rainbow.rmii.com/~hisys/zhahai.html
@ Standard Disclaimer  YMMV - Your Maya May Vary

1996\12\16@173602 by verhage

flavicon
face
Not only to drive an LED segment, I'd like to hear suggestions for
using a controller to ignite rocket ignitors.  As I understand, I'll
need at least an amp to do that.

thanks

Lloyd Verhage

{Quote hidden}

1996\12\16@204122 by Byron A Jeff

face picon face
>
> Not only to drive an LED segment, I'd like to hear suggestions for
> using a controller to ignite rocket ignitors.  As I understand, I'll
> need at least an amp to do that.

That's easy enough: use the pic to drive a relay and wire the relay circuit
to the ignitors... I'm using a 16C84 and a couple of 12V 10A relays to drive
6 floodlights (200W each) around the perimeter of the house. When I had only
one relay (for the back lights) I wired the typical 2N2222 driver. When I added
a second relay instead of adding another 2N2222 I switched the 2N2222 driver
to a 5V relay and drove the 2 12V relays from the 5V one. Speed was an
absolute non issue since the lights only go on and off twice a day.

I suggest using a relay.

BAJ

1996\12\16@213855 by Dwayne Reid

flavicon
face
>I am using a PIC16C84 to drive some 7 segment LED displays.  My problem is
>that the LED's are those BIG (3 inch) ones and each segment needs 40mA.  I
>was going to use a 2803 to drive them but with all 7 segments on, it looks
>like the power was too high.

Scott - are you going to multiplex the displays?  If not, 2803 (or its less
expensive 7 wide brother 2003) will work just fine.  Each channel is good
for a maximum of 500 mA, total package current is ok for 600 mA or so.  Be
sure to take the aprox. 1.2 V saturation voltage when calculating your LED
segment resistors.

PS: I've been talking up TPIC6B595 power o/p shift registers for several
months now.  Each channel is good for 150 mA and all channels can be used at
full current without any concern.  You can drive multiple displays
(non-multiplexed) using only 3 output pins on your pic (2 pins if you use a
RC delay on the clk line to drive the latch pins.  My current project uses 3
seperate 32 bit bidirectional serial chains using only 5 i/o pins.  My
eeprom shares 2 of those lines and takes one more i/o for a total of 6 i/o
pins for ALL of my digital inputs, outputs and configuration storage.

Anyways, hope this helps.

Dwayne

1996\12\16@220403 by Sarunas Cepulis

flavicon
face
Dwayne Reid wrote:
{Quote hidden}

Use Current limiting resistors !!!!!!!!!!!!!
       saras

1996\12\17@121720 by Scott Horton

flavicon
face
Zhaahi (and everyone),

Thanks for the pointer.  The TI chips look like they have the power
capacity I need.  I followed your suggestion and found not only the
TPIC6273 power shift register but also the TPIC6273 Power Octal D latch.
They have similar capacities and the latter looks like it would meet my
needs in my current design.

However, your suggestion of using the shift register looks better only I'm
afraid I'm not sure how to interface to it.  Any chance you (anybody)
could give me some pointers?  I've got the data sheet but I'm not sure how
to handle talking between my 16C84 and it.  I think I can handle the SI
but I'm not sure what to do to the G, RCK, SRCLR, SRCK inputs.

If it's not already clear, please assume I'm a dummy when you provide any
help <g>.

Thanks very much for the help.

Scott

1996\12\17@141125 by Craig Knotts

flavicon
face
    Just offhand, I think I'd use a relay to handle the rocket igniters.
    They are generally more robust in regard to overload.  I'd also put a
    fuse or fast circuit breaker (or solid state current limiter) in
    series with the relay in case you short out the igniter leads.


______________________________ Reply Separator _________________________________
Subject: Re: HELP with an LED Driver
Author:  TakeThisOuTverhageRemoveMEspam@spam@HUMEC.KSU.EDU at internet
Date:    12/16/96 6:35 PM


Not only to drive an LED segment, I'd like to hear suggestions for
using a controller to ignite rocket ignitors.  As I understand, I'll
need at least an amp to do that.

'LED display without current limit resistors ?'
1996\12\30@154200 by Randy Howe

flavicon
face
Happy New Year PICLISTERs

I am interfacing a PIC 16C84 to a multiplexed Common Anode 3 digit 7
segment LED display.

Power for the circuit is 2 'AA' battery cells (nominal 3V).

Each LED segment is rated for a maximum forward voltage of 2.8V.

QUESTION: Do I really need current limiting resistors ?

The individual segments are pulled down by the PIC port B outputs,
which introduce some voltage drop.

Each common anode is driven by a 2n3906 transistor. Its voltage drop
will vary around 0.2 volts depending on how many segments are turned
on.  This will result in some variation in intensity, but I think I
can compensate for this by varying the mux duty cycle depending on the
number of segments turned on.

QUESTION: Has anybody tried this ? Anything I am missing here ?

Randy Howe

1996\12\30@155907 by az753

flavicon
face
Randy,
I am new.
I mailed a letter to: EraseMEpiclistRemoveMEspammitvma.mit.edu titled pic damage, watchdog...
Did you receive it?
If yes/no, let me know. I will act accordingly.
Jean


'Foolish Usurper of Conventional Knowledge'
1997\01\04@163912 by Mike
flavicon
face
>hmmm why are you sending this shit to me man.
>
>please stop

OK, it was meant for the PIC list... Cheer up can't be that bad :}

Which country are you in ?

See comment at end...

{Quote hidden}

There is no a'priori reason that the ultimate truth will be interesting
or even useful, those moments of frustration during philosophical debate
would be replaced by the sheer terror which accompanies true knowledge.

'Blinking LED'
1997\01\20@204049 by Troy D Nelson

picon face
Would like to get an LED blinking on at PIC16C71.

Pins 3,4, & 14 tied +5V, pin 5 to ground

Pin 16 is tide to an RC oscillator, 6.8K and 20pF capacitor as follows:

+5V
|
/
\<== 6.8K resistor
/
|
|===pin 16
|
=<==20 pF
|
Gnd

Pin 18 is tied through a 330 ohm resistor and LED in series (tested LED -
it works).

Here's my code (Parallax Programmer):

device pic16c71, rc_osc, wdt_off, protect_off

;       reset   start

count0  equ     10h
count1  equ     11h
count2  equ     12h

               clr     count0
               clr     count1
               mov     count2,#0Fh
               clr     ra

               mov     !ra,#00000001b

start   djnz    count0,start
               djnz    count1,start
               djnz    count2,start

               xor     ra,#00000010b
               mov     !ra,#00000001b

               mov count2,#0Fh
               jmp     start


Upon powering up, the LED is off, waits 3 seconds, comes on, then stays
on.  I don't have an oscillocope (know where I can buy one cheap?).

I've tried different pins, different 16C71's, etc.

Any help would be greatly appreciated.


--|
--|
--|  Troy Nelson   spamLinuxKing.....spamspamjuno.com
--|
--|

'Command confirmation request cancelled'
1997\01\23@020345 by Eddie

flavicon
picon face
I am fed up with this list server.
#@$#@*@@@ (curses deleted)
This is the 4th time i have tried to stop the rubbish.
maybe some of you guys can make your listserv more
user useful.
give the programmer another banana or something.

> L-Soft list server at MITVMA (1.8b) wrote:
> >
> > Your command:
> >
> >                                 SIGNOFF PICLIST
> >
> > has remained unconfirmed  for more than 48h and is  being cancelled. If you
> > did want it executed but were unable to send the confirmation in time, just
> > re-issue the command to get a new  confirmation code. The one you were sent
> > before can no longer be used.

''PIC controlled' Robot question'
1997\01\23@170359 by Berg, Russ: SAS

flavicon
face
Hi, I am putting together a small robot to compete in a "Sumo" style
competition in a few months, I have my basic algorithym worked out and have
tested it on a bread board with a 16c55 and LED's, but I am wondering what
would be the best way to detect my opponent, the competition ring is about 5
foot diameter, I am thinking using photo-transistors, I wouldn't need to
have a longer detection range than say 2 feet, anyway if someone has a web
page or knows of where I could find some good information I'd appreciate it.
-Russ

1997\01\23@170359 by Berg, Russ: SAS

flavicon
face
Hi, I am putting together a small robot to compete in a "Sumo" style
competition in a few months, I have my basic algorithym worked out and have
tested it on a bread board with a 16c55 and LED's, but I am wondering what
would be the best way to detect my opponent, the competition ring is about 5
foot diameter, I am thinking using photo-transistors, I wouldn't need to
have a longer detection range than say 2 feet, anyway if someone has a web
page or knows of where I could find some good information I'd appreciate it.
-Russ

1997\01\23@173419 by Mattias Engstršm

picon face
Berg, Russ: SAS wrote:

> foot diameter, I am thinking using photo-transistors, I wouldn't need to
> have a longer detection range than say 2 feet, anyway if someone has a web
> page or knows of where I could find some good information I'd appreciate it.

I'd also like to share some of this information if you get any
response.

Regards, Mattias Engstršm

1997\01\23@175928 by Gael WAICHE

picon face
Berg, Russ: SAS wrote:
>
> Hi, I am putting together a small robot to compete in a "Sumo" style
> competition in a few months, I have my basic algorithym worked out and have
> tested it on a bread board with a 16c55 and LED's, but I am wondering what
> would be the best way to detect my opponent, the competition ring is about 5
> foot diameter, I am thinking using photo-transistors, I wouldn't need to
> have a longer detection range than say 2 feet, anyway if someone has a web
> page or knows of where I could find some good information I'd appreciate it.
>  -Russ

I can remember that somebody made a PIC program called "sona-pic"
designed to control a Polaroid ultrasonic module. As far as I can
remember it has a range of several feet.

Gael

1997\01\23@192612 by Tony Matthews

flavicon
face
Mattias Engstrvm wrote:
>
> Berg, Russ: SAS wrote:
>
> > foot diameter, I am thinking using photo-transistors, I wouldn't need to
> > have a longer detection range than say 2 feet, anyway if someone has a web
> > page or knows of where I could find some good information I'd appreciate it.
>
> I'd also like to share some of this information if you get any
> response.
>
> Regards, Mattias Engstrvm
Hi are you going with an agressive or defensive posture and if you're
willing to divulge any other details (I understand you're in
competition) I for one would be interested? Earlier articles I chanced
upon fueled many daydreams.I particullarly liked the inverted dish that
sucked itself to the floor :) Tony M.

1997\01\24@035525 by efoc

flavicon
face
Berg, Russ: SAS wrote:
>
> Hi, I am putting together a small robot to compete in a "Sumo" style
> competition in a few months, I have my basic algorithym worked out and have
> tested it on a bread board with a 16c55 and LED's, but I am wondering what
> would be the best way to detect my opponent, the competition ring is about 5
> foot diameter, I am thinking using photo-transistors, I wouldn't need to
> have a longer detection range than say 2 feet, anyway if someone has a web
> page or knows of where I could find some good information I'd appreciate it.
>  -Russ


Hi I was involved in a simmilar project about 10 years ago. I used a
ultrasonic transducer pair mounted on a stepper motor to give me a 360
Deg viewing circle. The system worked great.

Cheers Peter .........


==================================
= New Ideas come from those who  =
= didn't know it wasn't possible =
==================================

1997\01\24@035525 by efoc

flavicon
face
Berg, Russ: SAS wrote:
>
> Hi, I am putting together a small robot to compete in a "Sumo" style
> competition in a few months, I have my basic algorithym worked out and have
> tested it on a bread board with a 16c55 and LED's, but I am wondering what
> would be the best way to detect my opponent, the competition ring is about 5
> foot diameter, I am thinking using photo-transistors, I wouldn't need to
> have a longer detection range than say 2 feet, anyway if someone has a web
> page or knows of where I could find some good information I'd appreciate it.
>  -Russ


Hi I was involved in a simmilar project about 10 years ago. I used a
ultrasonic transducer pair mounted on a stepper motor to give me a 360
Deg viewing circle. The system worked great.

Cheers Peter .........


==================================
= New Ideas come from those who  =
= didn't know it wasn't possible =
==================================


'dot matrix led driver help'
1997\02\05@155141 by Scott Horton
flavicon
face
I would like to drive (4 (or more)) 5x7 dot matrix type LED displays using
a PIC.  All I've ever done before are 7 segment which seem relatively easy
using latching decoders, etc.  I'd like to be able to update the display
(visually) at least once per second (not a clock but I need to display
information that could change once every second).

Can anyone help with how to do this?  I considered some kind of
multiplexing arrangement with rows and columns but I don't know the best
way to do this or even if that way would work fast enough.

Any/all thoughts and suggestions will be appreciated.

Scott

1997\02\05@164825 by Philippe TECHER

flavicon
face
On Wed, 5 Feb 1997, Scott wrote:

>I would like to drive (4 (or more)) 5x7 dot matrix type LED displays using
>a PIC.  All I've ever done before are 7 segment which seem relatively easy
>using latching decoders, etc.  I'd like to be able to update the display
>(visually) at least once per second (not a clock but I need to display
>information that could change once every second).

Try the SAA1064 chip, it's a 7 Segment driver with an I2C bus interface.
SAA1064 can drive 4 display which are multiplexed. In addition, there is
possibility to adjust luminosity by simply setting a register (there is
8 value to adjust led current). If you need more than 4 displays, you can
add another SAA1064 on the I2C bus and that's all.

Regards,
       Philippe (P.TECHERspam_OUTspam@spam@insat.com)

1997\02\05@195348 by Tony Matthews

flavicon
face
Philippe TECHER wrote:
>
> On Wed, 5 Feb 1997, Scott wrote:
>
> >I would like to drive (4 (or more)) 5x7 dot matrix type LED displays using
> >a PIC.  All I've ever done before are 7 segment which seem relatively easy
> >using latching decoders, etc.  I'd like to be able to update the display
> >(visually) at least once per second (not a clock but I need to display
> >information that could change once every second).
>
> Try the SAA1064 chip, it's a 7 Segment driver with an I2C bus interface.
> SAA1064 can drive 4 display which are multiplexed. In addition, there is
> possibility to adjust luminosity by simply setting a register (there is
> 8 value to adjust led current). If you need more than 4 displays, you can
> add another SAA1064 on the I2C bus and that's all.
>
> Regards,
>         Philippe (.....P.TECHERspamspam.....insat.com)
Try using portb buffered if you need the current as row drivers and
shift out via the a port to N (serial in parallell out) shift registers
also buffered. Tony M.

'Application controlled reset ???'
1997\02\17@182140 by Bob Segrest

picon face
Greetings,

I am writing code to use the PIC chip as a classic embedded controller.
One of the commands I would like to implement is a remote reset.  This
would allow the controlling system to issue a command that would tell the
PIC to restart and re initialize itself.

Is there an easy way to reset the PIC processor from a running application ???

The PIC in this particular endeavor is a 16C73A...

Bob Segrest

1997\02\17@182942 by Antti Lukats

flavicon
face
At 06:19 PM 17/2/97 -0500, you wrote:
>Greetings,
>
>I am writing code to use the PIC chip as a classic embedded controller.
>One of the commands I would like to implement is a remote reset.  This
>would allow the controlling system to issue a command that would tell the
>PIC to restart and re initialize itself.
>
>Is there an easy way to reset the PIC processor from a running application ???
>
>The PIC in this particular endeavor is a 16C73A...

you could just fall into loop and wait for Watchdog reset to happen.
(you must have Watchdog enabled)

there is no direct commands to implement reset in software.

antti

-- Silicon Studio Ltd.
-- http://www.sistudio.com

1997\02\17@185022 by Miller, Steve

flavicon
face
What about just a GOTO to address 00 ?  This will restart the code as if
a power-on reset occurred.  In your initilization routine, you will have
to set all the flags and options to known states.  But, I do not see why
it would not work.  Have I overlooked something?

---- Steve


----------
From:  pic microcontroller discussion [SMTP:PICLISTKILLspamspamEraseMEMITVMA.MIT.EDU]
Sent:  Monday, February 17, 1997 6:19 PM
To:  PICLIST
Subject:  Application controlled reset ???


Greetings,

I am writing code to use the PIC chip as a classic embedded controller.
One of the commands I would like to implement is a remote reset.  This
would allow the controlling system to issue a command that would tell the
PIC to restart and re initialize itself.

Is there an easy way to reset the PIC processor from a running
application ???

The PIC in this particular endeavor is a 16C73A...

Bob Segrest

1997\02\17@185607 by Antti Lukats

flavicon
face
At 05:50 PM 17/2/97 -0600, you wrote:
> What about just a GOTO to address 00 ?  This will restart the code as if
>a power-on reset occurred.  In your initilization routine, you will have
>to set all the flags and options to known states.  But, I do not see why
>it would not work.  Have I overlooked something?
>
> ---- Steve

GOTO 00 is not same as (COLD)reset. It depends on application program
what happends by GOTO 00, if the program expect to be running after
reset, ie expect some re-gisters have "reset" value, then GOTO 00
might just hang your program.

antti

-- Silicon Studio Ltd.
-- http://www.sistudio.com

1997\02\17@191027 by ONY NIXON 54964

flavicon
face
If your application originally began from a 'START' address, then if
a reset condition occurred you could GOTO a 'STARTB' address which
can leave some flags in a known state.

If an input pin going low will cause the reset condition then a flag
could be set indicating the reset. The 'STARTB' address does not
clear this flag, so the normal programs execution will ignore the low input
and clear the flag when this input goes high again.

Tony


Just when I thought I knew it all,
I learned that I didn't.

1997\02\17@192241 by myke predko

flavicon
face
An enhancement to what Tony says:

If you had an extra I/O pin, how about tying it directly to Reset like so:

                   Vdd
         |          |
         |          >
 PIC     |          <  Reset Pull-Up
         |          >
         |          |
    _MCLR|----------+
         |          |
      Pin|----------+
         |

Now, When you wanted to reset the device, enable the Pin to be low and the
PIC will reset itself.  When the PIC resets, all the I/O Ports go back to
Input and the _MCLR line goes back up high and you can start executing from
the beginning with a reset PIC again.

The reset code would be:

 bcf    PORTn, Pin             ;  Make Sure the Pin is Low
 bsf    STATUS, RP0
 bcf    TRISn, Pin             ;  Enable the Pin
 bcf    STATUS, RP0
 goto   $

The last two instructions would be for "safety", but probably wouldn't be
executed.  If an open collector (RA4) Pin was used, then the move to Bank1
wouldn't be required and the code would simply be:

 bcf    PORTA, 4

If it's an 18 Pin device, this really gets easy because RA4 is beside _MCLR.

myke

{Quote hidden}

"I don't do anything that anybody else in good physical condition and
unlimited funds couldn't do" - Bruce Wayne

1997\02\17@232133 by tjaart

flavicon
face
Bob Segrest wrote:
>
> Greetings,
>
> I am writing code to use the PIC chip as a classic embedded controller.
> One of the commands I would like to implement is a remote reset.  This
> would allow the controlling system to issue a command that would tell the
> PIC to restart and re initialize itself.
>
> Is there an easy way to reset the PIC processor from a running application ???
>
> The PIC in this particular endeavor is a 16C73A...
>
> Bob Segrest

I use a similar command. Clear PCLATH and PCL. It works fine for me,
because
I save the output states in EEPROM, so when the PIC starts up, its loads
all
the default output values.

The stack overflows badly when you do this, so the emulator doesn't like
the
command, but it works well in the OTP parts.

--
Friendly Regards

Tjaart van der Walt
EraseMEtjaart@spam@spam@spam@wasp.co.za
_____________________________________________________________
| Another sun-deprived R&D Engineer slaving away in a dungeon |
|             ASP International  http://wasp.co.za            |
|             GSM and GPS value-added applications            |
|  Voice : +27-(0)11-622-8686   |   Fax : +27-(0)11-622-8686  |
|_____________________________________________________________|

1997\02\18@004346 by David W. Duley

picon face
In a message dated 97-02-17 18:30:14 EST, you write:

<<
At 06:19 PM 17/2/97 -0500, you wrote:
>Greetings,
>
>I am writing code to use the PIC chip as a classic embedded controller.
>One of the commands I would like to implement is a remote reset.  This
>would allow the controlling system to issue a command that would tell the
>PIC to restart and re initialize itself.
>
>Is there an easy way to reset the PIC processor from a running application
???
>
>The PIC in this particular endeavor is a 16C73A...

you could just fall into loop and wait for Watchdog reset to happen.
(you must have Watchdog enabled)

there is no direct commands to implement reset in software.

antti
 >>
Now for my 2 cents worth.
One way that I have implemented this sort of thing is to use the Watchdog
timer to automatically reset the chip if it does not recieve a signal from
the host etc.
A periodic signal generated from a host computer prevents the remote
controllers from resetting.  If the signal is not there the remote will
reset.

If there is no host computer you could implement a reset instruction using
the watch dog timer by simply jumping to a tight loop that does not clear the
WDT. The net result will be a reset in a few milliseconds.
Hope this helps
Dave Duley
V.P. DreiTek Inc.

1997\02\18@023219 by John Dammeyer

flavicon
face
At 11:57 AM 17/02/1997 -0400, you wrote:
>At 05:50 PM 17/2/97 -0600, you wrote:
>> What about just a GOTO to address 00 ?  This will restart the code as if
>>a power-on reset occurred.  In your initilization routine, you will have
>>to set all the flags and options to known states.  But, I do not see why
>>it would not work.  Have I overlooked something?
>>
>> ---- Steve
>
>GOTO 00 is not same as (COLD)reset. It depends on application program
>what happends by GOTO 00, if the program expect to be running after
>reset, ie expect some re-gisters have "reset" value, then GOTO 00
>might just hang your program.
>
>antti
Personally I have never considered it wise to rely on what state the
hardware might be in after a cold start.  I believe robust programming means
initializing every thing to the state you want it right after power up and
before you use those peripherals.

So having said that I would jump t a routine that would a) disable all
interrupts if your flavour of the PIC has them and b) GOTO zero.  If that
hangs your program you probably deserve it. <grin>

John
Pioneers are the ones, face down in the mud,
with arrows in their backs.
Automation Artisans Inc.      Ph. 1-250-544-4950
PO Box 20002                  Fax 1-250-544-4954
Sidney, BC CANADA V8L 5C9

1997\02\18@083200 by Kalle Pihlajasaari

flavicon
face
Hi Bob,

> I am writing code to use the PIC chip as a classic embedded controller.
> One of the commands I would like to implement is a remote reset.  This
> would allow the controlling system to issue a command that would tell the
> PIC to restart and re initialize itself.
>
> Is there an easy way to reset the PIC processor from a running application ???
>
> The PIC in this particular endeavor is a 16C73A...

I have used a I/O pin in the past to reset PICs and Parallax Stamps.

Just connect your remaining pin to the _MCLR pin and when you want
to reset you just drive the pin to an output and then write a
zero to it.  This is very effective and clears the condition on the
pin when the chip has reset as the pins all change to inputs
after the reset.

The other alternative of letting the watchdog run-out by turning
off interrupts and running in a tight loop would cause a reset
from about 20 ms to 2 seconds later (depending on the watchdog
prescaler).  This requires you to have the watchdog fuse enabled
and also the reset will not be exactly the same as a MCLR reset.
You also need to service the watchdog in the rest of your code.
This option is not available with most of the preprogrammed interpreter
chips like the Stamps which is why I used the first method above.

Perhaps better yet is to use a pin to short the supply rail to ground
with the help of an external transistor that will cause a genuine
cold reset.  This might be requiired by some of the periferals
on some of the early silicon that had some quirks where a WD
or MCLR reset were nor enough to clear a stuck periferal (UART
I think was the problem one)

Cheers
--
Kalle Pihlajasaari   @spam@kallespamspamKILLspamip.co.za   http://www.ip.co.za/ip
Interface Products   P O Box 15775, DOORNFONTEIN, 2028, South Africa
+ 27 (11) 402-7750   Fax: 402-7751    http://www.ip.co.za/people/kalle

DonTronics, Silicon Studio and Wirz Electronics uP Product Dealer

1997\02\18@190733 by Steve Hardy

flavicon
face
> From: John Dammeyer <spamBeGonejohndRemoveMEspamEraseMEISLANDNET.COM>
>
> >
> >GOTO 00 is not same as (COLD)reset. It depends on application program
> >what happends by GOTO 00, if the program expect to be running after
> >reset, ie expect some re-gisters have "reset" value, then GOTO 00
> >might just hang your program.
> >
> >antti
> Personally I have never considered it wise to rely on what state the
> hardware might be in after a cold start.  I believe robust programming means
> initializing every thing to the state you want it right after power up and
> before you use those peripherals.
>
> So having said that I would jump t a routine that would a) disable all
> interrupts if your flavour of the PIC has them and b) GOTO zero.  If that
> hangs your program you probably deserve it. <grin>

It's no _less_ wise to rely on the published reset state than to rely
on the machine's correct execution of your initialisation code.

Really, in a small ram machine you shouldn't be wasting space doing
something which the manufacturer has guaranteed will be done for
you.  I will concede, however, that you should document any reliance
on reset state.

In the case of the original posting, where it is desired to simulate
a reset, then the above paragraph is not entirely true.  Nevertheless
one cannot truly simulate a reset by executing instructions from location
zero.  For a start, assertion of !MCLR immediately puts all port pins
in a high impedance state.  This cannot be done by sequential instructions
since only one port can be hi-Z'd(*) at once.  Also, are you _really_
going to go to the trouble of randomising your file registers?

Regards,
SJH
Canberra, Australia

(*) Some times I envy the American pronunciation of 'Z' (zee) since
it is much easier to say 'hi-zeed' than 'hi-zeded'.  Also the
American use of 'EZ' (easy) looks all wrong in the English speaking
world - eezed?

1997\02\19@030423 by lmclaren

flavicon
face
Bob Segrest wrote:
>
> Greetings,
>
> I am writing code to use the PIC chip as a classic embedded controller.
> One of the commands I would like to implement is a remote reset.  This
> would allow the controlling system to issue a command that would tell the
> PIC to restart and re initialize itself.
>
> Is there an easy way to reset the PIC processor from a running application ???
>
> The PIC in this particular endeavor is a 16C73A...
>
> Bob Segrest

The way I normaly do it is to use the watchdog timer in the program as
normal.
when I want a reset I go into a loop eg:

wait    goto wait

This will stop your clrwdt intruction from happening and cause a reset.
regards
--
Lee McLaren                          RemoveMElmclarenKILLspamspamRemoveMEtrumpet.com.au
Comstra pty. ltd.                    TakeThisOuTlmclarenspamcomstra.com.au
2 Kirksway place                     phone       03 62244488
Hobart Tasmania                      fax         03 62244601
Australia 7000                       mobil       018 138682

'It was five hours of Boggs's "channelling". After three hours
I asked him to summon up the soul of Jimi Hendrix and requested
All Along the Watchtower. You know, the guy's been dead
twenty years but he still hasn't lost his edge'
Mulder

1997\02\19@031454 by John Dammeyer

flavicon
face
At 11:16 AM 19/02/1997 EST, you wrote:
{Quote hidden}

If you never change what was done by the manufacturer after a power on reset
I suppose it will still be the same after a 'warm' start.  However relying
on that can be catastrophic if the manufacturer changes something in a chip
revision that is perhaps not fundamental to the operation of the of the
processor but convenient for manufacturing.

>I will concede, however, that you should document any reliance
>on reset state.

I agree.

>
>In the case of the original posting, where it is desired to simulate
>a reset, then the above paragraph is not entirely true.  Nevertheless
>one cannot truly simulate a reset by executing instructions from location
>zero.  For a start, assertion of !MCLR immediately puts all port pins
>in a high impedance state.  This cannot be done by sequential instructions
>since only one port can be hi-Z'd(*) at once.

If the ports are required to be in a HiZ state for some type of operation
and you cannot do that explicitly then perhaps we are discussing poor
programming or design  practices and insisting that we be able to practice
them.

>Also, are you _really_
>going to go to the trouble of randomising your file registers?

Why on earth would you want to do that?  I have seen C programmers get into
trouble by using auto-initialization for their variables and then when they
emulate a soft reset wonder why programs blow up.   Relying on random
variable values is even more dangerous.

int i = 5; is a perfect example of a variable that is initialized by startup
code.

Unless that re-startup is emulated perfectly, relying on i == 5 is
dangerous.  If there is a _need_ for a system initiated restart -
non-watchdog - then the initialization of i belongs in an init function.
When Pascal was developed auto init was not included; I believe for a good
reason.  By forcing a programmer to deliberately set variables to what they
must be,  there is an element of repeatability in the application.

In an embedded system, that can be as explicit as copying a series of values
contained in ROM into the variables;  but then it's controlled.

As I recall a Redstone missle went splashdown because a variable was named
starting with an I,J or K rather than an R or S.  For non Fortran
programmers,  variables defined starting with an I,J, or K were
automatically Integers and those starting with an R or S were automatically
floating point.  We have come a long way since then with proper typing and
compilers complaining about mixing types.  Relying on reset values is taking
a step backwards in time and has the _potential_ of subtle bugs in code.

I realize I won't get consensis with this but it's my opinion.



Regards,

John
Pioneers are the ones, face down in the mud,
with arrows in their backs.
Automation Artisans Inc.      Ph. 1-250-544-4950
PO Box 20002                  Fax 1-250-544-4954
Sidney, BC CANADA V8L 5C9

1997\02\19@091926 by mike

flavicon
picon face
In message  <m0vx6Nu-0006beC@mail> EraseMEPICLIST.....spamKILLspamMITVMA.MIT.EDU writes:
> At 11:16 AM 19/02/1997 EST, you wrote:
> >> From: John Dammeyer <spamjohndspamISLANDNET.COM>
> >>
> >> >

[snips]

{Quote hidden}

Excuse me for butting in here, but I think you missed the point.
All ports are set to HiZ by a /MCLR or POR at the same time. I
think the point that was being made is that it is not possible
to do that in software as you can only change one tris reg at
a time. So truly simulating a reset in software is not possible.

>
> >Also, are you _really_
> >going to go to the trouble of randomising your file registers?
>
> Why on earth would you want to do that?

No-one would want to do that, but after a POR, all ram is in a
random state. IFF you wanted to truly simulate POR in software, you
would have to randomise the ram contents or it wouldn't be
a true simultaion.

Regards,


Mike Watson

'LED or LCD alpha displays'
1997\02\27@203930 by Robert Zeff

flavicon
face
Hi,
I'm looking for a single line, eight char alphanumeric display
that will fit in a 1/2 high space.  HP makes one, but it's too
expensive.  Any suggestions?

Thanks,
             \\\|///
           \\  ~ ~  //
            (  @ @  )
+----------oOOo-(_)-oOOo---------+
|                                |
|          Robert Zeff           |
|        rzeffSTOPspamspamNikola.com        |
|        http://Zapco.com        |
|        http://Nikola.com       |
|        ^^^^^^^^^^^^^^^^^       |
| Free circuit simution software |
|                                |
+----------------Oooo------------+
         oooO   (   )
        (   )    ) /
         \ (    (_/
          \_)

1997\02\28@093659 by Andy Kunz

flavicon
face
At 05:38 PM 2/27/97 -0800, you wrote:
>Hi,
>I'm looking for a single line, eight char alphanumeric display
>that will fit in a 1/2 high space.  HP makes one, but it's too
>expensive.  Any suggestions?

Robert,

http://www.hantronix.com

Andy
==================================================================
Andy Kunz - Montana Design - 409 S 6th St - Phillipsburg, NJ 08865
         Hardware & Software for Industry & R/C Hobbies
       "Go fast, turn right, and keep the wet side down!"
==================================================================


'LED or LCD alpha displays'
1997\03\01@162240 by Robert Zeff
flavicon
face
part 0 799 bytes
Thanks,
--
Robert


-----Original Message-----
From:   Andy Kunz [SMTP:montanaSTOPspamspamKILLspamFAST.NET]
Sent:   Friday, February 28, 1997 6:36 AM
To:     @spam@PICLIST.....spamspamMITVMA.MIT.EDU
Subject:        Re: LED or LCD alpha displays

At 05:38 PM 2/27/97 -0800, you wrote:
>Hi,
>I'm looking for a single line, eight char alphanumeric display
>that will fit in a 1/2 high space.  HP makes one, but it's too
>expensive.  Any suggestions?

Robert,

http://www.hantronix.com

Andy
==================================================================
Andy Kunz - Montana Design - 409 S 6th St - Phillipsburg, NJ 08865
         Hardware & Software for Industry & R/C Hobbies
       "Go fast, turn right, and keep the wet side down!"
==================================================================

1997\03\02@155945 by jim ruxton

flavicon
face
You can check out Siemens. They make what looks ike a direct replacement for
the
HP displays. They are cheaper as well. I haven't tried them as yet.

>Hi,
>I'm looking for a single line, eight char alphanumeric display
>that will fit in a 1/2 high space.  HP makes one, but it's too
>expensive.  Any suggestions?

                                               Jim

'Looking for Bob BLICK/ Scanned LED Clock'
1997\03\12@125713 by Antti Lukats

flavicon
face
At 04:18 PM 12/3/97 +0000, you wrote:
>Maybe Bob should patent his clock before someone else starts
>marketing it ...

I think it is been on the market some while already,
not exactly the same but very close.

In "Natural Woners" (Westlake Center, Seattle, Washington)
I did see a LED scanned clock, few months ago already!
I suppose it is in sale nationwide.

Well it had no motor (it had to be put into motion by hand),
movement was left<>right not rotating, but a scanned clock anyway.

antti

-- Silicon Studio Ltd.
-- http://www.sistudio.com

1997\03\12@131350 by Philip Restuccia

flavicon
face
{Quote hidden}

It's available (or was, a few weeks ago) in Smithhaven Mall, Lake Grove,
Long Island, NY too.  A pendulum movement ... seemed somewhat more expensive
than its construction would merit, I thought.

       Philip Restuccia
       spamphilip.restuccia.....spam.....peri.com

'LED matrix & Multiplexing ?'
1997\03\15@152609 by Philip Martin

flavicon
picon face
Hi All,

I am just starting to think about a project that will require various
patterns to be generated on a matrix of LED's.

8 * 8 would be ideal, giving 64 LED's but as I will require 4 other I/O
lines and they will be Tri Colour LED's 7 * 7 (49) may be more
achievable. Of course the other problem with this type of display is
that the drive to the LED's will have to be multiplexed.

My thoughts so far are that the port A0 - 6 would drive the common
cathodes (via an 8* ULN darlington driver) and the Red / Green anodes
would be driven via ULN's on B0 - 6. Bits A7 and B7 would be used to
turn on the required ULN anode line. This would then enable LED and
colour selection.

So far we have 16 I/O's plus the other 4 required lines, means a 28 pin
package.

Questions:

Any body done this before.

What would be the best PIC to use.

Any one got any thoughts on the multiplexing.

TIA.

--
Philip Martin   ----------------------------------------------------------------
Royal Quays             If at first you don't succeed, try again. Then quit:
North Shields.          no use being a damn fool about it !
                                                       W.C. Fields
email philip.....spamphilmart.demon.co.uk

1997\03\16@193457 by myke predko

flavicon
face
Phillip,

I did something like this a few years ago when I first got into PICs.  I
created a 3x3 two coloured matrix using two leaded two colour LEDs.  The
final project was going to be a tic-tac-toe board.

They were hooked up with a 220 Ohm Current Limiting Resistor in Row/Column
format and to turn on an individual LED in the Matrix, the TRIS bit for the
respective row and column was turned on with the colour (Red/Green/Off)
being selected by making either the Row/Column High.

I think this could be done in a very similar manner using tri-coloured LEDs
(eliminating the need for the ULN parts).


Not to many problems and pretty easy to program using a TMR0 Interrupt Handler.
The concerns I had were:

1.  I put a Switch Matrix in with it at the same time.  Pressing a button
would cause the LED at the button to light weakly (this may be desireable).

2.  Memory.  I never came up with a great way to store the 18 bits (two bits
for each LED red/green/off/off) required for the current display value.
This might be a major issue with an 8x8 array and some of the smaller PICs.

3.  I could never tell the difference between the colours (I'm
colour-blind).  Two-Colour LEDs seem to have less differences than other
LEDs (I can usually tell red/yellow/green by the different intensities of
the light - not so with these parts).

Actually, it was number 3 that caused me to give up on the project.

Good Luck, I'm interested in hearing what you come up with.

myke
{Quote hidden}

----------------------------------------------------------------
>Royal Quays             If at first you don't succeed, try again. Then quit:
>North Shields.          no use being a damn fool about it !
>                                                        W.C. Fields
>email KILLspamphilipspam_OUTspamphilmart.demon.co.uk
>
>

"Some people say that foreign cars handle best, while others say domestic.
For my money, nothing handles as well as a rental car." - P.J. O'Rourke

1997\03\17@040600 by Peter Wintulich

flavicon
face
part 0 2013 bytes content-type:image/gif1) Using a 47hc4017 as a colum driver in various ways:

A) Drive the clock lines seperately one for each LED colour,
and have a common MR (Master Reset).

B) Use a common clock line but seperate MR's one for each
colour.

C) Cascade two 4017's having one clock & one MR line, and
interlive the collums of LED colours. PIC port RB could
directly drive the row of LEDs via current limit resistors.

   After thinking about the above options I thought the colour
mixing would be too messy & not officiant.
(option C seamed simplest but would only light 8 leds at a
time.)

2) Using 74hc374 (Octal Latch) for each LED colour.
   This would allow 16 LEDs to light at once (giving a brighter
display) & is easy to get colour mixing. This uses PIC port
RB as an 8 bit bus, which is connected to the inputs of each
Octal Latch & directly to the collum drives (For up to 8
collums). Two other PIC O/Ps are used to latch the data into
each Octal Latch. The -OE (Output Enable) lines of the
latches could be tied LOW, always enabled.

For a wider display:

A) For 10 collums use the two PIC O/Ps that Opperate the
Octal latches as the latches are  rising edge triggered. Only
Reset the lines LOW if you don't want them high.

B) Use a shift register or equivelent to the required bit length.
The clock can be one of the Octal Latch latch inputs. The
reseting of the shift register could be by a seperate PIC O/P
or by an AND, OR or NOR of the two latch lines for the Octal
Latches.

C) A combination of  using RB lines & a shift register could
be used to keep extra components to a minimum.

4017's make OK for collum scanners (active high o/p), they
can be cascaded although this could reduce their effective
width to 8 or 9 bits depending on how they are connected
together.

Bye for now...Click

Content-Type: image/gif
Content-Disposition: attachment; filename="8X8X2.GIF"
Content-Description: CompuServe GIF graphic

Attachment converted: wonderlandfive:8X8X2.GIF (GIFf/JVWR) (0000D25F)

1997\03\17@042053 by tjaart

flavicon
face
Peter Wintulich wrote:
{Quote hidden}

Something you could consider, is to hook a bicolour (two terminal)
LED to the output of a common inverter gate, and a voltage divider.
By driving the input high, low, or toggling, you can create a couple
of colours. Power the inverter from 10V.

--
Friendly Regards

Tjaart van der Walt
spam_OUTtjaartspamTakeThisOuTwasp.co.za
_____________________________________________________________
| Another sun-deprived R&D Engineer slaving away in a dungeon |
|             WASP International  http://wasp.co.za           |
|             GSM and GPS value-added applications            |
|  Voice : +27-(0)11-622-8686   |   Fax : +27-(0)11-622-8686  |
|_____________________________________________________________|

1997\03\17@043337 by Andrew Warren

face
flavicon
face
Tjaart van der Walt <.....tjaart.....spamRemoveMEwasp.co.za> wrote:

> Something you could consider, is to hook a bicolour (two terminal)
> LED to the output of a common inverter gate, and a voltage divider.
> By driving the input high, low, or toggling, you can create a couple
> of colours. Power the inverter from 10V.

Tjaart:

If I correctly understand what you're describing, that method works
even WITHOUT the inverter... A 2.5-volt drop across the LED is
enough to light it, so you can just put the bicolor LED between the
PIC and the voltage divider.

-Andy

=== Andrew Warren - spam_OUTfastfwdTakeThisOuTspamEraseMEix.netcom.com
=== Fast Forward Engineering - Vista, California
===
=== Custodian of the PICLIST Fund -- For more info, see:
=== www.geocities.com/SiliconValley/2499/fund.html

1997\03\17@050459 by tjaart

flavicon
face
Andrew Warren wrote:
>
> Tjaart van der Walt <EraseMEtjaartspamBeGonespamKILLspamwasp.co.za> wrote:
>
> > Something you could consider, is to hook a bicolour (two terminal)
> > LED to the output of a common inverter gate, and a voltage divider.
> > By driving the input high, low, or toggling, you can create a couple
> > of colours. Power the inverter from 10V.
>
> Tjaart:
>
> If I correctly understand what you're describing, that method works
> even WITHOUT the inverter... A 2.5-volt drop across the LED is
> enough to light it, so you can just put the bicolor LED between the
> PIC and the voltage divider.

The bicolour (bicolor in America) LED drops about 2.2 volt, so with
the output at Vdd - 0.7 volt (as per specs), you'll find the one LED
quite faint. When driving both by toggling them, you'll find a quite
unsatisfactory result. (I discovered this the hard way)

I'm not sure why the bicolours need more juice, but they do.

You also have to keep in mind that you have to drive the LED hard enough
so you won't see the difference between 100% duty cycle and 50% duty
cycle.

--
Friendly Regards

Tjaart van der Walt
RemoveMEtjaartspamBeGonespamspamwasp.co.za
_____________________________________________________________
| Another sun-deprived R&D Engineer slaving away in a dungeon |
|             WASP International  http://wasp.co.za           |
|             GSM and GPS value-added applications            |
|  Voice : +27-(0)11-622-8686   |   Fax : +27-(0)11-622-8686  |
|_____________________________________________________________|

1997\03\17@054903 by Andrew Warren

face
flavicon
face
I wrote:

> A 2.5-volt drop across the LED is enough to light it, so you can
> just put the bicolor LED between the PIC and the voltage divider.

and Tjaart van der Walt <@spam@tjaartspamspamwasp.co.za> replied:

> The bicolour (bicolor in America) LED drops about 2.2 volt, so with
> the output at Vdd - 0.7 volt (as per specs), you'll find the one LED
> quite faint. When driving both by toggling them, you'll find a quite
> unsatisfactory result. (I discovered this the hard way)
>
> I'm not sure why the bicolours need more juice, but they do.

   Thanks for the info, Tjaart.

   I've used a 2.5-volt divider with discrete LEDs, but never with
   one of the two-lead bicolor LEDs... I didn't realize that they
   required higher voltages.

   -Andy

=== Andrew Warren - TakeThisOuTfastfwdKILLspamspam@spam@ix.netcom.com
=== Fast Forward Engineering - Vista, California
===
=== Custodian of the PICLIST Fund -- For more info, see:
=== www.geocities.com/SiliconValley/2499/fund.html

1997\03\17@194234 by taking

flavicon
face
Just in case you end up needing more current since multiplexed leds
need a lot when they're on, the ACT (I THINK!!  One of the not too
common series..)  the 574 can source 48 and sink 64 milliamps..



> 2) Using 74hc374 (Octal Latch) for each LED colour.
>     This would allow 16 LEDs to light at once (giving a brighter
> display) & is easy to get colour mixing. This uses PIC port
> RB as an 8 bit bus, which is connected to the inputs of each
> Octal Latch & directly to the collum drives (For up to 8
> collums). Two other PIC O/Ps are used to latch the data into
> each Octal Latch. The -OE (Output Enable) lines of the
> latches could be tied LOW, always enabled.

1997\03\18@191050 by Byron A Jeff

face picon face
>
> Just in case you end up needing more current since multiplexed leds
> need a lot when they're on, the ACT (I THINK!!  One of the not too
> common series..)  the 574 can source 48 and sink 64 milliamps..

Another possibility is the TI TPIC5B595 which is the equivalent pinoutwise
of the 74X595 chip but can sink 150ma continous on each output pin.

Can make things a lot brighter.

BAJ
{Quote hidden}


'LED 16c84'
1997\04\16@015547 by andreabelian
picon face
Hi all

I am working with simple led on off swich and I can not make it work.
Please  explaine .
             +----------+ 5v
             |
            | | 10k
16c84       |_|
-------+      |
porta |      |      /
  as  |+-----+-----/ +---|+  gnd
input |        PORTA BIT1
      |


;---------------------------------
porta           equ                     05
portb           equ                     06
;---------------------------------


                       MOVLW           B'11111111'             ; MAKE PORTA INP
UT
                       TRIS            PORTA                           ; DO IT
                       MOVLW           B'11111011'             ; MAKE PORTB BIT
2 OUTPUT
                       TRIS            PORTB                           ; DO IT
LOOP            BTFSS           PORTA,1                 ; SKIP IF IT IS 1
                       BCF                     PORTB,2                 ; CLEAR
PORTB
                       BTFSC           PORTA,1                 ; SKIP IF IT IS
0
                       BSF                     PORTB,2                 ; TURN L
ED ON
                       GOTO            LOOP                            ; JUMP
                       END


THA WAY I WANT TO MAKE IT WORK IS
WHEN I PUSH THE BUTTON LED STAYS ON UNTIL I PUSH IT AGAIN TURNS OFF.
RIGHT NOW IF I PUSH THE SWICH IT WILL TURN ON BUT WHEN I REALICE IT
WILL TURN OFF.

PLEASE TELL ME WHAT IS WRONG?



       THANK YOU


ANDRE












                    _____________________________________
                   /                                    /\
                  /   Andre  Abelian  818.840-0003     /
/\                                                 /       Data Image
Technology       _/ /                                             /
.....andreabelianRemoveMEspamearthlink.net    / \/
               /        1128 Alameda Ave.ste 4      /\
              /           Glendale  CA  91201      /
/
             /____________________________________/ /
             \____________________________________\/
              \  \  \  \  \  \   \  \  \  \  \  \  \

1997\04\16@022302 by andreabelian

picon face
Hi all

I am working with simple led on AND off swich and I can not make it
work.
Please  explaine .
             +----------+ 5v
             |
            | | 10k
16c84       |_|
-------+      |
porta |      |      /
  as  |+-----+-----/ +---|+  gnd
input |        PORTA BIT1
      |


;---------------------------------
porta           equ                     05
portb           equ                     06
;---------------------------------

      MOVLW    B'11111111'   ; MAKE PORTA IN
      TRIS     PORTA         ; DO IT
      MOVLW    B'11111011'   ; MAKE PORTB OUT
      TRIS     PORTB         ; DO IT
LOOP   BTFSS    PORTA,1       ; SKIP IF IT IS 1
      BCF      PORTB,2       ; CLEAR
      BTFSC    PORTA,1       ; SKIP IF IT IS 0
      BSF      PORTB,2       ; TURN LED ON
      GOTO     LOOP          ; JUMP
               END


THE WAY I WANT TO MAKE IT WORK IS
WHEN I PUSH THE BUTTON LED STAYS ON UNTIL I PUSH IT AGAIN TURNS OFF.
RIGHT NOW IF I PUSH THE SWICH IT WILL TURN ON BUT WHEN I REALEC IT
WILL TURN OFF.

PLEASE TELL ME WHAT IS WRONG WITH MY CODE?



       THANK YOU


ANDRE



























                    _____________________________________
                   /                                    /\
                  /   Andre  Abelian  818.840-0003     /
/\                                                 /       Data Image
Technology       _/ /                                             /
KILLspamandreabelianspamTakeThisOuTearthlink.net    / \/
               /        1128 Alameda Ave.ste 4      /\
              /           Glendale  CA  91201      /
/
             /____________________________________/ /
             \____________________________________\/
              \  \  \  \  \  \   \  \  \  \  \  \  \

1997\04\16@123851 by Robert S Gray

flavicon
face
----------
> From: Andre Abelian <TakeThisOuTandreabelianspamspam_OUTEARTHLINK.NET>
> To: RemoveMEPICLISTspamspamSTOPspamMITVMA.MIT.EDU
> Subject: LED 16C84
> Date: Sunday, April 14, 1996 5:13 PM
>
> Hi all
>
> I am working with simple led on AND off swich and I can not make it
> work.

I would try something like the following:

LOOP   BTFSC            PORTA,1         ;exit loop if switch pressed
       GOTO            LOOP
       MOVLW   0x04            ;effect only bit 2
       XORWF           PORTB           ;toggle current led state
       GOTO            LOOP            ; JUMP
           END

Now you'll have switch release problems.  Just define a flag to eliminate
that.

flags   equ     21                      ;wherever you wish to define it in RAM
#define SwitchCheck     flags,0         ;we'll use bit0 of flags
;
; put in your setup code as before.
;
       BCF             SwitchCheck     ;clear flag, show switch released
LOOP   BTFSS            PORTA,1         ;switch pressed?
       GOTO            ItsPressed      ;yes, jump
       BCF             SwitchCheck     ;clear flag, show switch released
       GOTO            LOOP            ;continue loop, not pressed
ItsPressed:
       BTFSC           SwitchCheck     ;already handled this press?
       GOTO            LOOP            ;yes - ignore and return to loop
       BSF             SwitchCheck     ;turn on flag to show this press has bee
n                                       ; handled
       MOVLW   0x04            ;change only bit 2
       XORWF           PORTB           ;toggle current led state
       GOTO            LOOP            ;return to loop
           END
;
; Now you'll have to handle debouncing the switch and debugging this code.
Make
;  sure the logic isn't reversed on checking for switch press.
;

1997\04\16@173525 by Gerhard Fiedler

picon face
At 14:13 14/04/96 -0800, Andre Abelian wrote:
{Quote hidden}

It does just what you programmed. Check the program flow instrution for
instruction, and you'll see... You may set up two loops, one in which it
stays while the LED is off, and another one in which it stays while the LED
is on. (There are many other possibilities, but you need two operating
states.)

Gerhard

1997\04\17@090819 by Mark Jurras

flavicon
face
> PLEASE TELL ME WHAT IS WRONG WITH MY CODE?

Andrea,

You need to debounce the switch. When a switch opens and closes the contacts
connect and disconnect intermittently at first. Put a scope on input and
look at the edge when you open and close the switch to see what I mean. To
fix this a little more software is needed.

Each time you detect a press pause for a short time and check again to see
if the switch is still pressed. If it is, then consider the button to be
pressed. Similarly each time you detect a release pause for a short time and
check again to see if the switch is still released. If it is, then consider
the switch to be released.

I don't know how long you should pause so a little experimentation might be
necessary.

- -Mark

1997\04\17@092934 by Norm Cramer

flavicon
face
>
>I don't know how long you should pause so a little experimentation might be
>necessary.


I seem to have good luck with a delay of about 20 - 30 milliseconds.  This
time is not real critical since it is "slow" for the PIC and "real fast"
for the user.

Norm


'LED Signboard'
1997\05\13@205325 by Jann P. Kaminski
flavicon
face
I am interested in making custom signboards out of LED modules (5x7)
using PIC uC's. Signboards are those scrolling displays or marquees seen
wherever advertisers want their message observed. Is there a schematic /
program for this project? Useful features would be expandable character
table, string length, panning, scrolling, ....  Any information would be
helpful.
J Kaminski

'LED Signboards'
1997\05\14@164137 by Mark G. Forbes

flavicon
face
>Date:    Tue, 13 May 1997 17:12:11 -0700
>From:    "Jann P. Kaminski" <.....JannEraseMEspamUNIAX.COM>
>Subject: LED Signboard

>I am interested in making custom signboards out of LED modules (5x7)
>using PIC uC's. Signboards are those scrolling displays or marquees seen
>wherever advertisers want their message observed. Is there a schematic /
>program for this project? Useful features would be expandable character
>table, string length, panning, scrolling, ....  Any information would be
>helpful.
>J Kaminski

In a nutshell, you need more horsepower than you might think for projects
like this. These displays are typically scanned, and that imposes a lot of
overhead on your CPU to keep the display refreshed properly. If you don't
go fast enough, you get flickering. It's important to note that the flicker
can be acceptable if you're looking straight at it, but can be very annoying
if your eyes are moving around (as in our industry, where we make these
kinds of signs for use in casinos).

As the sign increases in size, you need to make some hard decisions regarding
the kinds of information you want to present. If you're only interested in
character data, then you can store font images and assemble a display screen
with fairly small amounts of storage. If you plan to display graphics, you'll
need more space. If you want animations, plan on *lots* of space, since you
won't have time to do any clever mathematical transformations in real time.
You'll need to just store every frame of the animation, then play them back
sequentially.

Most manufacturers use high-current drivers like the Allegro parts, which
combine a shift register and output drivers. You need to work out a column
and row scanning system that will refresh your display, and then send the
appropriate clock, enable, data and strobe signals to the driver chips. It's
not a trivial amount of work. We have several people devoted full-time to
display development.

After you've got all that stuff working right, then you can start worrying
about the higher-level issues of scrolling, flashing, blinking and the
types of information you'll present. Note that you may have to modify your
display refresh algorithm depending on the kind of motion or effects you're
trying to achieve.

They aren't cheap to build, either. LED modules go for $5-6 each in small-ish
quantities, and you can easily put several hundred dollars into the display
modules alone. Good luck with your project.


Mark G. Forbes, R & D Engineer  |  Acres Gaming, Inc.    (541) 766-2515
KC7LZD                          |  815 NW 9th Street     (541) 753-7524 fax
spamBeGoneforbesmspamRemoveMEpeak.org                |  Corvallis, OR 97330
http://www.peak.org/~forbesm
.....mforbesEraseMEspamhq.acresgaming.com

"There has been an alarming increase in the number of things I know nothing
about."
---Anomalous

1997\05\14@200642 by John Payson

flavicon
face
> >I am interested in making custom signboards out of LED modules (5x7)
> >using PIC uC's. Signboards are those scrolling displays or marquees seen
> >wherever advertisers want their message observed. Is there a schematic /
> >program for this project? Useful features would be expandable character
> >table, string length, panning, scrolling, ....  Any information would be
> >helpful.
> >J Kaminski
>
> In a nutshell, you need more horsepower than you might think for projects
> like this. These displays are typically scanned, and that imposes a lot of
> overhead on your CPU to keep the display refreshed properly. If you don't
> go fast enough, you get flickering. It's important to note that the flicker
> can be acceptable if you're looking straight at it, but can be very annoying
> if your eyes are moving around (as in our industry, where we make these
> kinds of signs for use in casinos).

"That depends".  For scrolling text applications, a simple PIC may be
quite sufficient (even a 12C508 plus EEPROM for very small signs like the
42x5's that seem popular on fast food menus).  As for refresh rate, that
depends a lot upon whether you're displaying static or scrolling images.
For static images, the faster the better; for scrolling images, you want
to scroll an integer number of pixels per frame [typically one] unless
you're doing tricky fractional-dot techniques.

> As the sign increases in size, you need to make some hard decisions regarding
> the kinds of information you want to present. If you're only interested in
> character data, then you can store font images and assemble a display screen
> with fairly small amounts of storage. If you plan to display graphics, you'll
> need more space. If you want animations, plan on *lots* of space, since you
> won't have time to do any clever mathematical transformations in real time.
> You'll need to just store every frame of the animation, then play them back
> sequentially.

Here again, "that depends".  If your animation merely consists of sliding
sprites around, where each sprite has 2-4 frames, you can do the motion in
code with just the sprites in RAM/ROM.

> Most manufacturers use high-current drivers like the Allegro parts, which
> combine a shift register and output drivers. You need to work out a column
> and row scanning system that will refresh your display, and then send the
> appropriate clock, enable, data and strobe signals to the driver chips. It's
> not a trivial amount of work. We have several people devoted full-time to
> display development.

Need anyone to do some contract for you?  I've been itching to do one of
those things for years; at present all I have are small 5x28 and 7x40
units I wired myself [the 7x40 was a real pain... I shoulda spent the $100
or so and got a PCB].

> After you've got all that stuff working right, then you can start worrying
> about the higher-level issues of scrolling, flashing, blinking and the
> types of information you'll present. Note that you may have to modify your
> display refresh algorithm depending on the kind of motion or effects you're
> trying to achieve.

Your last point is extremely important, though I think you need to "worry"
about the higher level issues before you design the circuit.  For example,
unless you have a single scan which goes from one edge of the screen to
the other, you will need to watch out for "seams".  For example, if you
have a 15 dot high display which is wired as three groups of five scanned
rows, you will need to take special measures in your scanning if you wish
to avoid visible seams between these groups.

Also, you should consider the question of whether you want to use a bitmap
buffer to hold the current screen, or whether you wish to generate it
continuously from characters as you're scanning.  If you have a "large"
CPU [i.e. something with external RAM] this question is often a no-brainer
(just do it), but when trying to produce a minimal design, it can be a bit
more complicated.  For example, the easiest method of avoiding seams
requires that you approximately double your display buffer allocation if
you use a bitmap; if you're converting text-to-bits as you scan, then you
may not require the extra buffering but your algorithms will be more
complex.

> They aren't cheap to build, either. LED modules go for $5-6 each in small-ish
> quantities, and you can easily put several hundred dollars into the display
> modules alone. Good luck with your project.

Depends.  Jameco has certain modules available pretty cheap.  For example,
a 5x8 module (1.5"x2.4") with anode-column, cathode-row (if memory serves)
is $1.95 for one, $1.75ea for 25, $1.25ea for 100, and $0.99ea for 250.  A
40x5 sign would cost less than $10 for the LED's, and even a 64x15 sign
(19.2"x4.5") would only cost you about $44 (along with a spare module)

1997\05\15@013432 by Michael Coop

flavicon
face
part 0 1238 bytes
I haven't played assembler for about 10 years, so I just bought a PicStart-Plus kit to work on a project in hand - which requires large format animated alphanumeric displays (about 30 panels)

Just doing the preliminary number crunching, I came out with quite respectable results for the multiplexing -

256 columns (8 bits per column)
CPU clock @ 4MHz
100Hz refresh rate

Provides enough time for almost 40 (16Cxx) instructions per column scanned.

If the comms is handled inbetween scans, the interruption should be minimal for most applications.
Say 9600bps / message is 256bytes (close enough), then the comms should happen in about 0.3s

Although I concede that cranking the clock up to 10MHz provides a lot more room for animation etc, where bit patterns need to be processed on the fly for all columns in each scan (updating the contents of the display more than 25 times/sec is pointless, as the viewer will never see it), so there is more time available than appears - if I'm not wrong ???

I think that's what I wanted to say...

Anyway, if anyone feels like sharing some of their source code - feel free... :)


Michael Coop
Tel:    +60 3 411-6900
Fax:    +60 3 411-8260
Mobile: +60 12 206-1116
email   spammcoopspam_OUTspam@spam@pop.jaring.my


1997\05\17@123848 by DTU- No Proxi

flavicon
face
>For static images, the faster the better; for scrolling images, you want
>to scroll an integer number of pixels per frame [typically one] unless
>you're doing tricky fractional-dot techniques.

> After you've got all that stuff working right, then you can start
worrying
> about the higher-level issues of scrolling, flashing, blinking and the
> types of information you'll present. Note that you may have to modify
your
> display refresh algorithm depending on the kind of motion or effects
you're
> trying to achieve.

>Your last point is extremely important, though I think you need to
"worry"
>about the higher level issues before you design the circuit.  For
example,
{Quote hidden}

Hmmm, Interresting. I actully just made a LED panel and I'm having some
problems. When the picture is moving the dots seems to be double (is this
what you call "seams"). I fount out that I could remove this by setting
the
refresh rate down to once per frame. But then I get flickker due to the
low
refresh rate.
What can I do to prevent this when I change the refresh rate?
And how these special refresh algorithms working?
Can the problem be solved by double the display buffer, and how?

Thanks in advance

  Lars

----------------------------------------------
email: spamLJ@spam@spamSTOPspamPOBoxes.com
----------------------------------------------

1997\05\17@132252 by John Payson

flavicon
face
> Hmmm, Interresting. I actully just made a LED panel and I'm having some
> problems. When the picture is moving the dots seems to be double (is this
> what you call "seams"). I fount out that I could remove this by setting
> the
> refresh rate down to once per frame. But then I get flickker due to the
> low
> refresh rate.
> What can I do to prevent this when I change the refresh rate?
> And how these special refresh algorithms working?
> Can the problem be solved by double the display buffer, and how?

I'd suggest that you--either in your imagination or in reality--place a
piece of acetate or other transparent material over the signboard and move
it right to left at the rate the dots will be moving.  Every time a dot
flashes, mark it on the acetate.  [obviously, doing this for real would
require the ability to step through the frames unless you've got a REALLY
fast hand with that Sharpie(r)].

If you do this with a display that's shown twice per, you will observe
that each dot will appear twice on the acetate; the second appearance will
be 1/2 dot to the right of the first.  There is no way to rid yourself of
this phenomenon other than by speeding up the scrolling, slowing down the
refresh, or both so as to be at a rate of one dot per frame.  If neither
of these options is acceptable, you can try instead to take advantage of
the phenomenon by doubling the width of your display buffer and showing
the even pixels on one flash and the odd ones on the other.  This will
allow you to double the perceived resolution of your display, and may help
to reduce the annoying double-dottiness of the scroll.

Additionally, if you are using discrete LED's you may improve the
appearance of *scrolling* text by staggering the LED's in alternate rows.
You then scan the rows in even/odd order, so that the flicker will be less
noticeable than on a straight scan.  Unfortunately, this will be a bit of
an annoying display layout for anything other than text which is scrolling
at the proper speed, but such is life.

1997\05\17@154444 by Miller, Steve

flavicon
face
>Hmmm, Interresting. I actully just made a LED panel and I'm having some
>problems. When the picture is moving the dots seems to be double (is this
>what you call "seams"). I fount out that I could remove this by setting
>the
>refresh rate down to once per frame. But then I get flickker due to the
>low
>refresh rate.
>What can I do to prevent this when I change the refresh rate?
>And how these special refresh algorithms working?
>Can the problem be solved by double the display buffer, and how?

>Thanks in advance

>   Lars


At a previous employment, we exclusively made custom LED signboards.  The trick
to a smooth scroll is to have each dot of every column or row ( depends on which
way you are scanning), to be illuminated for the same length of time.  My guess
is that you are doing a column scan refresh.  These columns extend from column 1
to n.  When a pixel moves from column 1 in one section to column n in an
adjacent section, that dot will be illuminated for two consecutive scans.  The
visual effect is that characters seem to distort only at the seam boundaries.
The fix we used was some fairly complex rules to "predistort" the characters as
they crossed the boundaries.  It worked fine until you tried to pause a
scrolling message, then distorted characters were visible.  I no longer work for
that company, so I do not have the details on the distortion any more.

If your pixels are doubled across the entire signboard during a scroll, then you
are not moving you characters in memory correctly.  The character MUST advance
one pixel for each refresh field.  If the character advances slower that one
pixel for each refresh field, then smearing of doubling occurs.  Remember in a
scrolling message display the scroll rate determines the refresh rate.  The
faster you scroll, the faster you must refresh and vice versa.  Slow scroll
rates always flicker, its the nature of the beast.

Good Luck

---- Steve

1997\05\18@073154 by Leon Heller

flavicon
picon face
In message <spamBeGone199705171625.SAA11626spamBeGonespam@spam@nis.student.dtu.dk>, DTU- No Proxi
<RemoveMEljRemoveMEspamRemoveMEPOBOXES.COM> writes
>Hmmm, Interresting. I actully just made a LED panel and I'm having some
>problems. When the picture is moving the dots seems to be double (is this
>what you call "seams"). I fount out that I could remove this by setting
>the
>refresh rate down to once per frame. But then I get flickker due to the
>low
>refresh rate.
>What can I do to prevent this when I change the refresh rate?
>And how these special refresh algorithms working?
>Can the problem be solved by double the display buffer, and how?

The double dots sound like "temporal aliasing", similar to the effect
you get when you move a mouse rapidly - you see several copies of the
pointer. It's caused by the persistence of vision.

Leon
--
Leon Heller
Amateur radio callsign: G1HSM
Email: leonKILLspamspamspamlfheller.demon.co.uk http://www.lfheller.demon.co.uk
Tel: +44 (0) 118 947 1424 (home) +44 (0) 1344 385556 (work)

'How to display numbers in a LED display'
1997\05\20@171731 by Jose Antonio Noda

flavicon
face
Hi,

I know a little about the microcontroller PIC16C84,
and I would like make a little counter with a LED display,
and a 16C84 chip.
I have made my first proyects with the PIC16C84,
and now I would like make a 0 to 9 counter with a 16C84 chip.
Please, could you help me with a little source code,
and a little scheme or how to connect the display?.
Please, help me with this proyect of the counter!.

Regards,
Jose Antonio
spam_OUTjant_noda@spam@spamredestb.es

1997\05\20@184445 by andreabelian

picon face
Jose Antonio Noda wrote:
>
> Hi,
>
> I know a little about the microcontroller PIC16C84,
> and I would like make a little counter with a LED display,
> and a 16C84 chip.
> I have made my first proyects with the PIC16C84,
> and now I would like make a 0 to 9 counter with a 16C84 chip.
> Please, could you help me with a little source code,
> and a little scheme or how to connect the display?.
> Please, help me with this proyect of the counter!.
>
> Regards,
> Jose Antonio
> TakeThisOuTjant_nodaspam_OUTspamredestb.es


try this

               PC              EQU             OX02
               COUNT   EQU             0X0C

                               MOVF    COUNT,W
                               CALL    SEGMENTS
                               MOVWF   PORTB

       SEGMENTS        ADDWF   PC,F    ; ADD OFFSET TO PGM CTR
                               RETLW   3F              ; 0
                               RETLW   06              ; 1
                               RETLW   53              ; 2
                               RETLW   4F              ; 3
                               RETLW   66              ; 4
                               RETLW   6D              ; 5
                               RETLW   7D              ; 6
                               RETLW   07              ; 7
                               RETLW   7F              ; 8
                               RETLW   6F              ; 9

HOP THIS HELPS


ANDRE
















                    _____________________________________
                   /                                    /\
                  /   Andre  Abelian  818.840-0003     /
/\                                                 /       Data Image
Technology       _/ /                                             /
KILLspamandreabelian.....spamTakeThisOuTearthlink.net    / \/
               /        1128 Alameda Ave.ste 4      /\
              /           Glendale  CA  91201      /
/
             /____________________________________/ /
             \____________________________________\/
              \  \  \  \  \  \   \  \  \  \  \  \  \

1997\05\20@185315 by TONY NIXON 54964

flavicon
picon face
This code should help you with your problem
The delay between number increments is determined by 'timer'
and will depend on the crystal frequency you choose.

The 7 seg display needs to be a common cathode type.
If you only have a common anode type then invert the display data.

ie  xorlw 0xff

I haven't tested the code, but it should work

Regards

Tony


list p=16c84,c=140  ; processor type
errorlevel        1, -(305)
;
;
status equ 3h
rp0 equ 5h
portb   equ 6h
trisb  equ 86h
intcon equ 0bh
rtif equ 2h
optionreg   equ 81h
;
counter equ 0ch
timer equ 0dh
;
org 0h              ; program start
bsf status,rp0     ; initialise
clrf trisb
movlw 7h ; prescale = 1:256
movwf optionreg
bcf status,rp0
clrf portb
clrf counter
movlw d'15'
movwf timer
bcf intcon,rtif
;
loop btfss intcon,rtif   ; wait for RTCC overflow
goto loop
;
bcf intcon,rtif
decfsz timer             ; wait 15 overflow periods
goto loop
;
movlw d'15'            ; reset timer
movwf timer
;
movf counter,w
call display            ; get 7 seg data
movwf portb
incf counter
movlw d'10'          ; test for overflow
xorwf counter,w
btfsc status,z
clrf counter          ; clear counter
goto loop
;
; 7 Seg data
;
display  addwf pcl
retlw b'00111111'
retlw b'00000110'
retlw b'01011011'
retlw b'01001111'
retlw b'01100110'
retlw b'01101101'
retlw b'01111101'
retlw b'00000111'
retlw b'01111111'
retlw b'01101111'
;
;
end


Just when I thought I knew it all,
I learned that I didn't.

1997\05\20@185315 by TONY NIXON 54964

flavicon
picon face
This code should help you with your problem
The delay between number increments is determined by 'timer'
and will depend on the crystal frequency you choose.

The 7 seg display needs to be a common cathode type.
If you only have a common anode type then invert the display data.

ie  xorlw 0xff

I haven't tested the code, but it should work

Regards

Tony


list p=16c84,c=140  ; processor type
errorlevel        1, -(305)
;
;
status equ 3h
rp0 equ 5h
portb   equ 6h
trisb  equ 86h
intcon equ 0bh
rtif equ 2h
optionreg   equ 81h
;
counter equ 0ch
timer equ 0dh
;
org 0h              ; program start
bsf status,rp0     ; initialise
clrf trisb
movlw 7h ; prescale = 1:256
movwf optionreg
bcf status,rp0
clrf portb
clrf counter
movlw d'15'
movwf timer
bcf intcon,rtif
;
loop btfss intcon,rtif   ; wait for RTCC overflow
goto loop
;
bcf intcon,rtif
decfsz timer             ; wait 15 overflow periods
goto loop
;
movlw d'15'            ; reset timer
movwf timer
;
movf counter,w
call display            ; get 7 seg data
movwf portb
incf counter
movlw d'10'          ; test for overflow
xorwf counter,w
btfsc status,z
clrf counter          ; clear counter
goto loop
;
; 7 Seg data
;
display  addwf pcl
retlw b'00111111'
retlw b'00000110'
retlw b'01011011'
retlw b'01001111'
retlw b'01100110'
retlw b'01101101'
retlw b'01111101'
retlw b'00000111'
retlw b'01111111'
retlw b'01101111'
;
;
end


Just when I thought I knew it all,
I learned that I didn't.

1997\05\20@185518 by Steve Smith

picon face
If you use a look up table to translate the binary number into the seven
segment pattern you can drive the display directly from the port with series
resistors otherwise look in the "Embedded Control Handbook" Mircochip and
there are designs for multiplexed displays and code examples for returning
the correct pattern to do the job required.

Otherwise you could tax the grey matter and drive a 5 X 7 dot matrix display
using only eight output lines and a 74138. thus making a display capable of
displaying not only numbers but also ASCII. If then feeling even more
energetic an attempt at space invaders could be written on the same hardware.


Oh well its late here in Bristol and the local ale appears to have caused a
minor fault in reality. This may resolve itself in time but it could get
worse...........


Steve..........

1997\05\21@013631 by Philippe TECHER

flavicon
face
You can try your software exactly with UMPS simulator
which will allow you to see the graphical result of
the output to a display and much more ...

Demo available at:
    http://idls.izarbel.tm.fr/entp/techer/P01.HTM

Best regards,
       Philippe.

 +--------------------------------------------------------+
 |   Virtual Micro Design                                 |
 | Try the new generation microcontroller simulator       |
 | E-Mail: TakeThisOuTp.techerEraseMEspamRemoveMEidls.izarbel.tm.fr                    |
 | URL:    http://idls.izarbel.tm.fr/entp/techer/P01.HTM  |
 +--------------------------------------------------------+


'Mislabelled crystal?'
1997\06\03@141608 by Brian Scearce
picon face
I don't think this is specifically PIC-related, so please feel free
to reply to me privately if you think the list wouldn't be interested
in your answer.

I was having a problem the other day where my 20MHz 16C63/JW seemed
to be running at more like 6-7MHz.  I wrote up a description of
the problem and almost submitted it to the list, but then I decided
to spend $0.75 of my own money buying another 20MHz crystal first.
Sure enough, the new crystal works fine.

I suspect and hope that the first crystal was just mislabelled.
Or is this something that could happen again?  Can damage to a
crystal change its frequency, rather than just break it?

Further details: I have no oscilloscope, but as far as my blinkenlights
programs showed, the first crystal worked steadily and reliably,
just at the wrong rate.  I have the OSC1/OSC2 capacitors installed
as recommended in the data book (22pF), and the OSC TYPE bits are
set to "HS" (assuming that the Picstart Plus software is doing its
job).  I don't think it's a marginal 16C63; I'm using two of them,
and in any case the new 20MHz crystal works with both.

Brian

1997\06\03@155221 by John Payson

picon face
> I was having a problem the other day where my 20MHz 16C63/JW seemed
> to be running at more like 6-7MHz.  I wrote up a description of
> the problem and almost submitted it to the list, but then I decided
> to spend $0.75 of my own money buying another 20MHz crystal first.
> Sure enough, the new crystal works fine.
>
> I suspect and hope that the first crystal was just mislabelled.
> Or is this something that could happen again?  Can damage to a
> crystal change its frequency, rather than just break it?

A crystal, like many other resonant systems, can either oscillate at
a "base" frequency, or at (approximate) multiples thereof.  For example,
an undamped "A" string on a violin may resonate at 440Hz, 880Hz, 1320Hz,
etc.  The third harmonic may be produced by playing the string while
lightly touching the string 1/3 of the way up the fingerboard (pushing
down firmly would generate 660Hz, not 1320Hz); even after releasing the
lightly-touching finger, the string will often continue to vibrate at
the higher pitch.

In the case of a 20Mhz crystal, most manufacturers design the crystal
so it's fundamental mode of operation is at 6.667MHz (20/3) but then
modify the shape so that it prefers to oscillate at the third harmonic
rather than the fundamental (analagous to the light finger touch on the
violin string).  Apparently, however, that particular crystal favors the
fundamental instead for some reason.  This may result from a manufacturing
defect, or from damage the crystal has received somehow (either mechanical
shock or excess drive level).

FYI, the only time I've had trouble with a crystal oscillating at the wrong
mode was when a 32Khz crystal wanted to run at about 160Khz.  Same phenom-
enon but the other direction.

More... (looser matching)
- Last day of these posts
- In 1997 , 1998 only
- Today
- New search...