Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

basic information about PIC

Status
Not open for further replies.

Micro Lover

Member level 2
Joined
Jul 22, 2009
Messages
44
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
pakistan
Activity points
1,614
hi
i m using mikroC PRO for PIC

in the examples of mikroC PRO for PIC, i saw one code

Code:
  ANSEL  = 0;      // Configure AN pins as digital
  ANSELH = 0;
  C1ON_bit = 0;    // Disable comparators
  C2ON_bit = 0;

In the example file, in the comments, ANSEL = 0; mean to Configure AN pins as digital, and what dose the statement ANSELH = 0; means? and also C1ON and C2ON also????

i want to know, from where i got all these information, statements and there function?

i m using C language and mikroC PRO for PIC

and finally, i m not college or university student, its just my hobby

thxxxxxxxxx
 

ANSEL and ANSELH registers are used to select analog select bits. You may have many analog pins in your microcontroller. Some analog pins uses ANSEL register and some may use ANSELH register. Please look into your datasheet.

Also, micro-controller have inbuilt comparators, C1ON_bit and C2ON_bit = 0 will disables the comparator mode and uses those corresponding pins as input/output.

Please look into this link, https://www.microchip.com/forums/m551843.aspx

Also read this book, it will be helpful for you to learn and program using mikroc https://www.mikroe.com/products/view/11/book-pic-microcontrollers/

Best wishes :)
 

These are the names of internal registers inside the PIC and the values you program is putting into them.
If you download the data sheet for your PIC from Microchip's web site it will list all the registers and what each bit or value in them does. Their data sheets are extremely good.

Brian.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top