Author Topic: MikroC PIC ADC?  (Read 13176 times)

0 Members and 1 Guest are viewing this topic.

Offline AcHmed99Topic starter

  • Contributor
  • Posts: 35
  • Country: 00
MikroC PIC ADC?
« on: January 08, 2011, 02:30:16 pm »
Any

« Last Edit: November 28, 2016, 01:06:23 pm by AcHmed99 »
 

Online djsb

  • Frequent Contributor
  • **
  • Posts: 956
  • Country: gb
Re: MikroC PIC ADC?
« Reply #1 on: January 08, 2011, 03:07:04 pm »
Unfortunately this compiler hides a lot of the setup code in the inbuilt functions or header files that are included at compilation. I have recently bought the EasyPIC6 board myself but I will not be using the bundled compiler. I much prefer CCS PCM or Hi-Tech Lite (included with Mplab) as they are more flexible.
Have a look through the assembly listing (file extension .lst or .asm) and check if there are any assembly instruction sequences similar to code snippets in the Microchip datasheet. The microchip forum is another source of help.


David.
David
Hertfordshire, UK
University Electronics Technician, London, PIC16/18, CCS PCM C, Arduino UNO, NANO,ESP32, KiCad V8+, Altium Designer 21.4.1, Alibre Design Expert 28 & FreeCAD beginner. LPKF S103,S62 PCB router Operator, Electronics instructor. Credited KiCad French to English translator
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 18022
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: MikroC PIC ADC?
« Reply #2 on: January 08, 2011, 05:25:21 pm »
well i use mikroeBasic so can't answer for C but in basic I still have to write to the ADC registers to set them up much like i would in assembly
 

Offline arcom

  • Contributor
  • Posts: 42
  • Country: hr
    • Arc's Lab
Re: MikroC PIC ADC?
« Reply #3 on: January 09, 2011, 12:42:35 am »
A/D initialization and acquisition is done inside the "ADC_Read" routine. Clock is set to RC and delay depends on selected oscillator speed. You can see this if you look at the ASM file (View -> Assembly; or just open the file from the project folder).
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf