6- Analog to Digital Converter | MPLAB XC8 for Beginners Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ต.ค. 2024

ความคิดเห็น • 205

  • @StudentCompanion
    @StudentCompanion  3 ปีที่แล้ว +1

    If you found this video useful, please give it a thumbs up 👍 and subscribe to the channel. Also, let me know what topics you want me to cover in future videos by commenting below.
    By simply liking the video or a short comment like Thanks, helps this video in TH-cam algorithm to be found by others. It helps us a lot.

  • @mikko-mattikurppa3869
    @mikko-mattikurppa3869 3 ปีที่แล้ว +1

    Thank you so very much. You are a great teacher. I have a pile of older pics and newer pics. I thought the best way to really learn something is to not use mcc and since i want to use my older pics first, these tutorials are so information rich for me. Thank you.

  • @Gitbizy
    @Gitbizy 7 ปีที่แล้ว +3

    Great job on these videos! Well done!

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +2

      +Shane Rolin thank you. We appreciate your feedback.

    • @Gitbizy
      @Gitbizy 7 ปีที่แล้ว +1

      Since you are very knowledgeable with Proteus, is there any way to import a board layout (from a PDF schematic, or otherwise) to make the process of laying out a design faster?

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +1

      +Shane Rolin i don't think Proteus has that option at the moment. Especially pdf.

  • @FelipeXBR360
    @FelipeXBR360 9 ปีที่แล้ว +3

    Nice tutorial. It helped me a lot.

    • @StudentCompanion
      @StudentCompanion  9 ปีที่แล้ว +3

      you are welcome! thanks your feedback.

  • @keshenanaidu7160
    @keshenanaidu7160 9 ปีที่แล้ว +4

    Nice one. Thanks!

  • @InaSkillsElectronics
    @InaSkillsElectronics 9 ปีที่แล้ว +2

    very nice.. thanks you for your tutorial.

  • @lisarios9949
    @lisarios9949 8 ปีที่แล้ว +4

    Hi, Im using the latest version of xc8 (v1.36), and the file MPLAB_XC8_Peripheral_Libraries does not exist. Can I find resumed information on another folder or must I "read" all the datasheet ?
    In my case, I am surching information about CAN bus, but I want to see all your videos step by step. Maybe can I find this answer on your appropriated video.
    However, thank you for your videos, and thank your for your previous quick answer ;)

    • @StudentCompanion
      @StudentCompanion  8 ปีที่แล้ว +4

      +Lisarios Hank' MPLAB is phasing out the PIC18F Peripheral Library which is no longer included in XC8 from version v1.35.
      If you are using XC8 compiler v1.35 or a later version, the Peripheral Libraries which include the LCD and other peripherals like ADC, SPI, I2C libraries are no longer included in the installation file as with previous versions. You can use MPLAB code configurator to configure your peripherals (www.studentcompanion.co.za/mplab-code-configurator/) or you can download the Peripheral Libraries as a separate download and install them. You can download them at microchip website under the MPLAB XC Compilers downloads tab. They are now called PIC18 Legacy Peripheral Libraries (www.microchip.com/mplab/compilers).

  • @anithasshenoy6662
    @anithasshenoy6662 8 หลายเดือนก่อน

    Very nice tutorial. What changes in the code will be needed to read more than 5 volts. I know it requires implementing voltage dividers. But in the end the ADC input shall be only within 5v. so how can we tell the MC that the range has changed . I suppose we need another input . But how ? thks a lot.

  • @mohitnair6871
    @mohitnair6871 3 ปีที่แล้ว +1

    I have been working on a existing PCA designed where in the hardware is already fixed such as the no of pins and other hardware configuration.Truely speaking I had to change the logic alone which was done by a third party based on our requirements and inputs But this time I wanted to do it myself (coding alone) and I am accustomed to mikroC and proteus way of compiling based on the videos referred.Is there any pic model which can replace pic 12f510 but still be cheaper and compiled by mikroC and checked by proteus and used in the existing PCA.I have already modelled it in proteus.Only coding part is left. Once that is complete I have burn it in our existing PCA and check for it's functionality.

    • @StudentCompanion
      @StudentCompanion  3 ปีที่แล้ว +2

      You can use Microchip Advanced Part Selector tool, enter all the features that you need equivalent to your existing PIC, like number of pins, memory, peripherals, etc.
      Then it will give you the PIC models that meet your criteria: www.microchip.com/maps/Microcontroller.aspx

  • @monkshoodtv
    @monkshoodtv 4 ปีที่แล้ว +1

    I am trying to follow your course, in this case the ADC, I follow the example explicitly, but the '#include "LCD.h"', well, where is that? I'm using MPLabX with XC82.10.

    • @StudentCompanion
      @StudentCompanion  4 ปีที่แล้ว

      Hi, in this tutorial we used the PIC18F peripheral libraries but it's no longer supported from XC8 v2.0.
      Because you are using XC8 2.10, it won't work, you can either download an older version of XC8 compiler older then XC8 2.0 or preferably use MPLAB Code Configurator which is the new tool Microchip introduced to replace those libraries. So it's better to use a new tool which has many advantages. Watch this video to learn more: th-cam.com/video/4WaB_Lj8FnY/w-d-xo.html

  • @rusbelhernandez4834
    @rusbelhernandez4834 9 ปีที่แล้ว +3

    very nice!

  • @mohitnair6871
    @mohitnair6871 3 ปีที่แล้ว +1

    Hi...this is regarding pic12f510 microcontroller that we were referring to from another account.Is this the way we have to comment on a video.?in the mikroC version I am using, there is 12f510 pic but it's not available in proteus.This is where we are facing difficulty.Is there any other compiler which can help us in programming pic 12f510 .

    • @StudentCompanion
      @StudentCompanion  3 ปีที่แล้ว +1

      Yes. This is how you can comment, even though you commented on a MPLAB xc8 video, but it's fine.
      This PIC is available in Proteus but it's not available in mikroC. You must use a different PIC. That is supported or choose a different compiler.
      You can use MPLAB XC8 compiler, it's free and it suppport all PIC models.
      Is there a good reason to use this very old PIC while there are newer alternative which are cheaper and better with more features?

  • @StudentCompanion
    @StudentCompanion  9 ปีที่แล้ว +3

    +Prasanna Routray Sorry we don't do assembly language. You can watch our Flowcode tutorial and convert the code into assembly. Flowcode has an option to convert code to C or assembly: th-cam.com/video/xHwmlEuQW5w/w-d-xo.html

  • @bhavinrathod406
    @bhavinrathod406 8 ปีที่แล้ว +4

    you doing great job sir !
    well i wanted to know what should i do if i am using pic 16f family microcontroller ?
    does xc8 supports thes mcs ? i could not find any peripharal library for that

    • @StudentCompanion
      @StudentCompanion  8 ปีที่แล้ว +2

      hi, thank you for watching our videos. XC8 supports all PIC families including the PIC16F family but the peripheral libraries were created for the PIC18F family only.

    • @StudentCompanion
      @StudentCompanion  8 ปีที่แล้ว +3

      the easiest and the best is to use Mplab code configurator as this tool support pic16 pic18 and pi24 series. watch our tutorial 18 to learn more.

  • @SCALO_Coimbatore
    @SCALO_Coimbatore 5 ปีที่แล้ว +1

    Dear sir.. I plane to do a project digital weighing scale using load cell, accuracy is 10mg to 600g capacity load cell.i have little bit confusion which pic microcontroller using.. And also instrumentation amplifier need for load cell section? I need over all ideas about this project.. I learned microcontroller by student Companion tutorial. So now I ready to do a project by own. Although need your help to start this project. Thank you

  • @stigtheghost
    @stigtheghost 9 ปีที่แล้ว +4

    question please i have a pic32mx170256b and xc32 __delay_ms () dose not compile :(

    • @StudentCompanion
      @StudentCompanion  9 ปีที่แล้ว +3

      pier shaw These tutorials we present in this playlist are only for 8-bit PIC Microcontrollers like the PIC16Fxxxx or PIC18Fxxxx. It is not for 32-bit PIC Microcontrollers like your PIC32mx170256b. This is a wrong forum for your question. At the moment, we are not dealing with 32-bit Tutorials. You cannot use our codes for these 32-Bit Microcontrollers, it will give you errors.
      Thanks

  • @PrasannaRoutray97
    @PrasannaRoutray97 9 ปีที่แล้ว +3

    can you please tell me how to implement these idea's in PIC microcontroller using assembly language?
    Thanks

  • @onemorescene_vid
    @onemorescene_vid 7 ปีที่แล้ว +1

    my questions are : Base on the three arg in the openADC()
    1. please
    why did you use ADC_FOSC_2, why not ADC_FOSC_4? you said it divides the
    freq osc by 2 , please what is the effect of this division?
    2. how does A/D justification works?
    3.what is the importance of the A/D interupt inside this function as arg?
    Thanks in advance as you break them down for me.

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +1

      Hi, All these configuration depend on the PIC used as a configuration of a particular PIC microcontroller will not yield the same desired effect if applied to a different PIC, you need to read your datasheet to make sense for your PIC. Other factors are: The chosen oscillator frequency, required accuracy, etc.

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +2

      1. The ADC_FOSC_x is to select clock frequency used for internal synchronization of A/D converter. This depending on your oscillator frequency affects the duration of conversion. The clock is critical to produce the fastest but also accurate Analog to Digital Conversion.
      The time to complete one bit conversion is defined as TAD. One full 10-bit conversion requires 11 TAD periods. For correct conversion, the appropriate TAD specification must be met. Check your device datasheet to get the ADC conversion requirements, for PIC18F26K20 the min TAD is 0.7 uS and max 25 us and this is dependent on your oscillator frequency.
      2. The A/D justification won't make any difference to you whether you choose left or right if you are using these libraries, but will have to be considered when you are accessing these registers yourself without libraries. If you receive a 10-bit A/D value and you need to store it in an 8-bit variable, you'll need to know how it's justified (the least significant bit) so you'll know which 2 values (least) to drop to fit in your 8-bit variable for example
      3. You'll need interrupt to let you know when an A/D conversion has completed if in your application it's critical otherwise you can omit it.
      watch this video, it describes these terms graphically with MPLAB Code Configurator: th-cam.com/video/4WaB_Lj8FnY/w-d-xo.html

    • @onemorescene_vid
      @onemorescene_vid 7 ปีที่แล้ว +1

      Thanks so much...

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +1

      You are welcome.

  • @nuruljanah9621
    @nuruljanah9621 9 ปีที่แล้ว +5

    pls sir i need a tutorial on how to use pic-kit2 or 3 to load the code to the pic on breadboard......pickit2/3 which is better?

    • @StudentCompanion
      @StudentCompanion  9 ปีที่แล้ว +4

      +adigun Orlami It's very easy to load the code into the pic. It's basically plug and play. you can read the help file.

  • @nirindrainyjeraymond6248
    @nirindrainyjeraymond6248 5 ปีที่แล้ว +1

    Hi, actually i am using MPAB IDE v5.2 and i do not have "ADC.h"!? where can i get one? i'm working on PI18f45k20. Thanx for answer.

    • @StudentCompanion
      @StudentCompanion  5 ปีที่แล้ว

      What is the version of your XC8 compiler? It seems like you don't have the peripheral libraries installed in your compiler, they are now a separate installation.

    • @StudentCompanion
      @StudentCompanion  5 ปีที่แล้ว +1

      Watch this video to learn more: th-cam.com/video/4WaB_Lj8FnY/w-d-xo.html

    • @nirindrainyjeraymond6248
      @nirindrainyjeraymond6248 5 ปีที่แล้ว

      @@StudentCompanion Thnax, you understood what i need! i actually use XC8 v2.5

    • @nirindrainyjeraymond6248
      @nirindrainyjeraymond6248 5 ปีที่แล้ว +1

      @@StudentCompanion Compiler XC8 v2.05 now i don't have the "Link in peripheral library"! in XC8 Linker.

    • @StudentCompanion
      @StudentCompanion  5 ปีที่แล้ว +1

      @@nirindrainyjeraymond6248 Hi, you can't install the peripheral library with XC8 v2.05, it's no longer supported. The last supported version was XC8 v1.45 from v2.0.0 you can't use the peripheral library. either use MPLAB Code Configurator or install an old version of XC8 from this page: www.microchip.com/development-tools/pic-and-dspic-downloads-archive
      Please note if you install XC8 v1.34 you won't need to download and install the peripheral library, it's already included in the compiler. This is the last version that had it.

  • @tiagot6916
    @tiagot6916 6 ปีที่แล้ว +1

    Thanks!

  • @Samicreat
    @Samicreat 7 ปีที่แล้ว +1

    I'am Sami from North Africa. I want to say thank you very much for you amazingly you tube channel. I suppose to you why don't make to us virtual microcontroller course on your web site. And each student or electronic worker or any interested person pay that formation

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +2

      +Sami Dhiab thank you for watching our videos and for your feedback. Much appreciated.
      At the moment our aim is to provide free tutorials as much as possible and rely kn donations to fund the tutorials. We hope people will appreciate and support us with any donation they can afford so that we can accelerate the tutorials.

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +2

      +Sami Dhiab we also have more tutorials on our website: www.studentcompanion.net
      Thanks

  • @ahmedmbarak5146
    @ahmedmbarak5146 7 ปีที่แล้ว +1

    Hello Sir, i wonder what programe your using to simulate the PIC and the outside peripherals.

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +2

      +ahmed mbarak Hi. The simulation program is called Proteus.

    • @ahmedmbarak5146
      @ahmedmbarak5146 7 ปีที่แล้ว +1

      its really nice..which website did you download it from?. and do you happen to have a tutorial on PIC microcontroller sleep mode?..

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +2

      +ahmed mbarak you can download a demo version at Labcenter Web site: www.labcenter.com

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +2

      +ahmed mbarak we don't have tutorials on sleep mode but we will in our future tutorials

  • @alekys07
    @alekys07 9 ปีที่แล้ว +3

    Muito bom.

  • @LetoausmGhetto
    @LetoausmGhetto 7 ปีที่แล้ว +1

    Hi
    in my project I want to use an LCD but I want to connect it to the C-Ports
    I tried to change the Ports in the Header but in simulation the signals are sent to B-Ports
    Do you know how to fix this??
    Thanks in advaced

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +1

      Hi. If you are using PIC18F Peripheral libraries for your ADC, you'll have to recompile all the C files by including them into your project as well to be able to change the PORT. Watch this video we explained in detail how to do so: th-cam.com/video/RkDN2GW_SxU/w-d-xo.html

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +1

      IF you are using a new PIC model supported by MPLAB Code Configurator (MCC), I will advice to use MCC to configure your ADC module, it's easy and quick.
      Watch this video, we explained in detail LCD and ADC with MCC. With this library, you can connect your LCD to any PORT of the PIC easily: th-cam.com/video/4WaB_Lj8FnY/w-d-xo.html

    • @LetoausmGhetto
      @LetoausmGhetto 7 ปีที่แล้ว +1

      I watch the video you recommended...
      ...now the C-Ports are putting out a signal but the LCD is not displaying anything
      have you any idea waht this could be?

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +1

      +Leto ausm Ghetto is your lcd wired correctly with pins of lcd to correct pins of PIC? Especially the RS, E and RW pins?

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +1

      +Student Companion check those pins

  • @rohitpatil4785
    @rohitpatil4785 6 ปีที่แล้ว +1

    Hello sir may I know how to transfer ADC float value without sprintf because in c18 compiler sprintf is not working for float value.

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +1

      Can i know what is the reason of using the old C18 compiler while there is XC8?

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +1

      I believe sprintf should work with C18 compiler as well. I don't see a reason why it shouldn't even though we don't use C18. You must be doing something else wrong.

    • @rohitpatil4785
      @rohitpatil4785 6 ปีที่แล้ว +1

      Student Companion it's working only for "%d" not for "%f"

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +1

      I'm not sure about that. But i think it should work. Unfortunately we don't support C18 compiler, only XC8

  • @yogeshagrawal1608
    @yogeshagrawal1608 4 ปีที่แล้ว

    sir
    which is this software to run code in computer(virtual simulation ) by configuring hardware (pic chip and display etc) . very nice topic covered .thanks

    • @StudentCompanion
      @StudentCompanion  4 ปีที่แล้ว

      Thanks for your feedback. The software is called Proteus. It's from labcenter electronics

  • @bashiralao9172
    @bashiralao9172 6 ปีที่แล้ว +1

    Why did u choose ADC_FOSC_2 why not ADC_FOSC_4 or 8.
    And why did you choose 2tad as your aquisition time. Is there any specific calculation for them?

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +1

      The clock source affects the duration of ADC conversion. Depending on your application you might want a shorter delay but also affect the accuracy.
      The TDA is the time to complete one conversion. For correct conversion the appropriate TDA speciation must be met. This is PIC model dependant. You must read your datasheet for more information.

  • @bhavinrathod406
    @bhavinrathod406 8 ปีที่แล้ว +2

    can you demonstrate tutorial on how to record a voice speech and save different raws of voice and play as back through speaker as we wanted using pic microcontroller ?!

    • @StudentCompanion
      @StudentCompanion  8 ปีที่แล้ว +1

      thanks for watching our videos. we will think about it but not at the moment.

  • @charliearong9244
    @charliearong9244 7 ปีที่แล้ว +1

    good day sir I watch your tutorial 6 which is Analog to Digital Converter because it is related to my project . I am using PIC 18F45K22 ,I follow all your video instruction and my program runs but I dont know what Pin of the microcontroller can I get the digital output can you help me? thank you.

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +1

      +charlie arong hi. Thanks for watching our videos. Almost any pin of the microcontroller can be used as digital output pin. Watch our tutorial 1 and 2 to learn more. We usec digital output pins in those tutorials to connect an LED.

  • @birdiesaura768
    @birdiesaura768 6 ปีที่แล้ว +1

    Hello, I am having a little problem with the project
    OpenADC (parameters); has to have ADC_"n"ANA as the third argument
    But when i write it in the code, instead of recognizing it as an argument, MPLAB takes it as a simple command and does not build the project successfully.
    Here is what I wrote
    OpenADC(ADC_FOSC_2 & ADC_RIGHT_JUST & ADC_2_TAD, ADC_CH0 & ADC_INT_ON & ADC_REF_VDD_VSS, ADC_1ANA);
    And here is what the error is:
    main.c:70: error: (192) undefined identifier "ADC_1ANA"
    PS: I have linked the peripheral library and included adc.h in the project

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +1

      +Gray Fox which PIC are you using? Which compiler version are you using?

    • @birdiesaura768
      @birdiesaura768 6 ปีที่แล้ว +1

      MPLAB X IDE v3.45 xc8 v1.38

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +1

      +Gray Fox which PIC are you using?

    • @birdiesaura768
      @birdiesaura768 6 ปีที่แล้ว +1

      PIC 18f45k20

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +1

      +Gray Fox why not use MCC as explained in this video: th-cam.com/video/4WaB_Lj8FnY/w-d-xo.html Microchip is phasing out The peripheral libraries .
      MCC is easy to use and supports new devices.

  • @josafathdominguez8410
    @josafathdominguez8410 6 ปีที่แล้ว +1

    what simulation software is the one hes using?

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +3

      The name of the simulation software is: Proteus.
      It's from www.labcenter.com

  • @bashiralao9172
    @bashiralao9172 6 ปีที่แล้ว +1

    Please can i get any hints on how to read multiple ADC? Thanks

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +1

      Hi. You can sample multiple channels in a loop. Read this article there's an example to read 3 ADC channels: www.studentcompanion.co.za/analog-to-digital-converter-in-pic-microcontroller-xc8/

    • @bashiralao9172
      @bashiralao9172 6 ปีที่แล้ว +1

      really helpful thanks

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +1

      You are welcome!

    • @bashiralao9172
      @bashiralao9172 6 ปีที่แล้ว +1

      Need more help sir. I have sampled the multiple ADC channels base on your example but i couldn't get their results separately.
      How do i get them seperated?

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +1

      How are you sampling them? Because in that example we sampled them individually.

  • @jayeshkumarpr6219
    @jayeshkumarpr6219 6 ปีที่แล้ว +1

    hi. sir, what changes need to be done if i use pic18f248.i used the same code .but its shows error

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +1

      +Jayesh kumar p r what errors? You must post your code and all your error messages

    • @jayeshkumarpr6219
      @jayeshkumarpr6219 6 ปีที่แล้ว +1

      #define _XTAL_FREQ 16000000
      #include
      #include
      void init_XLCD(void); //Initialize LCD display
      void DelayFor18TCY( void ); //18 cycles delay
      void DelayPORXLCD (void); // Delay of 15ms
      void DelayXLCD (void); // Delay of 5ms
      void main(void)
      {
      init_XLCD(); //Call the Initialize LCD display function
      putrsXLCD("Hello World"); //Display "Hello World"
      SetDDRamAddr(0x40); //shift cursor to beginning of second line
      putrsXLCD("LCD Display"); //Display "LCD display"
      while(1)
      {
      }
      }
      void init_XLCD(void) //Initialize LCD display
      { OpenXLCD(FOUR_BIT&LINES_5X7); //configure LCD in 4-bit Data Interface mode
      //and 5x7 characters, multiple line display
      while(BusyXLCD()); //Check if the LCD controller is not busy
      //before writing some commands?
      WriteCmdXLCD(0x06); // move cursor right, don’t shift display
      WriteCmdXLCD(0x0C); //turn display on without cursor
      }
      void DelayFor18TCY( void ) //18 cycles delay
      {
      Nop( ); Nop( ); Nop( ); Nop( ); // 18 cycle delay
      Nop( ); Nop( ); Nop( ); Nop( );
      Nop( ); Nop( ); Nop( ); Nop( );
      Nop( ); Nop( );
      return;
      }
      void DelayPORXLCD (void) // Delay of 15ms
      {
      Delay1KTCYx(30);
      }
      void DelayXLCD (void) // Delay of 5ms
      {
      Delay1KTCYx(10);
      }

    • @jayeshkumarpr6219
      @jayeshkumarpr6219 6 ปีที่แล้ว +1

      make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
      make[1]: Entering directory 'D:/jayesh/PIC C1/LCD INTERFACE/LCD INTERFACE.X'
      make -f nbproject/Makefile-default.mk dist/default/production/LCD_INTERFACE.X.production.hex
      make[2]: Entering directory 'D:/jayesh/PIC C1/LCD INTERFACE/LCD INTERFACE.X'
      "C:\Program Files\Microchip\xc8\v1.45\bin\xc8.exe" --pass1 --chip=18F248 -Q -G --double=24 --float=24 --emi=wordwrite --opt=+asm,+asmfile,-speed,+space,-debug,-local --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist -DXPRJ_default=default --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-download,+config,+clib,-plib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -obuild/default/production/newmain.p1 newmain.c
      make[2]: *** [build/default/production/newmain.p1] Error 1
      make[1]: *** [.build-conf] Error 2
      make: *** [.build-impl] Error 2
      newmain.c:20: warning: (361) function declared implicit int
      newmain.c:21: warning: (361) function declared implicit int
      newmain.c:28: warning: (361) function declared implicit int
      newmain.c:28: error: (192) undefined identifier "FOUR_BIT"
      newmain.c:28: error: (192) undefined identifier "LINES_5X7"
      newmain.c:30: warning: (361) function declared implicit int
      newmain.c:32: warning: (361) function declared implicit int
      newmain.c:38: warning: (361) function declared implicit int
      newmain.c:47: warning: (361) function declared implicit int
      (908) exit status = 1
      nbproject/Makefile-default.mk:106: recipe for target 'build/default/production/newmain.p1' failed
      make[2]: Leaving directory 'D:/jayesh/PIC C1/LCD INTERFACE/LCD INTERFACE.X'
      nbproject/Makefile-default.mk:90: recipe for target '.build-conf' failed
      make[1]: Leaving directory 'D:/jayesh/PIC C1/LCD INTERFACE/LCD INTERFACE.X'
      nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
      BUILD FAILED (exit value 2, total time: 225ms)

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +1

      +Jayesh kumar p r did you install and linked the peripheral libraries?

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +1

      +Jayesh kumar p r description on how to download and link the peripheral libraries are explained in the beginning of this video: th-cam.com/video/4WaB_Lj8FnY/w-d-xo.html
      Don't forget to follow the peripheral libraries help document as explained in the video to see how many parameters you should use in each function. This might change from one PIC to the other.

  • @immanueltuyoleni836
    @immanueltuyoleni836 4 ปีที่แล้ว

    I have some questions. I hope someone can assist.
    1. Can mikroC be used to write a program of a design with 2 or more analog inputs?
    2. Can the PICs from the 16F family work with two inputs that are required to work at the same time?

    • @StudentCompanion
      @StudentCompanion  4 ปีที่แล้ว

      1. Yes mikroC can.
      2. What do you mean by working at the same time? Can you give an example?

  • @markdomonkos5073
    @markdomonkos5073 7 ปีที่แล้ว +1

    I cant find the docs... :( there isnt in the docs folder.... :(

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +1

      +Márk Domonkos which version of the XC8 compiler are you using?

    • @markdomonkos5073
      @markdomonkos5073 7 ปีที่แล้ว +1

      1.44

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +1

      +Márk Domonkos from vesrion 1.34 the PIC18F peripheral libraries is no longer included in the compiler. You must download it separately and install it into your compiler. It's now called Legacy peripherals libraries. You can download it at the same place as compilers on Microchip website.

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +1

      +Márk Domonkos Microchip is phasing out The peripheral libraries. You can use MCC as explained in this video: th-cam.com/video/4WaB_Lj8FnY/w-d-xo.html

    • @markdomonkos5073
      @markdomonkos5073 7 ปีที่แล้ว +1

      well an is there any peripheral libraries of the 16F series? (anyway thanks for the answer :) )

  • @razvanotea6557
    @razvanotea6557 4 ปีที่แล้ว

    Hello. I need the code for PICF887 ,using Proteus and XC8 compiller. I need the code for dht11 connected at RC0 and the microcontroller is set to work on 20Mhz.Thank you in advance

    • @StudentCompanion
      @StudentCompanion  4 ปีที่แล้ว

      Hi. We can't write the code and the schematic for you, we can't have time to write codes for every requests we receive.
      We can assist you with your own code. Do some research, read the datasheets and start the project yourself, there are plenty of resources online you can refer to.
      If yoi struggle with specific features of the project, or the code doesn't compile ot generate errors or doesn't work 100%, then post those problems here on TH-cam or preferably in the forum on our website because there you can even upload your code. Then we can look at it and do our best to assist

    • @StudentCompanion
      @StudentCompanion  4 ปีที่แล้ว

      But unfortunately we can't write everything for you, that's not what we do, we won't have time for everybody

  • @usmanashraf3199
    @usmanashraf3199 6 ปีที่แล้ว +1

    Hi,
    My Proteus is not running the simulation.I have even downloaded your project.

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +1

      What do you mean it's not running? You must supply more info. Are you getting an error? What are you seing? As you can see from this video, our is working.

    • @usmanashraf3199
      @usmanashraf3199 6 ปีที่แล้ว +1

      It shows Controller recieved data while busy

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +1

      Is that all as error?

    • @usmanashraf3199
      @usmanashraf3199 6 ปีที่แล้ว +1

      yes,If you could give me your email I could sent you my project

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +1

      Upload the error screenshot, full zipped MPLAB and Proteus projects in the Forum: www.studentcompanion.co.za/forums/

  • @mostafaeisa7267
    @mostafaeisa7267 7 ปีที่แล้ว +1

    hello i want to interface pic16f877a with imu i want a help

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +2

      +Mostafa Eisa what is imu?

    • @mostafaeisa7267
      @mostafaeisa7267 7 ปีที่แล้ว +1

      inertial measurent unit 3 accelrometer 3gyro

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +1

      +Mostafa Eisa what errors are you getting?

    • @mostafaeisa7267
      @mostafaeisa7267 7 ปีที่แล้ว +1

      i want to interface pic16f877a with mpu6050and get pitch roll yaw for conrtoling a uav

    • @mostafaeisa7267
      @mostafaeisa7267 7 ปีที่แล้ว +1

      and i want to make simulation on proteus

  • @usmanrahat5254
    @usmanrahat5254 7 ปีที่แล้ว +1

    You have enabled the interrupt but didnt call ISR.

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +1

      Hi. Thanks for your feedback. We didn't use the interrupt in the code, that is why there is no ISR call. We should have switched OFF the ADC INT.

  • @seemabfayyaz7037
    @seemabfayyaz7037 8 ปีที่แล้ว +1

    sir can I get the source code for this

    • @StudentCompanion
      @StudentCompanion  8 ปีที่แล้ว +3

      You can download the source code from this link: www.studentcompanion.net/en/analog-to-digital-converter-in-pic-microcontroller-xc8/

  • @pmarahem
    @pmarahem 2 ปีที่แล้ว

    Website not working

  • @mizsprang5460
    @mizsprang5460 4 ปีที่แล้ว

    Haii..in my project..i want to count paper using ir sensor and display on lcd..so how to write the program...its very simple but i cnnot do this🤣

    • @mizsprang5460
      @mizsprang5460 4 ปีที่แล้ว

      Im also using pic18f45k22

    • @StudentCompanion
      @StudentCompanion  4 ปีที่แล้ว

      What have you done so far?

    • @mizsprang5460
      @mizsprang5460 4 ปีที่แล้ว

      @@StudentCompanion
      i just know how to write an ir sensor program ... and i know how to write a program for display on lcd .... but i don't know how to write a program for it to count and keep show on lcd ..

    • @StudentCompanion
      @StudentCompanion  4 ปีที่แล้ว +1

      Unfortunately you will have to formulate a routine to count depending on how those papers will be counted. You are the only one who knows how your system should work. Once you have a logic, then we might contribute where you get stuck. But we can't do the design for you.

  • @nirindrainyjeraymond6248
    @nirindrainyjeraymond6248 5 ปีที่แล้ว +1

    Hi,