Serial Keypad to ASCII Idéa (Question awnser: Yes it does)

I'm not sure i'm on the right board, but any way

This picture is just the générale representation of my idea that comes with a question.

Al tough it's not SPI compatible yet I need a confirmation that the serial data that will come out will be ASCII compatible.

I basically want the binary code to represent 0 to 9 in the ASCII standard.

The 74922 is a matrix keypad controller
the 74
165 is a parallel load shift register.

The lsb are hook straight from the 922 to the 165, while the MSB of the 165 are hooked to 5v and ground to make '&h30' in binary(witch is 0 in ASCII if i'm right)

Now I know none of the control line are there, there is no resistances no caps and all, this is just a thinking experience, but in you expert opinion is it ASCII code that come out of this?

ascii key pad.jpg

This is my idea one step further with the control line.

Bon, next step will be to do some coding to get this byte in. But enof for tonight

I'm, expecting some réply for this. So don't be shy. :stuck_out_tongue: Does this idea hold the road, or I'm i beside the track?

I haven't looked at chips like the '922 for probably 20 years, so assuming it produces a 4-bit code and a strobe signal and you are adding 0x30 to that code then yes I think it will work for values 0-9, but not for A-F.

So why bother when you can do the same with 1 or 2 lines of code. With one extra Arduino pin you could drop the '165 entirely and have a much simpler system.


Rob

So why bother when you can do the same with 1 or 2 lines of code. With one extra Arduino pin you could drop the '165 entirely and have a much simpler system.

Cause it only require 4 extra wire so i save bit's plus think about it, your Arduino will have to do this every time you press a key while my system does it from outside and take no processing time. And also cause it's fun to think outside of the box. While i have a infinite amount of space outside the Arduino, i have a limited amount of resource inside.

yes I think it will work for values 0-9, but not for A-F.

&hA-&hF are actual Hexgit and in ASCII code they will make &h3A to &h3F witch are ":, ;, <, =, >, ?". But beside that, I just don't think you see the big picture here @graynomad, if i can make those 16 characters come out of the thing, i can make all ASCII come out of the thing.

'922 for probably 20 years,

So? Keypad doesn't have to work at super speed, unless you are Data.

Big lack of imagination here it's like saying "I'm not gonna use a hammer to build my house cause it's old tech".

And don't forget that with a 74138, you can take 3 bits and make 8 SPI port address. With a 74154 you take a nibble and you make 16 SPI port address

So let's say you have

MiSo
MoSi
Clk
Cs0
Cs1
Cs2
Cs3

Then you can hook 16 thing on you Arduino that communicate on the same 2 wire.

Where i want to go, is that these chips might be old. But they don't cost much. And you can work with them without the need of a wielding robot. There made for human use. And Also they fit on a breadboard. So if you want to upgrade you idea or fix a problem, your not screwed with those circuit that you just can't fix if you don't have overspecialized equipment.

Those very small square chip's with thousands of pin are just not for me.

Here is the DataSheet of the 74c922.

http://www.elexp.com/tips/74C922.pdf

The 74 series is a cool series of chip , that can be found every where, unweilded it from an old board and it's ready to use. And, all Arduino friend should know and use.

Well that is my opinion any way.

Cause it only require 4 extra wire so i save bit's plus think about it,

With the '165 you need 4 Arduino pins, without the '165 you need 5, so granted it's an extra pin but the result is a lot simpler and more versatile.

your Arduino will have to do this every time you press a key while my system does it from outside and take no processing time.

I don't understand this, the two options use exactly the same processing time, that is the ISR every time a key is pressed. The only difference is that without the '165 you use the 4 bits to index into an array to map the bits to a character. This has the further advantage of not hard wiring anything so with a simple value change in the array you can get whatever characters you want from the key presses. You can also use the bits to index into an array of function pointers so each key executes a particular function.

If you get ASCII characters from the input you can't do any of that without manipulating the byte, having a much larger lookup array, or having long if-else or switch constructs.

So in short, clever as it is, I can no advantage to this circuit and plenty of disadvantages.

(NOTE: this argument assumes you can place the 4 bits in 4 contiguous pins of the same port)

And also cause it's fun to think outside of the box.

That's fair enough, if you want to learn about this stuff this is as good a way as any.

While i have a infinite amount of space outside the Arduino, i have a limited amount of resource inside.

Technically that's true, but removing the '165 and using an array adds maybe 18 bytes to your sketch size, that would not normally be an issue.

&h3A to &h3F witch are ":, ;, <, =, >, ?".

Mapping ABCDEF to :;<=> can hardly be described as "working" as you post said before the edit, it's just one step below a random mapping.

if i can make those 16 characters come out of the thing, i can make all ASCII come out of the thing.

Your idea of adding 0x30 to get 0-9 is good and shows an understanding of the principles involved. But trying to get "all ASCII" the same way will need a lot of hardware unless the ASCII values you want are 16 contiguous values.

So? Keypad doesn't have to work at super speed

I was implying that I don't remember the exact logic of the '922, what that has to do with the speed of this circuit I have no idea.

Big lack of imagination here it's like saying "I'm not gonna use a hammer to build my house cause it's old tech".

Personally I would use a MIG welder and build a steel house (as I have done twice before), but even then a hammer is occasionally required. I have no problem with old technology (I'm actually a wannabe blacksmith) in fact I prefer it when appropriate.

And don't forget that with a 74138, you can take 3 bits and make 8 SPI port address...With a 74154 you take a nibble and you make 16 SPI port address...Then you can hook 16 thing on you Arduino that communicate on the same 2 wire.

All true, but nothing to do with this circuit.

If you are happy to remove ICs from old boards and experiment with them fair enough, as I said it's a good way to learn, but IMO if you are actually designing something this would not be the way to do it unless for some reason you desperately needed the single pin the '165 frees from the Arduino. Even then it's probably better to just use a larger MCU.


Rob

But any way's

If you can do better good for you, your solution wouldn't probably not apply to my plan. And also, I have the 192 and the 165 and the 154 plus alot of 173 and 193 and 163 plus the not gate already on my breadboards, why would I wait for delivery time while i have every thing I need to do what i plan right now?

Also by the end, what i want to do wont require a Arduino board, I'm only using the Arduino to test the SPI bus, so to have the ASCII prebuild is a necessity.

And finally, I touth my question was simply to know if that would make a ASCII code, period. I don't really care if you can make it another way. To make it another way, it would require me to redo the hole thing which is the best way to simply not do anything at all caused by redundence and discouragement.

Science require to develop and focus your idea to the end and see if it work's or not. And certainly not restart all the time cause you think some thing could be better. If i'm wrong, at the end, ill try another way, it's the only way to do.

N'est-ce pas butyfull 100% compatible

In any instance Graynomade, the only point of the keypad is to enter the value of 2 angles, on a lcd screen, what would be the point to use &h3A to &h3F?

by the end, what i want to do wont require a Arduino board, I'm only using the Arduino to test the SPI bus

So that's an entirely different arrangement to the original circuit. I merely pointed out that you could do the original function a couple of different ways all of which required a lot less hardware and little or no more code.

the only point of the keypad is to enter the value of 2 angles, on a lcd screen

Without using a processor? How do you plan to do that without some quite complicated hardware?

Whatever.

Kirk out.


Rob

Without using a processor? How do you plan to do that without some quite complicated hardware?

I guess you juste dont know how to build a simple process with a few chips. Has I sayed before:

Big lack of imagination here it's like saying "I'm not gonna use a hammer to build my house cause it's old tech".

And Kirk is a wimp by the way.

A 555, a few counter a few demux, a few register, few compartor and im on my way. :stuck_out_tongue:

This guy did it with one pin, but I'm not sure where ASCII comes into it:

http://forum.arduino.cc/index.php?topic=19470.msg142584#msg142584

Yeah, but this would require a ADC to décode wich resistance has been used.

Which the Arduino has.

Yeap, but as I sayed, I'm Using Arduino as a tester for the multi device SPI port im building, by the end there wont be any Arduino on my project.

Plus, Over a Long wire, this will not work any more cause of the fluctuation of resistance and the interferance that the wire will catch along the way.

But if you use a short wire, it's great. Wasn't this how touch tone was working at the bigining?

Cause you know, A SPI controler that take Data from one place and give the Data to another place is simple to make, in opposition to what the other guy said. It's just a mater of using you imagination.

Cool "Computer" or controler can be made with a few simple chip that are found pretty much in every old device. Or for very low price in store like Addisson. This store for instance keep a good variety of all 74** serie of chip. It's not like if it was unfindable.

And since these chips are easy to find, project are easy to reproduce and sell. So that why I have a big problem with the arogance of this guy.

And by the end, how can a show my student how a processor work from with in if all i have is a single chip with only a few pin that can only be controled by a user interface on the computer?

Those new device are totaly useless for me, even if the work super fast and faultlessly.

I need a big board with many stage of chips where I can hook a LED at different place to show what happen.

Frederic_Plante:
Yeap, but as I sayed, I'm Using Arduino as a tester for the multi device SPI port im building, by the end there wont be any Arduino on my project.

Plus, Over a Long wire, this will not work any more cause of the fluctuation of resistance and the interferance that the wire will catch along the way.

But if you use a short wire, it's great. Wasn't this how touch tone was working at the bigining?

I think you must have forgotten to mention the long wire run and "no Arduino" in your initial post. We aren't mind readers you know.

On the short run, I was asking if this was going to make a ASCII code, Period. The discussion was not supposed to be that long. I don't understand what was the point of this guy.

I did not ask if there was a better way to do it.