And pin 7 on the eeprom is connected to _______________
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.
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.
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...
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...
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.
Bookmarks