Shop OBEX P1 Docs P2 Docs Learn Events
Keyboard does not work directly after a reset — Parallax Forums

Keyboard does not work directly after a reset

bazibazi Posts: 29
edited 2010-10-25 06:17 in Propeller 1
Hi there,

If i do a reset on my board, the keyboard won't be found if i don't wait for my keyboard for about 1 second. Is there a way to reset the keyboard via software and maybe theres a way to poll the keyboard if it's ready or not?

My keyboard is connected at 26(data) and 27(clock).
I'm using the keyboard driver shipped with the parallax spin tool, but i'm using it with Brad's Spin Tool (i have no windows).


Look, thats a piece of junk, aaaah i mean code, that works:
CON
   _clkmode  = xtal1 + pll16x
   _xinfreq  = 5_000_000
   keyboard  = 26
OBJ
     key   : "comboKeyboard"             ' Keyboard Driver
     text  : "aigeneric_driver"          ' AiGeneric 25-line Video
     fsrw  : "fsrwFemto"                 ' Modified SD routines
     ...
     ...

PUB main  | 
  waitcnt(clkfreq + cnt)
  key.start(keyboard)
  waitcnt(clkfreq + cnt)
  if not key.present                                
     text.str(string(CR,"no keyboard! aborted!",CR))
     abort
_xinfreq is right, i've checked, 5mhz crystal is soldered.
The power supply should be good enough. It's a switching power supply with 5V/1A (for keyboard) and 3.3V(4A) for the Propeller, EEProm and two PCF8574 and a max232. This switching power supply is taken from a DVD-Player.

Comments

  • 65816581 Posts: 132
    edited 2010-10-25 06:17
    bazi wrote: »
    Hi there,

    If i do a reset on my board, the keyboard won't be found if i don't wait for my keyboard for about 1 second. Is there a way to reset the keyboard via software and maybe theres a way to poll the keyboard if it's ready or not?

    My keyboard is connected at 26(data) and 27(clock).
    I'm using the keyboard driver shipped with the parallax spin tool, but i'm using it with Brad's Spin Tool (i have no windows).


    Look, thats a piece of junk, aaaah i mean code, that works:
    CON
       _clkmode  = xtal1 + pll16x
       _xinfreq  = 5_000_000
       keyboard  = 26
    OBJ
         key   : "comboKeyboard"             ' Keyboard Driver
         text  : "aigeneric_driver"          ' AiGeneric 25-line Video
         fsrw  : "fsrwFemto"                 ' Modified SD routines
         ...
         ...
    
    PUB main  | 
      waitcnt(clkfreq + cnt)
      key.start(keyboard)
      waitcnt(clkfreq + cnt)
      if not key.present                                
         text.str(string(CR,"no keyboard! aborted!",CR))
         abort
    
    _xinfreq is right, i've checked, 5mhz crystal is soldered.
    The power supply should be good enough. It's a switching power supply with 5V/1A (for keyboard) and 3.3V(4A) for the Propeller, EEProm and two PCF8574 and a max232. This switching power supply is taken from a DVD-Player.

    Are you using pull-up resistors on the SDA and SCL lines?
    It works for me without any problems. For more info check my
    Propeller Multimedia Board thread.
Sign In or Register to comment.