Problem with SMS Project: Using 16F877A


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    967


    Did you find this post helpful? Yes | No

    Default

    Same as the write, you do a read

    for a= 0 to 13
    read EE_Ph1+a, Ph1[a]
    next

    will read from The EEPROM to RAM

  2. #2


    Did you find this post helpful? Yes | No

    Default

    I did as advised, I also changed the code to send me a text back with the what is stored in it after I send 3 text with 3 numbers at 3 locations.

    The problem is with the first location only - the number stored at location one is "00078xxxxxxxx".
    Its only the first 3 digits getting stored as "000" instead of "+44"

    Thanks

    P.s- My PIC is reseting itself automatically, I have an 2.2K between Vdd and MCLR.
    Last edited by financecatalyst; - 19th October 2009 at 22:17.
    ___________________
    WHY things get boring when they work just fine?

  3. #3


    Did you find this post helpful? Yes | No

    Question

    I did the same process again with my original ph1 var byte[]13 only, results are the same. Also when I send another messege the previous number should be replaced at the location specified (Yes, it does enters to write the new number as led does toggles) , BUT its not happening as well. I also tried the following approach where I replaced all locations with "0" before writing the number :
    for a=0 to 12
    write a,"0" : pause 40
    write a,num[a] : toggle red : pause 700
    read a,ph1[a] : pause 40
    next a
    Still no luck.
    Last edited by financecatalyst; - 19th October 2009 at 23:49.
    ___________________
    WHY things get boring when they work just fine?

  4. #4
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    967


    Did you find this post helpful? Yes | No

    Default

    Looks like you're overstepping your variables boundary. Do a check on the array indices for each array variable that you write. Maybe you're writing more than it can hold and it overwrites the following variable. Variable in point is Num[13] in this case.

  5. #5


    Did you find this post helpful? Yes | No

    Question

    Quote Originally Posted by Jerson View Post
    Looks like you're overstepping your variables boundary. Do a check on the array indices for each array variable that you write. Maybe you're writing more than it can hold and it overwrites the following variable. Variable in point is Num[13] in this case.
    Could you please explain what you mean, I am sorry I dont understand how and what xcatly I have to do?
    ___________________
    WHY things get boring when they work just fine?

  6. #6
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    967


    Did you find this post helpful? Yes | No

    Default

    What I mean is you should check that if your variable is an array of 12 bytes, you should not be writing more than 12 bytes to it. If you do, you are overwriting another variable in memory which follows the one you are writing to.

  7. #7


    Did you find this post helpful? Yes | No

    Question

    Ok, I think I have got your point. I read somewhere that it is advisable to write "0" to all EEprom locations before attempting any write statement. Is it true?
    I will otherwise remove statements writing "0" to locations before an sms is received and after and sms is processed and system is ready to receive the new one.

    Also I wonder why ph1 locations 0 to 12 gets first 3 digits as 0. As far as overwriting is concerned there are no locations -3,-2,-1 for me to make a mistake and shift 3 places forward?
    ___________________
    WHY things get boring when they work just fine?

Similar Threads

  1. Problem displaying data from GPS module & using 16f877a
    By financecatalyst in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 15th April 2010, 10:27
  2. Problem with SMS IO Controller
    By dario.costa in forum GSM
    Replies: 4
    Last Post: - 30th November 2009, 07:04
  3. 16F877A problem: "coupled" digital values
    By Lupo83 in forum General
    Replies: 16
    Last Post: - 4th December 2007, 12:46
  4. sending sms with 16f877A
    By anushka in forum General
    Replies: 1
    Last Post: - 18th January 2007, 11:00
  5. 16F877A serin problem with baud rate 19200
    By leemin in forum Serial
    Replies: 1
    Last Post: - 31st July 2005, 09:45

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