ADC and SEEPROM on 16F877A


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default Re: ADC and SEEPROM on 16F877A

    Yes, HenrikOlsson , if you look at my original post, (the one that I forgot to put the CODE quotes around) you'll see the ADC Initialize part correct, and that is how it should have appeared in my subsequent post.

    mackrackit , I'm with Chirpy - I didn't think I would need to use WORD instead of BYTE unless I was using 10 bit, but after changing it in my code, it isn't the case. I would have thought that I only would have to change the WB var to a WORD since it counts up to 600, but I changed all var's associated with the address as well, and it is now working perfectly!! Not sure I understand why though. I first tried just changing WB to a WORD, and still had the same incorrect results. I know I also need to clean up the code a little too - not sure why I have 2 var's for the address, but I did need to change them both in both the I2CWrite and I2CRead commands.

    Thank you all for your help!!

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: ADC and SEEPROM on 16F877A

    The address is 16 bit on this EEPROM, that is why the variable for it needs to be WORD size. It has to have all the places filled. It is in the data sheet.
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. New software filter for adc reading
    By aratti in forum Code Examples
    Replies: 29
    Last Post: - 6th August 2024, 22:35
  2. Help with multiple ADC inputs
    By wdmagic in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 4th January 2013, 01:27
  3. 12cwrite not working with 24LC08 SEEPROM ??
    By tekart in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 28th July 2010, 15:26
  4. 16f877a
    By alaaodeh in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 7th February 2007, 00:38
  5. I need help with 16F877A
    By valerij in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th December 2006, 18:05

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