Maker Pro
Maker Pro

Can I do this with a uProcessor?

M

MooseFET

Jan 1, 1970
0
">



I've read each one carefully, and some a number of times actually. Lots of
reading, but I'm still not quite understanding everything yet.


Draw a bunch of lines on paper, like you are making graph paper.

The vertical lines are wires
The horizontal lines are wires
Every place they cross is a switch.
The wires do not connect to each other other than via a switch.
 
E

Eeyore

Jan 1, 1970
0
MooseFET said:
Draw a bunch of lines on paper, like you are making graph paper.

The vertical lines are wires
The horizontal lines are wires
Every place they cross is a switch.
The wires do not connect to each other other than via a switch.

Look, he's new to this and frankly his first MCU project doesn't need
keyscanning to save I/O lines and it would likely degrade his background noise
with a nasty buzz.

Graham
 
M

MooseFET

Jan 1, 1970
0
Look, he's new to this and frankly his first MCU project doesn't need
keyscanning to save I/O lines and it would likely degrade his background noise
with a nasty buzz.

The suggested method I gave elsewhere shows how to do it without a
buzz.

I agree that he really doesn't need scanning. If he was willing to
use double pole switches he could get the higher density without
scanning. If he uses a really good micro like an 8051, he can just
wire the switches straight to the ports as pull downs.
 
T

tempus fugit

Jan 1, 1970
0
">
I agree that he really doesn't need scanning. If he was willing to
use double pole switches he could get the higher density without
scanning. If he uses a really good micro like an 8051, he can just
wire the switches straight to the ports as pull downs.

Wait a minute....

Is that to say that if i don't use an 8051 I won't be able to wire the
switches straight to the input ports? I was hoping to use the existing
momentary contact switches, connect them straight to the input ports, and
have the input port pulled to ground when I step on the switch, which would
activate that input.

I'm going to look over that wires and switches example you gave me Moose,
and try to make some sense of it (right now no light bulbs are going off),
but, as Graham mentioned, it is my first project with a micro, and I think
I'd be wise to go with a more simple arrangement like the Atmel micro he
suggested. I think this is going to take me a long time to get off the
ground as it is.

Thanks
 
M

MooseFET

Jan 1, 1970
0
">


Wait a minute....

Is that to say that if i don't use an 8051 I won't be able to wire the
switches straight to the input ports?

No, that is to say that the 8051 is a wonderful processor and that
nobody in their right mind would ever even consider using anything
else. In other words, I was just lobbing a bomb into the eternal
"which is the best processor" religeous war.
I was hoping to use the existing
momentary contact switches, connect them straight to the input ports, and
have the input port pulled to ground when I step on the switch, which would
activate that input.

This is the right way to do it. Pulling the pins to ground is the
better way to indicate closed. I believe that this is true even if
you are silly enough to use a PIC. One of the PIC experts will likely
confirm this.
I'm going to look over that wires and switches example >you gave me Moose,

Don't use the grid of wires. Just use a micro with enough port
connection. You need a port pin for each switch and another for each
output.

and try to make some sense of it (right now no light bulbs are going off),
but, as Graham mentioned, it is my first project with a micro, and I think
I'd be wise to go with a more simple arrangement like the Atmel micro he
suggested. I think this is going to take me a long time to get off the
ground as it is.

I would suggest you consider one of the products from www.cygnal.com.
They have a complete PCB with the micro, the development tools and
cables etc for a total of $100.

The Cygnal micros have way more ports than you need. The only down
side to them is that they run on 3V not 5.

There are other good ready made PCBs out there and other good
development kits. You can also get some micros in the 40 pin DIP
version.

The thing you want to avoid is the need to make connections to a small
surface mount part.

I know that the 8051 from Philips is happy if you use wire wrap
construction methods. I even wire wrapped the crystal oscillator
connections ant it worked ok.

There are other processors that have an internal oscillator so this
isn't an issue.
 
E

Eeyore

Jan 1, 1970
0
MooseFET said:
The suggested method I gave elsewhere shows how to do it without a
buzz.

It looks like I missed that one. I'm curious how that can work though.

I agree that he really doesn't need scanning. If he was willing to
use double pole switches he could get the higher density without
scanning. If he uses a really good micro like an 8051, he can just
wire the switches straight to the ports as pull downs.

That's exactly what I do. To save passives if you use ports that have pull-ups built
in you'll even save (primarily the space of) any external resistors.

Graham
 
E

Eeyore

Jan 1, 1970
0
tempus said:
" I agree that he really doesn't need scanning. If he was willing to


Wait a minute....

Is that to say that if i don't use an 8051 I won't be able to wire the
switches straight to the input ports?

No.

You can save adding any external resistors for the control switches if you
connect them to any MCU input that has an internal pull-up. There are plenty of
these on an 8051 family part (check the datasheet to see which ports they are -
some of them may require suitable configuiring in the special function registers
IIRC).

Doubtless other MCUs work like this too but I do very much think a part like the
89S8253 (an 8051 derivative) would be ideal for you.

Graham
 
E

Eeyore

Jan 1, 1970
0
tempus said:
http://atmel.com/dyn/products/produ...04&family_name=8051+Architecture&part_id=1919


I also found this:
http://www.atmel.com/dyn/resources/prod_documents/2545S.pdf with 23 I/O
which I think would also be enough. So is this basically the same chip as
far as programming goes, except with fewer I/O lines?

That's an AVR. It's an Atmel specific design AIUI. A different architecture entirely from an 8051 family
part.

The nice thing about 8051 derivatives is that they are sourced by multiple manufacturers with all manner of
various onboard 'goodies' and are also available as 'tiny' parts with limited I/O and memory for
applications that simply want something cheap. It's a good device to learn on. Plus the device is so mature
that you should never be troubled by any undocumented bugs. Additionally there's a truly vast amount of
support and application info for the beast.

Graham
 
E

Eeyore

Jan 1, 1970
0
Spehro said:
Wiring switches directly to I/O ports is a really bad idea.

Why so ? They're simply pulling to ground. There's no external connection to worry about
here.

I've lost count of how many tens of thousands of products doing exactly this must have
been made for Studiomaster. Problems, zero.

Graham
 
M

MooseFET

Jan 1, 1970
0
On May 24, 7:00 am, Eeyore
[...]
It looks like I missed that one. I'm curious how that can work though.

Until a key is pressed, the entire Column port is held low. Pressing
any key will pull a Row signal low. When a key is pressed, the Column
port is taken through the log2(N) states needed to discover which key
it is.
 
E

Eeyore

Jan 1, 1970
0
Spehro said:
here.

Any kind of ESD through the switch that that doesn't get shunted to
ground can cause a CMOS processor to latch up, and likely die. There
will be fingers on the switches, and static electricity. A 0.1 cent
resistor is cheap insurance. Same deal if there is a difference
between ground potentials, for example caused by a motor-driven volume
control pot).

There's no practical path for ESD between say a TACT type switch with its mounded on keytop
and the internal circuitry. If someone's sufficiently charged with statis for it find a apth,
a little ressitor isn't going to save anything !

been made for Studiomaster. Problems, zero.


Maybe they were properly designed

By me !

taking into account ESD, or maybe they were lucky that the design turned out to be okay, or
maybe they didn't analyze the failures.

Where's the ESD path ?

It's this kind of switch......
http://uk.farnell.com/jsp/Electrica...ANNON/D6C90LFS/displayProduct.jsp?sku=1201367

The keytop is located in an aperture in a grounded steel panel.


Graham
 
K

krw

Jan 1, 1970
0
It looks like I missed that one. I'm curious how that can work though.

It's done all the time without problems. My receivers have
multiplexed switch matrix front panels. If you really think it's a
problem, simply use an even number of rows and columns in your
matrix. Always drive an equal number in opposite directions,
simulating a differential pair. Filter/slow edges, if need be. This
really isn't difficult.
That's exactly what I do. To save passives if you use ports that have pull-ups built
in you'll even save (primarily the space of) any external resistors.

That's great if your I/O is free or you have only one switch. The
real world ain't often like that.
 
S

Spehro Pefhany

Jan 1, 1970
0
It looks like I missed that one. I'm curious how that can work though.



That's exactly what I do. To save passives if you use ports that have pull-ups built
in you'll even save (primarily the space of) any external resistors.

Graham

Wiring switches directly to I/O ports is a really bad idea. At least
put some series resistance in there. Then you have to consider the
3:1~10:1 range of typical pull-up current sources.


Best regards,
Spehro Pefhany
 
M

Mike Monett

Jan 1, 1970
0
Spehro Pefhany said:
Any kind of ESD through the switch that that doesn't get shunted
to ground can cause a CMOS processor to latch up, and likely die.
There will be fingers on the switches, and static electricity. A
0.1 cent resistor is cheap insurance.

Latchup is a serious issue, especially with some Analog Devices ics
where they fail to warn you the chip is sensitive and will die, like
some of their DDS chips. So now I use a buffer like a 74LS04 or
2N2222 inverter between the chip and the outside world.

ESD is a big problem, even with parts that are rated for body or
machine discharge. You can always find a discharge that is larger.
For example, walking across a carpet in Colorado in the winter can
easily generate 1 inch sparks.

The voltage is high enough, so wouldn't it simply arc over a small
smd part? What kind of resistor would solve that problem?

[...]
Best regards,
Spehro Pefhany

Regards,

Mike Monett
 
S

Spehro Pefhany

Jan 1, 1970
0
Why so ? They're simply pulling to ground. There's no external connection to worry about
here.

Any kind of ESD through the switch that that doesn't get shunted to
ground can cause a CMOS processor to latch up, and likely die. There
will be fingers on the switches, and static electricity. A 0.1 cent
resistor is cheap insurance. Same deal if there is a difference
between ground potentials, for example caused by a motor-driven volume
control pot).
I've lost count of how many tens of thousands of products doing exactly this must have
been made for Studiomaster. Problems, zero.

Graham

Maybe they were properly designed taking into account ESD, or maybe
they were lucky that the design turned out to be okay, or maybe they
didn't analyze the failures.


Best regards,
Spehro Pefhany
 
R

Rich Grise

Jan 1, 1970
0
">

Wait a minute....

Is that to say that if i don't use an 8051 I won't be able to wire the
switches straight to the input ports?

No. ANY processor with enough input ports can read the switches directly.

Even an FPGA or CPLD. ;-)

Since you seem to have trouble "getting" how to scan switches, then just
find any processor that has enough inputs, from a manufacturer that
offers some kind of introductory starter/trainer kit. That's the other
thing that the uP lovers fail to mention - the cost of just getting
started, and the time it will take to familiarize yourself with its
programming language. I've heard good things about the "BASIC Stamp",
but haven't used one, so can't comment one way or the other. My favorite
was the 68HC11, which seems to have died on the vine. )-;

Good Luck!
Rich
 
R

Rich Grise

Jan 1, 1970
0
I know that the 8051 from Philips is happy if you use wire wrap
construction methods. I even wire wrapped the crystal oscillator
connections ant it worked ok.

Wire wrap? Are you H.G.Wells, or what? ;-)

Cheers!
Rich
 
E

Eeyore

Jan 1, 1970
0
Rich said:
Wire wrap? Are you H.G.Wells, or what? ;-)

My own first expereinces with 8051 were also wire-wrapped ! We got some of the
very first examples of the real 80C31 MCU in CMOS too. That helped a fair bit
with our power budget.

Graham
 
T

tempus fugit

Jan 1, 1970
0
just
find any processor that has enough inputs, from a manufacturer that
offers some kind of introductory starter/trainer kit. That's the other
thing that the uP lovers fail to mention - the cost of just getting
started, and the time it will take


Right, that was going to be my next question. I've looked at the parts that
have been mentioned here, but I've got to find someone who will ship to
Canada without a ridiculous minimum order. Newark has the Atmel IC listed,
but it isn't in stock atm, and has a 99 day lead time (!?). Mouser doesn't
appear to have anything, and DigiKey, well - there's that minimum order
problem again.

I also found this http://www.hvwtech.com/products_view.asp?ProductID=370
which i can get here, but don't know much about PICs, and I guess I'd need
to figure out what else I'd need (and how much it'd cost) to program it.
There does seem to be a fair amount of resources on the web for PICs
anyway....
 
Top