Unimplemented bits ADCON0

Status
Not open for further replies.

max0412

Full Member level 5
Joined
Oct 26, 2003
Messages
251
Helped
34
Reputation
66
Reaction score
5
Trophy points
1,298
Activity points
1,999
Is this the proper way to configure AN1 for analog input in the ADCON0 register. I’m not sure how to deal with unimplemented bits. Bit’s 5 and 4 are unimplemented does that mean when I write to the ADCON0 I put 00 in them? Or is this wrong?

PIC10F220 adcon0 register



Writing to ADCON0

Code:
movlw     b'10000101'   ;CONFIG adc: AN1 Analog input
movwf     ADCON0
 

It does not matter what you actually write on the unimplemented bits, they will always be read as '0'. Your code should work. And it also should work if you put
Code:
movlw     b'10110101'   ;CONFIG adc: AN1 Analog input
 

    max0412

    Points: 2
    Helpful Answer Positive Rating
Ditto to bld's reply. Unimplemented bits are don't care when you write to them. Your config byte is correct.
 

    max0412

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…