1 slave 1 master 1 MAX232 1 problem ?


Closed Thread
Results 1 to 20 of 20

Hybrid View

  1. #1
    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.

  2. #2
    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).

  3. #3
    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!

  4. #4
    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.

  5. #5
    Join Date
    May 2005
    Posts
    49


    Did you find this post helpful? Yes | No

    Exclamation Answer to all......

    First i am not a lazy student also i am not a student!!!
    I am trying to learn how to use pic in PBP.
    I am a machine engineer.Not an electronik engineer.In the picture 2 u can see a machine that i do.And in picture 4 u can see how many books i read about pic 2 of them is a translation of PIC BASIC PRO.(picture 5) in picture 1 u can see i have a little room for pic and programming.Nobody helps me when i am trying to learn micros.

    Answer to NavMicroSystem:1 year before u were not answering u were asking everything that u wonder or can't do.I am asking only what i can't do.
    And nobody is putting a gun on to u re head to answer.It is u re chose to answer or not.Thats why this is a forum.

    To others exept melanie:No body learn pic programming in their moms abdomen.All of u learn pic like me.And a little answer to the people that is asking me did u search hserin yes i search http://www.picbasic.co.uk/forum/sear...searchid=45608
    and read all of them may be answer is there but i can't see

    And to the Melanie :Thank u Melanie u re trying to teach something first i want to answer u re question.When i sent 4 it becomes 52 that means pc sent a number in diffrent way that i don't know.If somebody teach me i will be really glad.I am not trying to use the easy way like the others think i am only trying to learn.I don't want an answer like
    question=how can i light a led on port a?
    answer=high porta.0
    I am not looking answers like that i am looking answers that will teach me how to do.

    Thanks to all for u re kind answers....
    Attached Images Attached Images     
    Asking is not a shame but not learning is a SHAME!!!

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


    Did you find this post helpful? Yes | No

    Default

    I'll lead you by the hand on this...

    If you type a number 4 on the PC (eg Hyperterminal), it sends a character, but it doesn't send a numeric value of 4 as you expect, it sends something quite different...

    Do you have a BASIC Interpreter on your PC (like GWBasic or QBasic or VisualBasic)?

    Find out what happens when you do this...

    Print asc("4")

    and then this...

    Print chr$(52)

    what appears on your screen?

    Look up what the ASC instruction does in BASIC (I'm not taking about PIC BASIC here but a BASIC that you can run on your PC). The ASC instruction will lead you to understaning the relationship between a string "4" and a numeric decimal 52. It will lead you to a TABLE of CODES... this table cross-references numeric values with displayable values... I'm trying hard not to give you the name of this table, that is for you to find out and tell me.

    Now I know you say that "Read the Manual" is my answer to everything, but I'm insisting that you go to the MeLabs website, and download the latest manual. The TABLE of CODES are in an Appendix in the BACK OF THE MANUAL. Look for it.

    I've also looked at your pictures... I'll guarantee this code table will be found in every one of your PICBasic Books.

  7. #7
    Join Date
    May 2005
    Posts
    49


    Did you find this post helpful? Yes | No

    Wink Thanks Melanie now i understand.

    Yes i have visual basic 6.0 professional now i understan what u mean.
    Communication between pic and PC is a table of ASCII characters.I understand they re communicating not like as i think.For exmp when i am trying to sent 1 from pc to pic it sents 49 decimal number or 31 hex.If i try to compare numbers useing if i have to look 49 for 1 not look 1 then it will fail.
    Asking is not a shame but not learning is a SHAME!!!

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


    Did you find this post helpful? Yes | No

    Default

    Exactly! Now you can also understand the example code I posted.

    You can always convert numbers from ASCII to numeric decimal...

    So... in the example with the test variable, if you take the ASCII number and subtract 48, you will be left with the Decimal Numeric Value (but this is only valid for numbers).

    Look at my new example...
    Code:
    	test var byte
    
    loop:
    	hserin [test]
    	test=test-48
    	if test=4 then 
    		HSEROUT ["I've struck Gold",13,10]
    		else
    		HSEROUT ["No Cigar",13,10]
    		endif
    	goto Loop
    	end

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Melanie
    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.
    Mel,
    I'm sorry,
    but is wrong with telling someone to Read The Fantastic Manual(s) ??

    However,
    if people feel better now we can leave it.
    regards

    Ralph

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



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


    Did you find this post helpful? Yes | No

    Default

    Actually, I didn't think they were particularly Fantastic, which is why the 'F' is crossed out.

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Melanie
    Actually, I didn't think they were particularly Fantastic, which is why the 'F' is crossed out.
    OK, and since they aren't funny either. . .

    I'm glad to hear you didn't have any other association with that letter . . .
    regards

    Ralph

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



  12. #12
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Read Those Friendly Manual
    Return To Fundamental Manual
    Remind That Friend Martin
    Ralph's Try to Fire Melanie ... no i don't think so
    Ralph's Tired about Fellows Misunderstanding

    Just kidding Ralph !!!
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

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