Jump to content



Photo
- - - - -

Keyboard usage in asm/c?


  • Please log in to reply
3 replies to this topic

#1 huhn_m

huhn_m

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1957 posts
  • Gender:Male
  • Location:Germany / Dresden
  • Interests:Assembler(!!!)
    Computers and Programming
    Operating Systems
    Programmable Calculators
    Maths and everything arround it

  • Calculators:
    FX-82SX / AFX 2.0+ (ROM 1.03) / FX 1.0+ (ROM 1.03)

Posted 22 August 2003 - 05:56 AM

Hi!

I need your help with the keyboard access using the ports.

When I write 00000010b to port 0x13h
and read the byte value afterwards it is always
01000000b no matter if I pressed 0 or A but it should only
respond to the 0 key. Can you help me and tell me how to fix this?

I know some of you use the same methods (X-Thunder?!) Please tell me how you work with it!

Cya huhn

#2 Endi

Endi

    Casio Addict

  • Members
  • PipPipPip
  • 74 posts
  • Location:Wroclaw, Poland

  • Calculators:
    AFX 2.0 PLUS

Posted 23 August 2003 - 07:49 PM

I'm not sure, but I use Touche by 2072 and there is very useful key recognizer. It is, as you say, the same value if you press 0, A, or G etc. This is 00000010b - about column. But there is also still one more information about rows - and 0, EXP, EXE are the same, because the are in the same row.
When you tried to write 00000010b value, you wrote it to 'row' information, I supose.
So if you want to identify the pressed key, you must check these two P-13h states with x and y coordinates. :)

I can't say how you should read these values, I'm not a good asm programmer, I only use the rows and column information from P-13h i my C progs.

#3 huhn_m

huhn_m

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1957 posts
  • Gender:Male
  • Location:Germany / Dresden
  • Interests:Assembler(!!!)
    Computers and Programming
    Operating Systems
    Programmable Calculators
    Maths and everything arround it

  • Calculators:
    FX-82SX / AFX 2.0+ (ROM 1.03) / FX 1.0+ (ROM 1.03)

Posted 24 August 2003 - 09:56 AM

I know how to do it in theory:

You write 1 SHL (number of col) as a word to port 13h
and then you read it and the bytes that are turned on are the keys pressed.

But it doesn't matter what I write to the port!
It always returns the same. If I select the line with 0->EXE
and press the 4 key
the response(value read from port) is 01000000 though but it shouldn't since no key in the lin 0->EXE
was pressed!

#4 2072

2072

    Casio over god

  • Admin
  • PipPipPipPipPipPipPipPip
  • 1565 posts
  • Gender:Male
  • Location:Somewherebourg
  • Interests:Alternative states of consciousness, programming, making things work the best they possibly can.

  • Calculators:
    AFX2 ROM 1.02, CFX-9940GT+, FX-180P-Plus

Posted 24 August 2003 - 05:52 PM

Well maybe you read too fast... I remember this problem happened to someone else...




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users