GO/DONE

General discussion on mikroC.
Post Reply
Author
Message
flyplanef
Posts: 1
Joined: 01 Jan 2011 18:47

GO/DONE

#1 Post by flyplanef » 01 Jan 2011 19:04

i wan to ask i now using 16f876A

if i put the code as this

ADCON0 = (1<<GO_DONE)

izit it will active GO/DONE = 1?

User avatar
slavisa.zlatanovic
mikroElektronika team
Posts: 1321
Joined: 07 Apr 2009 09:39

Re: GO/DONE

#2 Post by slavisa.zlatanovic » 21 Jan 2011 15:58

Hi!

If you check out the PIC16F876A definition file (P16F876A.c located in the Defs folder) you'll see:
const register unsigned short int GO_DONE = 2;
So, writting:

Code: Select all

ADCON0 = (1 << GO_DONE)
has the same effect as:

Code: Select all

ADCON0 =  (1 << 2)
And yes, using that line of code you'll set the ADCON0.GO_DONE bit.
Best regards
Slavisa

Post Reply

Return to “mikroC General”