1 slave 1 master 1 MAX232 1 problem ?


Closed Thread
Results 1 to 20 of 20

Hybrid View

  1. #1
    Join Date
    May 2005
    Posts
    49

    Question 1 slave 1 master 1 MAX232 1 problem ?

    hi everybody i am trying to get numbers from PC in my circuit i have 1 slave 1 master and a MAX232 i can communicate pic to pic well there is no problem i can sent numbers to pc it is well too but when i am trying to get numbers from PC i have problem. i Try these

    test var byte
    TEST =0

    loop:
    hserin [test]
    if test=4 then goto msj
    if test=5 then goto msj2
    msj:
    hserout ["msj alındı",13,10]
    goto loop
    msj2:
    hserout ["tamamdır",13,10]
    goto loop
    end

    in here i try everything but when i sent the msj from pc i allways get "msj alındı" it means i cant use comparision.I know i can sent number from pc coz i try this code too.

    test var byte
    TEST =0

    loop:
    hserin [test]
    hserout [#test,13,10]
    goto loop
    end

    it send me back what i sent that means no circuit problem i have programming problem can anybody show me my problem and solition.?
    Asking is not a shame but not learning is a SHAME!!!

  2. #2
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    SubZero,

    please do some searching on the Forum.

    there are tons of examples like: http://www.picbasic.co.uk/forum/show...78&postcount=1

    And:

    <img src=http://www.picbasic.co.uk/forum/attachment.php?attachmentid=379&stc=1>
    Last edited by NavMicroSystems; - 30th July 2005 at 14:28.
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  3. #3
    bot402's Avatar
    bot402 Guest


    Did you find this post helpful? Yes | No

    Default

    were you born ignorant or is it something you've learnt over time.

    The image not only breaks all the rules of any forum, but is also extremely offensive and should be removed as soon as possible.

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink

    Hi, Bot

    Sooooo ... how would you tell someones their lazy student questions are more than boring ...???

    mmmmmmhhh , I open wide my little laughy brown eyes, and don't tell me they are blue, at this time !!!

    Alain

    PS: Hi, Nav

    you're on the right tracks ...

    Alain, moderator somewhere else ...
    Last edited by Acetronics2; - 30th July 2005 at 14:51.

  5. #5
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    SubZero...

    Try this... and then I want you to send a number 4 from your PC's keyboard... and then I want you to send an UPPERCASE 'A'... and see what happens... (try it also with a lowercase 'a')...
    Code:
    	test var byte
    
    loop:
    	hserin [test]
    	if test=52 then 
    		HSEROUT ["I've struck Gold",13,10]
    		else
    		If test=65 then
    			HSEROUT ["Hey it's really working",13,10]
    			else
    			HSEROUT ["No Cigar",13,10]
    			endif
    		endif
    	goto Loop
    	end
    And now your homework (and please, NOBODY, but NOBODY give the answer here!)... I want you to find out WHY when you send a "4" from your PC's keyboard, we look for a 52 here in the PIC program. And when you send an Uppercase A we look for a 65 (and that is the BIGGEST clue you're going to get!). Question 1. What is the relationship? Question 2. What number would you need to detect, if we wanted to capture the lowercase 'a' instead of the UPPERCASE 'A'? By answering those two questions you will have learnt the answer to your original problem (as well as looking at your logical program flow to the flaws in your original program).

  6. #6
    Join Date
    Mar 2005
    Location
    Iowa, USA
    Posts
    216


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics
    Sooooo ... how would you tell someones their lazy student questions are more than boring ...???
    Well, I don't think he's lazy. Sure, he could of done some searching to find his answer, but I know how frustrating it can be to try to find something and no matter how you search, you just come up blank. I think Melanie is on the right track here. Give a man a fish he'll eat for a day, show a man how to fish, he'll eat the rest of his life.... or something like that. Honestly... we have got to have better responses than RTFM!

  7. #7
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Bot

    I do have to agree with the others... in that over the last weeks the questions from many newbies are the kind that are answered in the opening pages of the manuals. There's been some real classics this week (why can't I make my Hindustan Tourer go as fast as G8RPI's rocket)... I've had to take a real deep intake of breath and IGNORE them (depite the fact they even PM or EMAIL me as well!). I've been sorely tempted to reply that you've joined the wrong class... Landscape Gardening 101 is down the hall on the right...

    The REAL question that needs to be addressed is... how do you get folks to READ the manual, the README files, the DATASHEET, the HELP files (if there are any - and you know what I'm referring to here), search this list, search the email archives on the manufactuers site, all the myriad of documentation that you and I use every day? A lot of folks on this list (and I'm sure on the other) won't. They're too lazy. They can't be bothered to make the slightest effort (and it's plainly obvious from some questions posted), and it's easier to have someone else do their homework for them.

    I think, some patience, and when these silly questions appear, those that have the inclination should simply post a reference to the Page or Section Number in the manual where the answer is to be found. This forces them to look for it and digest what they're reading. Garbo Technician 101 still has vacancies...

    To preserve Freedom of Speech yet retaining some moderation, the offending image has been edited. Sorry about that Ralph, but I did use my best lipstick pencil to do the job.

Similar Threads

  1. My code for TV remote and MIBAM for RGB control
    By idtat in forum Code Examples
    Replies: 4
    Last Post: - 12th January 2013, 20:52
  2. Delayed output 10 secs
    By lilimike in forum mel PIC BASIC Pro
    Replies: 37
    Last Post: - 14th October 2011, 06:28
  3. first project, and yes, doesn`t work
    By bogdan in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 28th April 2009, 06:13
  4. DS1820 headache
    By Calco in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 12th August 2004, 00:28
  5. New member
    By jmgelba in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 28th February 2004, 22: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