PIC16F690 - 24LC08B: they won't talk...


Closed Thread
Results 1 to 17 of 17

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    And pin 7 on the eeprom is connected to _______________

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    EEP_ADDRESS MUST be a byte... Something change in the ControlByte when you want to access the other EEPROM Page (Banks). Page 6 of the above data sheet

    One more, you haven't disable AN<9:8> yet, and it's your I2C lines... check ANSELH settings.... probably THE MAIN reason why you always have 00 as results. If it was the WP pin of the EEPROM, you would probably have FF all the time. if the device is already blank.
    Last edited by mister_e; - 23rd May 2008 at 00:22.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    EEP_ADDRESS MUST be a byte... Something change in the ControlByte when you want to access the other EEPROM Page (Banks). Page 6 of the above data sheet
    Yep, sure enough... Figured Microchip should know better than to place 'WORD' above those on page 7 and 10...and the 'sheet even shows 8 bit slots in the diagram...

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    There's always something to screw the understanding here and there huh?

    Some call it ControlByte, some other Control Word

    Some says Address, some Adress word for 8 bits address...

    and so on... nice world... thanks to my avatar
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  5. #5
    xnihilo's Avatar
    xnihilo Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    There's always something to screw the understanding here and there huh?

    Some call it ControlByte, some other Control Word

    Some says Address, some Adress word for 8 bits address...

    and so on... nice world... thanks to my avatar
    I will change my code and let you know if anything changes.
    Thanks a lot for your help guys.
    (If it doesnt work I'll try to find a simple program to write a byte to ter 24lc08b from a 16f684 (which I start to be fami iar with) and if it works I can try to migrate the code to the 16f690, which is a chip still full of secrets to me).

    By the way, as you pointed out the datasheet talks about WORD... and for me a word is supposed to be a two bytes chunk of data... this does not help clear confused minds like mine...

  6. #6
    xnihilo's Avatar
    xnihilo Guest


    Did you find this post helpful? Yes | No

    Default

    Funny, i have just read the chapter 4.2.1 dedicated to ANSEL. it is witten that if left set, the bits will lead to a 0 being read everytime.
    rc6 and rc7 wew still analog, as you pointed out mister_e. No wonder why i got 0 when reading back.
    This is because i'm used to pic16f684 where there is only ansel and no anselh so i didn't think of checking again all registers for 16f690, now I know i should.

    in the meantime i wonder if there are other registers that i should care of like these related to serial connections: eusart, ssp,...

    We have to think of so many things when using a pic. there are habits and good practices i don't have yet...

  7. #7
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    If you're not sure, refer to the end of each module section, they provide you the related register list for the according module. Table 9-2 (pdf page 120) for the ADC
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  8. #8
    xnihilo's Avatar
    xnihilo Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    And pin 7 on the eeprom is connected to _______________
    to gnd of course. i do not want to write protect the chip.

Similar Threads

  1. PIC16F690 code help please
    By hysteria92 in forum mel PIC BASIC
    Replies: 1
    Last Post: - 24th February 2010, 16:17
  2. PIC16f690 LCD Not Working
    By hhosteam in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 3rd June 2009, 06:26
  3. Replies: 1
    Last Post: - 19th February 2009, 13:35
  4. Replies: 0
    Last Post: - 13th February 2009, 03:34
  5. gps rikaline x5 to pic16f690
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 9th May 2008, 11:21

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