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
Oh no, here we go again!
Since a fundamental part of your project is communicating with two serial devices, why not just use a processor with two UARTs?!
Plenty exist: http://www.keil.com/dd/search_parm.asp
"i have to use a analog multiplexer"
Even if you do decide to make life difficult for yourself by using a multiplexer, Why does it have to be analogue?
This school assignment comes up regularly - use the 'Search' facility on this site to find previous discussions here, and Google (or other search engine) to find them elsewhere...
Use a chip with two serial ports. Only then will you be able to receive data from the GSM at the same time that your GPS emits data. Using a chip with a single UART when multiple UARTS are needed is so 1980.
See the documentation for your specific GPS to figure out what init strings you need to send to it.
Decoding a GPRMC string should be a quite trivial operation. The checksum is trivial. Splitting it into individual parameter fields is trivial. Converting the individual fields is trivial. So really no need to post a lot of source that has been written with possibly different requirements in mind.
See I've been doing projects like Temperature Sensor and Regulator, Security Lock Code, Data Acquisition System doing? copying from the net? actually designing hardware? actually designing software?
If you want help show where you are, "I have" NOT "I need".
e.g. a code snippet can show better than a thousand words what you (do not) know.
Giving you "sample code" will just lead to frustration on both sides.
Erik
Surely you cannot accuse of me copying my projects from net, It's me who knows how much dedicated efforts and sleepless night i spend for my projects.
It seems that the only thing which made you all lunatic at me was me asking you for the sample codes and i also gave u a reason for that.
But nevertheless, can't we now just get back to the basics. I wasn't here for a duel with you all. Vehicle Tracking System is my BTech project and is dearly close to me. All I want is full support from your side. Because I know the deeper i go into the project, the more tedious it would be going to be. All you tech savvy people with great application oriented knowledge Pls be with me then.
No, it's the way that you totally ignored all suggestions, and showed no evidence of having done any work at all of your own!
"can't we now just get back to the basics"
OK - These are the things that you need to do now:
1. You need to use the database search to find some potential candidate processors that meet your needs (including the 2 UARTs). If you then need some help selecting from the candidates, ask specific questions (but be sure that you have studied the datasheets first).
2. You need to do some research into how to use the serial port on your chosen processor. As already noted, it really is an extremely common task - and, thus, there are plenty of tutorials, examples, etc readily available all over the web.
3. You need to do some research into handling the output from a GPS receiver. As already noted, NMEA is a long-established and widely-used format - so, again, there are plenty of tutorials, examples, etc readily available on the web.
4. You need to do some research into controlling modems using AT Commands. As already noted, this is a long-established and widely-used format - so, again, there are plenty of tutorials, examples, etc readily available on the web.
Note that this is the standard way to start any project - called the research phase - that's why it is important that you learn to do it yourself!
To do all this you will need to take advantage of resource such as:
* Internet search engines - such as Google;
* Manufacturer's websites - including this one - where you will find technical documentation, datasheets, application notes, reference designs, examples, etc, etc. Be sure to make use of the 'Search' facility on these websites...
* Your college library - where you will find books on programming, etc
"I wasn't here for a duel with you all"
So stop fighting, and start working! Show some evidence that you have done some work on this!
Here are some links to get you started: www.8052.com/.../160143 http://www.keil.com/download/ http://www.keil.com/books http://www.8052.com/faqs www.keil.com/.../search.asp
Your project requires 2 UARTs for its basic operation - so these will be dedicated to the GPS and GSM.
You also need to think about how you will monitor and debug your project. A "spare" UART can be extremely useful - some would even say invaluable - for this.
So think carefully before limiting yourself with only 2 UARTs - there are plenty of chips with 3 (and more!) UARTs...
You already have the link to identify such chips...
Thank you, I went through the link to identify the chips. As I am keen on working with 8051 family. I came across AT 89C51RE2. It had features which suites me well.There is no MCU with 3 UARTS(in 8051 family). Also 89C51RE2 doesnt have a feature called as " ON CHIP DEBUG" ....What exactly is on chip debug. What is the difference between ISP(In System Programming) and IAC(In Application Programming)
In-system programming means that you can download new firmware to the chip without desoldering the chip.
You sometimes have dedicated pins, and sometimes have pins with multiple function. You might for example have a SPI interface that is "normal" SPI when the processor is running, but is a programming interface when the reset signal is active.
In-application programming means that your own application can directly or indirectly reprogram some parts of the flash contents. You might for example be able to write new code to XDATA and this is aliased with flash memory.
By the way - why do you say no 8051 chip exists with 3 UART? What about Dallas DS80C400?
Yes I know about DS80C400 having 3 UARTS but in the previous thread forgot to metion 3 UARTS + ISP. NO MCU with 3 UARTS + ISP.
Also Pls help me with what is called as ON CHIP DEBUG
Please note the difference between a "thread" and a "post":
A "post" is a single messge by a single author;
A "thread" is a collection of related posts - usually from different authors.
This is pretty well self descriptive!
It means that the chip has debug hardware built-in.
This means that a debugger can directly access the "internals" of the chip - CPU registers, memory, etc - without needing any special software running on the chip.
Without on-chip debug, the only way to gain such access was to remove the chip and physically replace it with an In-Circuit Emulator - or "ICE" for short. Hence on-chip debug is often referred to (not entirely accurately) as "on-chip ICE".
Why?
You say that you can't find any 8051-family chips that meet your requirements; so why are you "keen" to use a family that doesn't meet your needs - especially when other families so clearly do!
OR, do you actually mean that you already know the 8051 architecture, and have the tools, and don't (think you) have time to learn a new one? That could be a good reason to stick with 8051, but you really need to be clear about the pros and cons - and not just make vague statements like, "I am keen on..."
Correctly said that I actually mean that you already know the 8051 architecture, and have the tools hence i am keen on working with 8051 family.
Also Pls help me with the selection of GPS. What parameters should i look for in my GPS receiver. One of my friends told me that look for GPS with 20 or more channels What does this statement exactly mean? What all parameters should i look for before buying a GPS receiver
More channels are obviously nice, but maybe even nicer: - a receiver that supports multiple satellite systems (GLONASS or maybe upcomming Galileo, ...) - a receiver that very quickly locks on. - a receiver that allows use of a super-cap or battery to keep information (last position, ephemeris) even when you turn off your equipment - this allows for faster tracking when you turn it on - a receiver with high sensitivity - a receiver with extended precision, supporting WAAS, EGNOS or similar. - a receiver that can emit multiple positions every second, to reduce problems with lag. - a receiver that supports the specific NMEA strings you want - or maybe you prefer SiRF Binary? - direct support for powering an active antenna. - low power consumption. - "correct" supply voltage. - suitable form factor. - ...
There are a huge number of parameters to think about when selecting a GPS. Number of channels it can track is just a single parameter.
What do we mean by Extended RAM (XRAM).It was stated in the AT89C51RE2 data sheet that it has On-chip 8192 bytes Expanded RAM (XRAM) – Software Selectable Size (0, 256, 512, 768, 1024, 1792, 2048, 4096, 8192 bytes)
When i tried Googling it the info was reagrding X-fi and XRAM used in games. I couldn't make out the difference between XRAM and other normally used RAMs
Pls Help
I thought you said you were familiar with the 8051 architecture?!
XRAM, in the context of an 8051, is memory accessed by the MOVX instruction.
It was originally called 'X' for eXternal - because it was physically external to the 8051 chip.
Nowadays, most 8051-derivatives have at least some MOVX-addresses memory on-chip - so some people (including some chipmakers) fudge the issue by trying to give it different names.
As far as the CPU - and, therefore, your code - is concerned, it is all just MOVX-addressed memory; it is irrelevant whether it is physically on or off the chip.
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.
"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."
The reason why I asked you this because if it is XRAM it was external to the chip.But now since the datasheets say"ON CHIP XRAM" I was a little bit confused if its ON CHIP why is it "X".
Pls consider me worthy of something. Sometimes the question may sound too foolish but it is of great importance to someone
No - it is you who need to demonstrate that you are worthy of something!
You claimed to be familiar with the 8051 family - but your this clearly shows that you are not!
It is a very long time indeed since the "external" in XRAM meant literally external from the chip!
Even so, the AT89C51RE2 datasheet does clearly state what it means by "XRAM" - in the section headed, unsurprisingly, "Expanded RAM (XRAM)":
"4. The expanded RAM bytes are indirectly accessed by MOVX instructions"
and:
"The XRAM bytes can be accessed by indirect addressing, with EXTRAM bit cleared and MOVX instructions. This part of memory which is physically located on-chip, logically occupies the first bytes of external data memory."
See page 22: www.atmel.com/.../doc7663.pdf
You really need to study the whole datasheet; the bullet points on the front page are just highlights - they obviously cannot give a full description!
What are MOVX instructions
You're kidding, right??
You claimed that you were familiar with the 8051.
More than that, you claimed that you were so familiar with the 8051 that learning another architecture - even when other architectures would give you chips better suited to your task - was a sufficient reason to stick (sic?) with the 8051.
You clearly need to start with the very basics: http://www.8052.com/tut8051 www.8052.com/.../120112
And, again, http://www.keil.com/books/8051books.asp
Ok now you got me. Listen what i need to learn is just nothing. I know it all
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!
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.
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.
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??!
View all questions in Keil forum