Sign in

username:

password:



Not a member?

Search avrclub



Search tips

Subscribe to avrclub



avrclub by Keywords

AT90S2313 | AT90S8515 | ATMega | ATmega128 | ECL | FETS | IAR | Keyboard | LCD | STK50 | TMOS | UART


Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | AVRclub | [AVR club] Keyboard

Atmel AVR Microcontroller discussion group.

[AVR club] Keyboard - abed...@yahoo.com - Nov 9 16:16:58 2007

Hi all if anyan help me
Write a C-function that read a bottom from the keyboard(4X4) connected to PORTB off the ATmega88 and return the equivalent ASCII-code fore that key. This function should bee made STDIN and tested thou a function call bye scanf() och printf(). The result is showed in the terminal program.
In C, stdio -functions has a standardize interface . In the folloing example scanf() calls the function getchar_usart() witch reads the serial port.

The key zero shall return the ASCII-value off 0x30, key one returns 0x31…..
The key "#" is carriage return, 0x0D, och the key "*" is interpreted as backspace, 0x08.

I have many errors i will be thanks for any help.



(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )


Re: [AVR club] Keyboard - David Kelly - Nov 9 17:18:03 2007

On Fri, Nov 09, 2007 at 03:58:10PM -0500, a...@yahoo.com wrote:
> Hi all if anyan help me
> Write a C-function that read a bottom from the keyboard(4X4) connected
> to PORTB off the ATmega88 and return the equivalent ASCII-code fore
> that key. This function should bee made STDIN and tested thou a
> function call bye scanf() och printf(). The result is showed in the
> terminal program. In C, stdio -functions has a standardize interface
> . In the folloing example scanf() calls the function getchar_usart()
> witch reads the serial port.
>
> The key zero shall return the ASCII-value off 0x30, key one returns
> 0x31???.. The key "#" is carriage return, 0x0D, och the key "*" is
> interpreted as backspace, 0x08.

Sounds like a homework assignment.

I wouldn't use stdio because over half of the above task is learning how
to insert into the standard IO pipes. If he has a terminal program
connected to serial IO then how does one differentiate between STDIN on
keyboard and STDIN from serial?

Then again I would not use scanf() or printf().

He doesn't say anything about how his keyboard is wired other than
PORTB. Does it short row to column when a key is pressed? Or does it
short both row and column to ground at the intersection where a key is
pressed? Makes all the difference in the world as to what your software
has to do.

--
David Kelly N4HHE, d...@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.



(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )

Re: [AVR club] Keyboard - "Eng. Abdalfattah Najjar" - Nov 9 17:24:56 2007

Hi Will,
I send you the schematic of the keybaord
its the firt time i use the atmeg88 and writing codes in C=20
I went to learn everything
i Thanjs you alot

Will wrote:=20
If you haven't received any help for this yet, I can help. The AVR series=
of microcontrollers happens to be my specialty! :) Let me know if you woul=
d still like help. If you do, please let me know how the keypad is arranged=
- which nibble do you want as inputs, which as outputs, and where the char=
acters are located (row/column). If you have a schematic, thet'll answer al=
l my questions.
----- Original Message ----
From: "a...@yahoo.com"=20
To: a...@yahoogroups.com
Sent: Friday, November 9, 2007 2:58:10 PM
Subject: [AVR club] Keyboard

Hi all if anyan help me=20
Write a C-function that read a bottom from the keyboard(4X4) connected to P=
ORTB off the ATmega88 and return the equivalent ASCII-code fore that key. T=
his function should bee made STDIN and tested thou a function call bye scan=
f() och printf(). The result is showed in the terminal program.
In C, stdio -functions has a standardize interface . In the folloing exampl=
e scanf() calls the function getchar_usart() witch reads the serial port.=20

The key zero shall return the ASCII-value off 0x30, key one returns 0x31=85=
..
The key "#" is carriage return, 0x0D, och the key "*" is interpreted as bac=
kspace, 0x08.=20

I have many errors i will be thanks for any help.

=20


(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )

Re: [AVR club] Keyboard - Will - Nov 11 4:47:21 2007

If you haven't received any help for this yet, I can help. The AVR series =
of microcontrollers happens to be my specialty! :) Let me know if you woul=
d still like help. If you do, please let me know how the keypad is arrange=
d - which nibble do you want as inputs, which as outputs, and where the cha=
racters are located (row/column). If you have a schematic, thet'll answer =
all my questions.
----- Original Message ----
From: "a...@yahoo.com"
To: a...@yahoogroups.com
Sent: Friday, November 9, 2007 2:58:10 PM
Subject: [AVR club] Keyboard

Hi all if anyan help me=20
Write a C-function that read a bottom from the keyboard(4X4) connected to P=
ORTB off the ATmega88 and return the equivalent ASCII-code fore that key. T=
his function should bee made STDIN and tested thou a function call bye scan=
f() och printf(). The result is showed in the terminal program.
In C, stdio -functions has a standardize interface . In the folloing exampl=
e scanf() calls the function getchar_usart() witch reads the serial port.=20

The key zero shall return the ASCII-value off 0x30, key one returns 0x31=85=
..
The key "#" is carriage return, 0x0D, och the key "*" is interpreted as bac=
kspace, 0x08.=20

I have many errors i will be thanks for any help.

=20


(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )