Shop OBEX P1 Docs P2 Docs Learn Events
Proto keyboard test program. — Parallax Forums

Proto keyboard test program.

kelikeli Posts: 2
edited 2007-10-15 19:10 in Propeller 1
Is there a propellar application that some one has written that can be used to check out the VGA output, keyboard and mouse input of a Parallax proto board. Propellar "Life" checks out the VGA output and mouse input. So what I actually need is an application that displays on the VGA output what is typed on the keyboard. I just got my proto board assembled and wanted to check every thing out. I am just starting to learn SPIN and assembly so it may be awhile before I can code my own test program.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Keli

Comments

  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2007-10-15 02:47
    Just use Mike Green's excellent FemtoBasic obex.parallax.com/objects/28/. That will "test" the vga/keyboard/mouse/. Select PROTO = true then compile.

    con
       Demo      = false           ' Demo Board
       Proto     = true              ' Proto Board
       Hydra     = false            ' Hydra
    
    



    *Peter*
  • Mike GreenMike Green Posts: 23,101
    edited 2007-10-15 04:50
    Actually, FemtoBasic doesn't use the mouse. The VGA 1280x1024 Tile Driver w/Cursor program in the Object Exchange uses the VGA display and the mouse and works with the Protoboard / Accessory Kit.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2007-10-15 05:22
    Oooooppps!, that's right and I should know as I have just been expanding FemtoBasic again with the RENAME command plus device I/O control. The DEVICE function allows me to select the console devices for FemtoBasic so that I can have serial coms in/out or conventional keyboard/display or any combination of compiled device drivers.

    *Peter*
  • AribaAriba Posts: 2,685
    edited 2007-10-15 13:52
    This shows the Keycodes as hex numbers on the VGA:
    {{ Keyboard Test }}
    
    '  Receives Keystrokes and sends it as Hex numbers to the Terminal (or TV,VGA).
    '  You can test the Key-codes of each Key on the Keyboard.
    
    CON
    
      _clkmode = xtal1 + pll16x
      _xinfreq = 5_000_000
    
    
    OBJ
      kb     :     "Keyboard"       'You can also use PC_Keyboard object for PropTerminal                          
      di     :     "VGA_Text"       'You can also use TV_Text or PC_Text objects
      
    VAR
    
    
    PUB Main | k
    
      'start the display
      di.start(16)
      di.str(string("Keyboard Demo...",13))
    
      'start the keyboard
      kb.start(26, 27)
    
      'echo keystrokes in hex
      repeat
        k := kb.getkey
        di.hex(k,3)
        di.out(" ")
    
    



    Andy
  • NewzedNewzed Posts: 2,503
    edited 2007-10-15 13:57
    Andy, why did you write:

    di.hex(k,3)

    All keyboard characters can be expressed in two hex digits.

    Sid

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Yesterday is history, tomorrow is a mystery, and today is a gift.

    That is why they call it the present.

    Don't have VGA?
    Newzed@aol.com
    ·
  • AribaAriba Posts: 2,685
    edited 2007-10-15 19:10
    @Newzed

    Not when you press Shift or Control together with another Key, then the 3. digit contains 1 (Shift) or 2 (Control) or 3 (both).
    A second reaseon is: 3 digits + 1 space are 4 characters and that fits prefectly in a line without wrapping between a value.

    Andy
Sign In or Register to comment.