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 )
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 )
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 )