HSERIN & Interupts (aka controlling PIC programs from a remote PC)


Results 1 to 17 of 17

Threaded View

  1. #9
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default

    Wow...from the man himself! cool.

    I figured it was something to do with formatting (the errors I was seeing alluded to it... hence me experimenting the space after the @ !!)

    Anyway, in the light of your info ...it all compiles fine! (*many* thanks!)

    My problem now is a simple one, why is my 'if' condition not being met when the 1 key is being pressed on my PC keyboard...

    Code:
    loop:
    if mybyte="1" then
    hserout ["got it!"]
    endif
    
    if mybyte<>"1" then
    hserout ["DIDN'T GET IT!",13,10]
    hserout [mybyte,13,10]    ' (tried to add in this line to see onscreen what the content of mybyte is - nothing output!)
    PAUSE 499
    mybyte=0
    endif
    goto loop
    (hey, I can do boxes now too! tks Ioannis)

    All I see on my ASCII terminal when the program is running is "DIDN'T GET IT!" scrolling down - which suggests that when I press the "1" key, the content of variable mybyte is not 00000001 (but possibly an ASCII interpretation of the number 1 (the ASCII for 1 is 49 tried that but it errored!).

    I normally spontaneously combust as I try to work out what I should be 'matching' against, so could someone save the fire brigade a visit here - it makes a terrible mess of the carpet!

    Many thanks!
    Last edited by HankMcSpank; - 17th June 2009 at 13:00.

Similar Threads

  1. Replies: 24
    Last Post: - 2nd October 2017, 11:35
  2. Direct PIC to PC without MAX232
    By acjacques in forum Serial
    Replies: 14
    Last Post: - 23rd October 2014, 21:32
  3. Send data PIC to PC
    By konter in forum Off Topic
    Replies: 6
    Last Post: - 25th December 2009, 22:04
  4. Replies: 67
    Last Post: - 8th December 2009, 02:27
  5. Controlling power to a PIC with another PIC
    By jswayze in forum Off Topic
    Replies: 3
    Last Post: - 28th May 2005, 19:44

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