AT/PS2 Keybord - PIC Interface?


Closed Thread
Results 1 to 40 of 74

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    Yeah, your code seems to indicate that you are waiting for the clock line to do something?

    Your device must generate the clock in this case.
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

  2. #2
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Ok, I misunderstood.

    I now realized that you are SENDING data TO KB;
    Not reading from it.

    Sorry about that.

    ------------------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  3. #3
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    rookie11, I don't think this code will ever work. Where are the ENDIF commands to terminate the IF statements?

    Dave Purola,
    N8NTA

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Dave View Post
    rookie11, I don't think this code will ever work. Where are the ENDIF commands to terminate the IF statements?

    Dave Purola,
    N8NTA
    One line If/Then statements....don't need an ENDIF....

    If this=0 then gosub dothis : that=1 : goto something

    ...valid statement
    If this is zero, then gosub dothis, set that to 1, then goto something.

    But that colon following the THEN in the code a few posts back looks a bit strange to me...
    And I know colons!

  5. #5
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    skimask , Look before you leap.... Look at where the colon lies........

    Dave Purola.
    N8NTA

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Dave View Post
    skimask , Look before you leap.... Look at where the colon lies........

    Dave Purola.
    N8NTA
    Well, I was talking about the code attached above. He has this line (along with another that's the same way):

    If scancode.0 = 1 Then: parity = parity + 1
    ----------------------^

    I don't know how that'll compile, if it will compile good and not cause an error, if it'll work as written, or what will happen. It just doesn't look right to me, that's all...

    And I'm always keeping track of where my colon's lie...

  7. #7
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    skimask, The way I interpret a colon is to terminate a line of code and, allow the start of another command string to be placed on the same line. If this is the case then all of his IF/THEN statements should have and ending ENDIF command. I have not tried this as I never write code in this fashion. It is much to confusing and hard to follow the flow... Have you ever tried this format? If it works then GREAT...

    Dave Purola,
    N8NTA

Similar Threads

  1. MXcom "C-BUS" interface to PIC question
    By tcbcats in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 1st May 2014, 03:59
  2. Interface a pic with a Iphone/Itouch
    By Luckyborg in forum General
    Replies: 1
    Last Post: - 6th May 2009, 16:02
  3. 4 pin 4 x 4 keypad interface using pic basic pro
    By dunlao_john in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 15th January 2009, 05:21
  4. USB Interface using PIC
    By Tissy in forum mel PIC BASIC Pro
    Replies: 21
    Last Post: - 22nd May 2006, 16:04
  5. Serial Pic to Pic using HSER
    By Chadhammer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th March 2005, 23:14

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts