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![]()
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.
Hi,
Thanks for your answer. It works now.
I've used anselh = 0 and now I get the righ value back when reading a value from the pic.
Bookmarks