This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Interfacing CD4052 with 2 uarts in 8051

Hey all,

I am doing a project on Vehicle Tracking System using GPS and GSM Modem.The 2 devices aforementioned communicates with 8051uC. But since there is only 1 UART in 8051 i have to use a analog multiplexer i.e CD 4062. I want to know how to interface it with GPS, GSM, and 8051.

Also it would be grateful if anyone could tell me how to parse output of GPS and how initialize a GPS receiver to that it starts giving me the GPRMC

Parents
  • I know it all

    Yes, Mohammed, you most definitely do.
    You have no idea about memory types in the architecture that you are so "keen" on working with (are you sure you know what "keen" means?). You don't know what MOVX does. You miss fundamental, universal knowledge that is absolutely compulsory to even start with embedded programming (or programming altogether!). But yet again, you know it all.
    What a waste of time!

Reply
  • I know it all

    Yes, Mohammed, you most definitely do.
    You have no idea about memory types in the architecture that you are so "keen" on working with (are you sure you know what "keen" means?). You don't know what MOVX does. You miss fundamental, universal knowledge that is absolutely compulsory to even start with embedded programming (or programming altogether!). But yet again, you know it all.
    What a waste of time!

Children
  • It sounds like it would be better for you to consider a Cortex M3 chip - it has a similar price, low power consumption, better performance and...a more generic programming model.

  • What is a microcontroller. What is 8051.I think 8051 and a diode is one and the same

  • It is you all who have compelled me to write some foolish posts because of the abominated comments from some of them.
    Some one was trying to explain me the difference between POST and a THREAD. Come on these mistakes can be ignored.

    ""What do we mean by Extended RAM (XRAM).

    The fact that you ask this puts the lie to your earlier claim that you were keen on using an 8051 because you "knew the architecture". You clearly don't.""

    You could have simply told me to look once again in the data sheet(on page 22).
    No you were there so that u can insult someone
    I did go through some of the other thread as well.
    Over there too you made some nasty comments.
    I think you all are here to boast your superiority and not for help.

  • Well, you are completely wrong.
    I don't understand WHY you thought posting foolish comments will increase the willingness of other to help you. Trust me: in the real life, in the industry - that rarely helps. Also, the criticism you got here was completely justified and was based on your own input, which was, by your own admission - foolish. When repeatedly contradict yourself, don't be surprised when people call you a lier!

  • You could have simply told me to look once again in the data sheet(on page 22).
    why?
    you, evidently figured that out by yourself.
    what you do not get is that we are here to help, but REAL help is to make you more self-reliable which includes reading datasheets.

    you were given:
    Plenty exist: http://www.keil.com/dd/search_parm.asp
    and respond
    Can u all name a few uC's in the MCS51 / 52 range having 2 UARTS
    this clearly indicates that you did not even use the advice you were given

    No you were there so that u can insult someone
    I did go through some of the other thread as well.
    Over there too you made some nasty comments.

    if
    We're getting that you consistently ignore all advice you've been given, keep asking the same questions over and over
    is a "nasty comment" then YOU have a problem

    I think you all are here to boast your superiority and not for help.
    YOU "boast your superiority" by comments like Ive been working with uC's for about a year
    anfd then asking What are MOVX instructions which show that "working with uC's" has not been coding, leave alone that finding out "What are MOVX instructions" is a matter of a quick look at "the bible" that even has a chapter "instruction set" making ir easy to find.

    My recommendation will be that you take some time to study (NOT 'read', but 'study') "the bible" and the datasheets before you even think of moving on with your project.

    some of the flak here has been due to the fact that you do not get that we are here to help, not here to read datasheets for you.

    Erik

  • I agree that I didn't look onto the link: http://www.keil.com/dd/search_parm.asp.
    And I admit my lack of interest(as you say) then.

    But when I seriously tried to come back by the statements But nevertheless, can't we now just get back to the basics.
    What u all did again tried to outdo me when I asked you about XRAM.
    See I knew what are MOVX instructions - they are used to move the data from or into an external memory. But the doubt was if its external memory how is it ON CHIP.
    Since it was stated ON CHIP Extended memory I thought that it could be something different. Hence I thought that If i could just clear my doubts by posting in the forum. Instead of getting the doubt cleared what I received from u all was berated statements likeI thought you said you were familiar with the 8051 architecture?! and What do we mean by Extended RAM (XRAM).

    The fact that you ask this puts the lie to your earlier claim that you were keen on using an 8051 because you "knew the architecture". You clearly don't..
    I do believe REAL help is to make you more self-reliable which includes reading datasheets. But the way you should say all such things is also very important.

  • See I'm sorry for all the above statements.
    But the fact is that I seriously need help on my project.
    I know what you all are trying to do is make me learn something and I appreciate this fact. But certain statements(which to u might sound foolish) would be of utmost importance to me. dont answer directly them but try to do it indirectly by statements like Go through the datatsheets once again.

    By the way SORRY for all the wrong statements made by me.
    Pls dont take it all seriously

  • I agree that I didn't look onto the link: http://www.keil.com/dd/search_parm.asp.
    And I admit my lack of interest(as you say) then.

    so you posted just to entertain us?

    See I knew what are MOVX instructions
    so you asked "What are MOVX instructions" just to entertain us?

    We do not need 'entertainment', we gladly answer clearly stated questions that are not a result of being too lazy to look in the datasheet.

    Erik

  • Remember that nobody here knows anything about you, your background, or your experience other than what you tell us in your posts.

    If you tell us in one post that you are familiar with the 8051 architecture, but then say you don't know what XRAM and MOVX instructions are - what are we supposed to think??!

    "the doubt was if its external memory how is it ON CHIP"

    I that was your specific doubt, why did you not ask that specific question?

    Again, are you really telling us that you are familiar with 8051s, but have never come across one with on-chip XRAM?

    I think you need to explain exactly what "experience" you have had with 8051s - otherwise, how can we tell how to answer you appropriately??!

  • Let us put all of my above statements into a bin.
    I'll start from the scratch.

    1)Well, I know a lot about 8051(I have covered all chapters of Mazidi).The reason for not knowing anything related to ON CHIP XRAMs is that I've been using AT89s52 which has 256bytes of internal RAM and 8K Bytes of In-System Programmable (ISP) Flash Memory. No uC other than this for my projects(As part of my syllabus I've done PIC18F family too).

    2)Currently as my Final Year of BE project. I took Vehicle Tracking System using GPS and GSM modem.
    I know that GPS outputs in NMEA format and GSM modem works on AT commands.

    3)The Reason why I am keen on using 8051 family is that I am adhered working with 8051.It has been a part of my projects.So i am quite acquainted with it.

    4)Currently my doubt is that the RMC data available would be of this format " $GPRMC,161229.487,A,3723.2475,N,12158.3416,W,0.13,309.62,120598, ,*10" It contains many information.If i recieve each bit(through my RXD pins). Would i save in the data registers or in the memory.

    5)I've posted the above information assuming that all the previous posts by me is just thrown off into a bin.

    PLS HELP.

  • Would i save in the data registers or in the memory
    Make an attempt to code the serial, if "I have covered all chapters of Mazidi" is true and 'covered' does not mean "read but did not understand" you should be capable of getting very close. When that is done you have the answer to the above.

  • Ill definitely work that out. Would be a little away for sometime till i get the answer. ill reply back soon

  • Good idea.

    Probably best to start a new thread - with a link to this thread, and a summary of what you've learned.

    "8051 ... has been a part of my projects. So i am quite acquainted with it."

    Don't get a false sense of security about that: your experience, apparently, amounts to just one specific chip, and one rather outdated textbook - it's a start, but you still have much to learn.

    See: www.8052.com/.../175896
    And: www.8052.com/.../175610

    Your first step is to learn how to use the UART(s) on your chip to do serial comms. As already noted, there are plenty of examples of that on this site, the Atmel site, and many other places on the web.
    It should also feature in any book on the 8051.

    A useful site for finding source code is http://codesearch.google.com

    "Would i save in the data registers or in the memory"

    Are you planning on programming in 'C' or Assembly?

  • As you know, the processor has a limited number of registers. Even if you combine all register banks, it's not enough for a full $GPRMC string.

    So you then have two options - already covered earlier in this thread:
    - process the data one byte at a time directly when receiving the characters. Store state machine state and decoded field data in variables.
    - store a full line of text in a character array. Then decode it.

    Decoding of the data is done almost identically whatevery processor or computer language you are using.

    Note that NMEA is a protocol standard. But that doesn't mean that you can't find GPS modules that supports or uses other protocols. And not all GPS modules supports all NMEA strings. More importantly - different modules emits different sets of NMEA strings default when powered up - you may need to send an init string to the module to change the set of NMEA strings it should emit - and what frequency the GPS should use for the individual strings. That means that you need the manual for the selected GPS. Don't ever get a GPS without already having access to a good manual. The same, obviously, goes for the GSM module - you may need to use manufacturer-specific AT commands. And their existence requires you to have the AT protocol documentation.

  • Here what I got for the 20 Channel EM-406A SiRF III Receiver with Antenna GPS module.
    Here is the link : www.sparkfun.com/.../product_info.php

    What should I look in manual for selecting whether the GPS module is good or not.