|
|
View previous topic :: View next topic |
Author |
Message |
samus111
Joined: 28 Aug 2014 Posts: 29 Location: Colombia
|
|
Posted: Thu Sep 11, 2014 7:36 am |
|
|
Ok guys, I have finally found what's the root of the problem, but I don't why or how to solve it. The problem is that when I try to read from the EEPROM in addresses higher than 128, the read_memory line simply is ignored, so, when I try to print, the PIC gives a empty word, even, if before to store the data from the EEPROM in the string,I write a word like "hello" in it, when I print, in the places that before only appeared empty spaces, now appears the word hello. i wonder if there is a special reference to read in a memory location higher than 128, because, with the PICKIT 2, when I read the PIC once I have stored the coordinates,in the option EEPROM DATA, appears all the coordinates stored, so that the problem is when I try to read from these positions. some advise? |
|
|
ezflyr
Joined: 25 Oct 2010 Posts: 1019 Location: Tewksbury, MA
|
|
Posted: Thu Sep 11, 2014 7:37 am |
|
|
Hi,
Taking a step back a bit. You show a bunch of NMEA strings derived from a "log file from the serial port monitoring". What exactly does this mean? I assume you've got the GPS connected to your PC, and that is what you are seeing, right? A much better thing to show us would be what you MGPS() function is actually receiving. Also, you mention that you need to send 'GPS coordinates' to the satellite modem. What does that mean, Lat. & Long.? If so, you can get this information (for example) from a single NMEA sentence such a GPRMC. You can turn off all the other NMEA sentences that the GPS is sending, and make your life a bit simpler. It seems to me that job #1 is to receive the GPS data correctly first, and then worry about how you'll temporarily buffer it for upload to the satellite modem.
I also agree that too much focus on 'miniaturization' at the outset can hobble your development efforts. Get it working first, and then make it small, while never forgetting your size goals throughout the process.
John |
|
|
ezflyr
Joined: 25 Oct 2010 Posts: 1019 Location: Tewksbury, MA
|
|
Posted: Thu Sep 11, 2014 7:41 am |
|
|
Hi,
Yeah, write a simple test program to loop thru all the available EEPROM addresses, writing a known value in each location. Then follow this up by reading the same locations back. This should take you 5 minutes, and will prove/disprove that you can/cannot write to all EEPROM memory locations.
John |
|
|
gpsmikey
Joined: 16 Nov 2010 Posts: 588 Location: Kirkland, WA
|
|
Posted: Thu Sep 11, 2014 7:52 am |
|
|
Sort of what John said - but use a DIFFERENT known value for each location so you don't wrap around and fool yourself as to which location you are reading.
mikey _________________ mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3 |
|
|
ezflyr
Joined: 25 Oct 2010 Posts: 1019 Location: Tewksbury, MA
|
|
Posted: Thu Sep 11, 2014 7:57 am |
|
|
Hi,
I should have been more explicit. I was thinking of something like address 0 gets a value of 0, address 1 gets a value of 1, or some thing similar.
John |
|
|
samus111
Joined: 28 Aug 2014 Posts: 29 Location: Colombia
|
|
Posted: Thu Sep 11, 2014 7:59 am |
|
|
Well I know, I can send a order to avoid 5 of the six NMEA sentences, because really I only use one of these and I only need the hour, day, Latitude and longitude. but to add this feature, would have to make a connection more between the Tx's PIC and the RX's module, and also, I would have to make a coupling to avoid impedance problems between the Rx's iridium module, Rx's GPS module and Tx's PIC, so that the easy way was to make the program only searching for the NMEA sentence I need (In this case $GPRMC, and was very easy).
I tested the EEPROM memory before in various memory locations, and worked well, I am going to change the logic in the code, for to start from the last byte and finish in the first bytes, I hope this time works, I believe there is a bug in the burned or the CCS compiles. |
|
|
samus111
Joined: 28 Aug 2014 Posts: 29 Location: Colombia
|
|
Posted: Thu Sep 11, 2014 8:16 am |
|
|
Ttelmah wrote: | If you need to go really small, then just get a core.
Bond this directly to the board.
I've built devices significantly smaller than this, and used much larger PIC's.
Talk to somebody who is a specialist in such things. Your approach is going the wrong way. You need to start with the external stuff. How small each part of this can be made, then 'work back' towards the processor, miniaturising at each step. You will undoubtedly find that simple things like power supply capacitors, will be larger than your processor and all it's connections..... |
I didn't understand what exactly do you mean with "core"? It is a special microcontroller or something so? where can I obtain more information? |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19551
|
|
Posted: Thu Sep 11, 2014 9:44 am |
|
|
Microchip will sell you (in large quantities), the processor die, cut to just give a core component. If you look at many modern boards, where IC's traditionally sat, instead there is a black blob of epoxy, with no number etc.. These are chip cores, directly bonded to the board. You can nearly double the component density when working this way. Look inside a modern USB memory stick, the 'odds are' that it'll be just a tiny board with four or five such blobs. |
|
|
samus111
Joined: 28 Aug 2014 Posts: 29 Location: Colombia
|
|
Posted: Thu Sep 11, 2014 10:50 am |
|
|
Thanks to my GOD, I have finally discovered the error and I have been able to solve it. There were a inconsistent with the variable "ms" that currently has the job to indicate the memory address from the EEPROM, I had declared it like long int, but when I changed to int16, it works perfectly, I don't know why there is a incompatibility with the long int in numbers higher than 128 that points a memory address, but well, at least I can now to resume, thanks to everybody, I will post other question if I have troubles more later. |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|