Тёмный

5- Interfacing an LCD Display | MPLAB XC8 for Beginners Tutorial 

StudentCompanion Electronics
Подписаться 22 тыс.
Просмотров 115 тыс.
50% 1

Learn how to use an LCD with PIC microcontroller. You'll learn how to interface an LCD with PIC, send characters, numbers to be displayed, clear the display and position the cursor.
For more info and download project source files: www.studentcom...
Have questions, need assistance or looking for source code? Engage with us and please do not forget to support us with any donation:
Please Donate:www.paypal.com...
Facebook: / studentcompanion
Twitter: / stcompanion
Patreon: / studentcompanion
Forums: www.studentcom...
#ProgrammingMicrocontrollers #MicrocontrollersTutorials #MPLABX #MPLABXC8 #MPLABTutorials #XC8Tutorials #StudentCompanionElectronics #PICmicrocontrollerTutorial #GettingStartedMPLABXC8 #MPLABXC8BeginnersTutorial #LCD #LCDLibrary #InterfacingLCD

Опубликовано:

 

12 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 450   
@StudentCompanion
@StudentCompanion 3 года назад
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 RU-vid algorithm to be found by others. It helps us a lot.
@Fkn1405
@Fkn1405 5 лет назад
Travail bien fait. Thank you so much student companion. i'm a student from Tshwane university of technology and I learn good stuffs from your videos. grand merci!
@StudentCompanion
@StudentCompanion 5 лет назад
Thank you very much for watching our videos and for your feedback. Merci pareillement.
@terry7372
@terry7372 8 лет назад
Thank You for the Tutorials, they have been great. This one will take some time to debug if you are using XC8 1.35, but that is good experience.
@StudentCompanion
@StudentCompanion 8 лет назад
+Terry Child Indeed. From XC8 v1.35, the PIC18F Peripheral Libraries are no longer included which includes the LCD library. You can either install them as a separate download file (in XC8 Compiler downloads page on microchip website, they are now called Legacy Peripheral Libraries) or you can write your own LCD library.
@reasontakethewheel
@reasontakethewheel 6 лет назад
Wow. Fantastic tutorial. Well explained. I needed a refresher as it's been years since I last used an one of these. This hit all of the marks! Thank you, and great work.
@StudentCompanion
@StudentCompanion 6 лет назад
Thank you for your feedback. Please watch this video too to learn how to use the new library as the Peripheral Libraries used in this tutorial the time we recoreded it some few years ago is being phased out in favor of MPLAB Code Configurator: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-4WaB_Lj8FnY.html
@reasontakethewheel
@reasontakethewheel 6 лет назад
@@StudentCompanion wow thanks for the tip. That should save me some time figuring that out. Appreciate you taking the time to give me the heads up!
@StudentCompanion
@StudentCompanion 6 лет назад
You are welcome!
@atsul.7943
@atsul.7943 9 лет назад
Thank you for that tutorial. I am beginner in microcontroller technology but this tutorial opened my eyes further.
@StudentCompanion
@StudentCompanion 9 лет назад
Thank you LEWIS ASILEVI
@anokhautomation4453
@anokhautomation4453 2 года назад
It was very useful tutorial 👍 thanks for your detailed demonstration 🙏
@ricardoam5876
@ricardoam5876 9 лет назад
Thanks for the totorials, they are awesome, geetings from mexico.
@StudentCompanion
@StudentCompanion 9 лет назад
Thanks. we appreciate your feedback.
@sivadass2483
@sivadass2483 9 лет назад
Great tutorial please make more videos like gsm,Ethernet,RFID etc
@StudentCompanion
@StudentCompanion 9 лет назад
Thanks Siva Dass for watching our videos. We are busy recording and soon you'll definitely watch those videos. If you haven't subscribed to this YouTuve Channel, please do so to be notified of new Videos as they are uploaded. Thanks for your suggestions. At the moment you can still find more tutorials at our website like these: Interfacing GSM Modem: www.studentcompanion.co.za/post/Interfacing-GSM-Modem-with-PIC-Microcontroller-XC8 Ethernet Communication with PIC Microcontroller: www.studentcompanion.co.za/post/Ethernet-Communication-with-PIC-Microcontroller Web-base control and monitoring: www.studentcompanion.co.za/post/Web-Based-Control-and-Monitoring-with-PIC-Microcontroller-MikroC and many more!
@sivadass2483
@sivadass2483 9 лет назад
StudentCompanionSA Thank u and i'm waiting for your tutorials
@StudentCompanion
@StudentCompanion 9 лет назад
Great!
@muhammadfaisalgulzar
@muhammadfaisalgulzar Год назад
very nice tutorial but i have an error on putrsXLCD i am using xc8 compiler version 2.10 and mplabx v5.6 , can you help me . Have any change in header file.
@shuhaibska
@shuhaibska 8 лет назад
Sir, May i know please what are DelayFor18TCY, DelayPORXLCD and DelayXLCD? Where we used these delay in program? We didn't call these function in Main Program. In our circuit RS and E we connected to RB5 and RB6. But we didn't mention anything about where we are Applying High to these PIN. If we are choosing different PIN where should have to change in our Program.
@StudentCompanion
@StudentCompanion 8 лет назад
+Shuhaib K.A. Hi, The delays DelayFor18TCY, DelayPORXLCD and DelayXLCD are used by the OpenXLCD() and other LCD functions. You don't call them in your main program, but they are used by the OpenXLCD() to initialize the LCD according to its datasheet. Some delays are required when switching ON the lcd and when some other commands are performed. We didn't specify where you connect the pins RS and E because we used the default connections which is defined in the xlcd.h file. By default the RS and E should be connected to pins RB5 and RB4. If you need to change the default connections, you'll have to modify this xlcd.h file. Watch our tutorial 17 to learn how to connect your LCD to any PORT or to different pins: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-RkDN2GW_SxU.html There is also a simpler LCD library you can use, it does not have all those delays and it has only 2 files, you can learn more from our website: www.studentcompanion.co.za/interfacing-lcd-display-with-pic-microcontroller-xc8/
@shuhaibska
@shuhaibska 8 лет назад
+StudentCompanionSA Thank you sir.
@StudentCompanion
@StudentCompanion 8 лет назад
Shuhaib K.A. You are welcome!
@nadavba4936
@nadavba4936 5 лет назад
you are the king!
@StudentCompanion
@StudentCompanion 5 лет назад
Thanks for watching our videos and for your feedback.
@aqeelahmed1981
@aqeelahmed1981 8 лет назад
Is there any need of extra circuit means pull up resistor or any other component when this circuit is implemented on PCB.Because my circuit work well on Bread board but it gives default value when implemented on PCB.
@StudentCompanion
@StudentCompanion 8 лет назад
+Aqeel Ahmed HI. If it works well on breadboard then it should work very well on PCB. There must be something else you are not doing well or omitting on PCB
@markov4119
@markov4119 8 месяцев назад
I always come back here to revive my passion for PICs microcontroller, your videos are a fantastic legacy for us. I'm using PIC16F/627/628/648/877 and none of them is working with your code, my question is, is there a library for LCD for PIC16F similar to what you're using? Merci pour votre reponse.
@solomonkojah2378
@solomonkojah2378 8 лет назад
I have followed the tutorial but the code such as putrsXLCD are not identified... so an error make[2] error
@StudentCompanion
@StudentCompanion 8 лет назад
+Solomon Kojah did you watch those 2 videos? What is the version of your compiler?
@keshenanaidu7160
@keshenanaidu7160 10 лет назад
Great tutorial! Thanks. Keep it.
@navendushekhar9811
@navendushekhar9811 8 лет назад
sir, you have not use delay in program.then why you make the delay functions
@StudentCompanion
@StudentCompanion 8 лет назад
+NAVENDU SHEKHAR they are used by the xlcd.h library.
@jaguarpaw1638
@jaguarpaw1638 8 лет назад
I cannot get this working I am using the pic16f690 and using the following connections I am programing with the pickit3 I have meade the following changes #define _XTAL_FREQ 8000000#define RS RC0 #define EN RC1 #define D4 RC2 #define D5 RC3 #define D6 RC4 #define D7 RC5 // BEGIN CONFIG#pragma config FOSC = INTRCCLK // Oscillator Selection bits (INTOSC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN) #pragma config WDTE = OFF // Watchdog Timer Enable bit (WDT disabled and can be enabled by SWDTEN bit of the WDTCON register) #pragma config PWRTE = OFF // Power-up Timer Enable bit (PWRT disabled) #pragma config MCLRE = ON // MCLR Pin Function Select bit (MCLR pin function is MCLR) #pragma config CP = OFF // Code Protection bit (Program memory code protection is disabled) #pragma config CPD = OFF // Data Code Protection bit (Data memory code protection is disabled) #pragma config BOREN = ON // Brown-out Reset Selection bits (BOR enabled) #pragma config IESO = ON // Internal External Switchover bit (Internal External Switchover mode is enabled) #pragma config FCMEN = ON I am so lost with this it just will not work
@StudentCompanion
@StudentCompanion 8 лет назад
+Jaguar paw hi. You can't use this library with PIC16F series. This library works only with PIC18F series. Use the library we used in tutorial 22: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-4WaB_Lj8FnY.html
@ngocbaopham8127
@ngocbaopham8127 9 лет назад
Thank you very much.
@StudentCompanion
@StudentCompanion 9 лет назад
You are Welcome!
@serdarozbek6783
@serdarozbek6783 8 лет назад
sir, thanks for this step by step explanation. i performed same code but my compiler gives an error on Delay1KTCYx(30); command it gives error newmain.c:31: warning: (361) function declared implicit int i could not understand the reason of this error
@StudentCompanion
@StudentCompanion 8 лет назад
They must be something you are missing out. Which version of the compiler you are using?
@rjakhil6362
@rjakhil6362 8 лет назад
thanks for your valuble response . so i should add lcd libraries...... . but where the delay functions are called in main pgm ???????//
@StudentCompanion
@StudentCompanion 8 лет назад
+Akhil Mohanrj Yes you will have to add the lcd libraries. If you watch the full video, you'll see the lcd delay functions.
@sagarwaikar3982
@sagarwaikar3982 4 года назад
Sir, I typed the code but there is error as putrsXLCD,Delay1KTCYx,etc functions are not declared I also install the peripheral libraries But I didn't found option in X IDE v5.35 to add this Libraries And also the port pin declaration used for Proteus simulation is not there Then how this code work on Proteus
@StudentCompanion
@StudentCompanion 4 года назад
Hi. Which PIC are you using? What is the version of your XC8 compiler? Please note from XC8 v2.0 the peripheral libraries are no longer supported, even if you install them they won't work. Either download an older XC8 compiler or use MCC. Watch this video to learn more: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-4WaB_Lj8FnY.html
@manuelsepulveda1746
@manuelsepulveda1746 7 лет назад
My program compiles successfully, but I get " function DelayXLCD is never called". Do you know exactly where this function is called in the program. I do not see it in the openxlcd source file.
@StudentCompanion
@StudentCompanion 7 лет назад
Hi. If you remove it I am sure it won't compile again. DelayXLCD is used in xlcd.h header file. Almost at the bottom of the file, you'll see: extern void DelayXLCD(void); If you navigate to declaration/definition of OpenXLCD, it will take you to xlcd.h header file.
@shuhaibska
@shuhaibska 8 лет назад
Thanks you. In my Software it will take 15 Sec delay to display after Run the simulation. How can i reduce this delay?
@StudentCompanion
@StudentCompanion 8 лет назад
they might be many reasons. if this delay is only noticeable when you start your simulation and everything goes smoothly thereafter, it might be that your PC is slow as Proteus requires some resources from your PC. If you download the code into the actual PIC, you won't see that delay we believe.
@shuhaibska
@shuhaibska 8 лет назад
+StudentCompanionSA thanks for your replay sir.
@StudentCompanion
@StudentCompanion 8 лет назад
+Shuhaib K.A. you are welcome!
@MattyJ66
@MattyJ66 8 лет назад
Great Vid. Thank you
@StudentCompanion
@StudentCompanion 8 лет назад
thank you
@FloppyEmulatorPicF
@FloppyEmulatorPicF 4 года назад
very good
@enriquebenalcazarp
@enriquebenalcazarp 8 лет назад
my friend.. do you have any tutorial with CAN communication??
@StudentCompanion
@StudentCompanion 8 лет назад
not at the moment.
@enriquebenalcazarp
@enriquebenalcazarp 8 лет назад
thanks for the answer :)
@StudentCompanion
@StudentCompanion 8 лет назад
+Enrique Benalcázar you are welcome!
@puneethsangepu6960
@puneethsangepu6960 5 лет назад
Sir I am not getting mplab code configurator in my pc. It is stating that some library files are missing?
@StudentCompanion
@StudentCompanion 5 лет назад
You must install MPLAB Code Configurator first before you can use it. Watch this video first to learn how to install it: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-JxSSVtTj_fA.html
@solomonkojah2378
@solomonkojah2378 8 лет назад
i have an issue with the code. the same code as in the tutorials. just below init_xlcd . i can t compile ,
@StudentCompanion
@StudentCompanion 8 лет назад
+Solomon Kojah what is the version of your compiler?
@StudentCompanion
@StudentCompanion 8 лет назад
watch this tutorial: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-JxSSVtTj_fA.html then this one: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-4WaB_Lj8FnY.html
@solomonkojah2378
@solomonkojah2378 8 лет назад
mplab x 3.40 xc8 v1.38
@solomonkojah2378
@solomonkojah2378 8 лет назад
let me watch the second one then get to you. regards
@StudentCompanion
@StudentCompanion 8 лет назад
+Solomon Kojah sure.
@hossamhassan1221
@hossamhassan1221 10 лет назад
hi please, i tried to initialize the LCD as 4 bit mode by using ( OpenXLCD( FOUR_BIT & LINES_5X7 ); ) but i got error at building by the way i am using pic18f877A thanks in advanc
@StudentCompanion
@StudentCompanion 10 лет назад
Hi Did you include the #include to include the LCD library? what kind of error message you are getting? It's easier to figure out if we can know the kind of errors you are getting.
@hossamhassan1221
@hossamhassan1221 10 лет назад
please could i have your account due to i want some thing to check thanks in advance :)
@StudentCompanion
@StudentCompanion 10 лет назад
Hossam Hassan Hi, I don't understand your question, can you elaborate more? What account? If you want to write to us, please send your mail to: info@studentcompanion.co.za or send us a message on facebook.com/StudentCompanion
@hossamhassan1221
@hossamhassan1221 10 лет назад
thanks for your interest
@lettherebelightfixtures
@lettherebelightfixtures 9 лет назад
Hi, so how do I know which Port to use to connect the PIC to the LCD? Is there a code that I can write to configure that specific port to work with the LCD. And why does the LCD need delays in order for it to work?
@StudentCompanion
@StudentCompanion 9 лет назад
Thapelo Masilo Hi, The default LCD connection is on PORTB using the LCD library, so you don't have to define PORTB. This library is called xlcd.h it define the connections of the LCD. If you want to connect your LCD on a different PORT other than PORTB, then you should modify it accordingly. You can access this xlcd.h file in your XC8 compiler installation folder in this directory: ...Microchip/xc8/v1.34/include/plib Note: v1.34 is your XC8 version. The xlcd.h library needs those delays.
@lettherebelightfixtures
@lettherebelightfixtures 9 лет назад
StudentCompanionSA OK, thanks. And about the delays? Why are they important?
@StudentCompanion
@StudentCompanion 9 лет назад
Thapelo Masilo As we have said it earlier, the LCD Library (xlcd.h) needs those delays to control the LCD. If you don't include them, your code won't work. If you want, you can address the LCD directly without using the LCD Library or you can write your own library but, you'll have to understand the internal working of the LCD.
@lettherebelightfixtures
@lettherebelightfixtures 9 лет назад
StudentCompanionSA Thank you. It worked. I only had to enable the LCD by sending a 1 to the Enable pin. So the main function looks like this void main (void) { LATBbits.LATB4 =1;//I included this command to enable the LCD init_XLCD(); putrsXLCD ("StudentCompanion"); SetDDRamAddr (0x40); putrsXLCD ("LCD Display"); while (1) { } }
@StudentCompanion
@StudentCompanion 9 лет назад
Thapelo Masilo Watch this video to learn how to connect LCD to another PORT beside PORTB: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-RkDN2GW_SxU.html
@nogz00
@nogz00 7 лет назад
Hello. Thanks for the tutorial. I would like to ask you were is the lcd library in MPLAB X v3.45. I´m using XC8 but i can´t find the lcd library. Do I need to download it?.
@StudentCompanion
@StudentCompanion 7 лет назад
+Rodrigo Noriega hi. Thanks for watching our videos. I you talking about the lcd library as in tutorial 22: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-4WaB_Lj8FnY.html
@StudentCompanion
@StudentCompanion 7 лет назад
+Student Companion SA you can download it on our website. But if you are talking about this tutorial 5, it's PIC18F peripherals libraries. From xc8 compiler version 1.35 and later you have to download it separately. Watch tutorial 22 to see where to download it and activate it
@JOAGOSTINI
@JOAGOSTINI 7 лет назад
OK. I tried to compile the code in this class. Downloaded the library lcd and lcd, I used the include, put the two files in the project, but the only thing I can to build is the message: LCD h:46: error: (141) can't open include file ' mcc_generated_files/mcc. h ": No such file or directory make [2]: *** [build/default/production/lcd. p1] Error 1 What remains to be done? Thank you very much for your attention.
@StudentCompanion
@StudentCompanion 7 лет назад
+Joao Carlos Agostini hi. Are you talking about this tutorial: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-JxSSVtTj_fA.html ? This is the tutorial and the process to follow if you are using MCC. On this video, MCC and thise two library files lcd.c and lcd.h were not used but PIC18F peripherals libraries.
@JOAGOSTINI
@JOAGOSTINI 7 лет назад
Thanks for replying. t's a long story. I was watching this class, when I noticed that there was a #include "lcd h" in your code. I stopped the video, I walked into your site, I saw the library, downloaded it and installed it. I saw the video of the 22 class for a moment only. I saw this video and I finished that copy your code. I tried to compile and gave problem. Downloaded the Peripheral-libraries ... and tried to install it, but he did not find the Interface because the compiler it's not installed on C:\, but on another hd in H:\, but even directing it to the H: he does not recognize the Interface. So, just be able to "run" this program if I have Peripheral installed?
@StudentCompanion
@StudentCompanion 7 лет назад
+Joao Carlos Agostini yes if you install the peripherals libraries you can run this program. Before the peripherals libraries used yo be included into XC8 compiler but from version 1.35 and later you'll have yo download them separately and they are now called Legacy libraries. They won't be updated anymore and might not support new PIC because Microchip wants people to use ghe new MCC.
@StudentCompanion
@StudentCompanion 7 лет назад
+Joao Carlos Agostini if you haven't used MCC (Mplab code configurator) before, it's easy : ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-JxSSVtTj_fA.html
@JOAGOSTINI
@JOAGOSTINI 7 лет назад
OK. Thanks a lot. I will try to use MCC. I don't wish to change the settings on my PC because of this program ...Peripherals. You are doing a great job.
@mostani1994
@mostani1994 7 лет назад
THANKS A LOT !
@StudentCompanion
@StudentCompanion 7 лет назад
+rohit singh you are welcome!
@dangtrungnam2809
@dangtrungnam2809 9 лет назад
Thank you very much for your tutorial. It's really useful. But I don't understand why the frequency is 8Mhz so the instruction cycle time is 1.5us. Can you help me understand that.
@StudentCompanion
@StudentCompanion 9 лет назад
Hi Bi Na with a clock of 8MHz, the instruction time will be 0.5μs not 1.5μs. In PIC microcontrollers, an instruction cycle takes four clock periods, the microcontroller actually operates at a clock rate, which is a quarter of the actual oscillator frequency. For example, in a PIC microcontroller operating at 4-MHz clock, the instruction cycle time is only 1 μs (frequency of 1 MHz). For 8MHz, the time will be 0.5μs
@dangtrungnam2809
@dangtrungnam2809 9 лет назад
StudentCompanionSA Thank you very much, I fully understand of that but in the DelayFor18TCY, which you want to delay 18 cycle but I just see 14 Nop(). I don't understand of that.
@StudentCompanion
@StudentCompanion 9 лет назад
Bi Na You can use the normal delay function or use the nop() function to generate the delay as we explained in the video. if you follow well the video you will understand.
@dbrezzy4957
@dbrezzy4957 7 лет назад
why does it highlight those codes , cause it does same with mine and doesn't allow the code to be compiled it shows error all the time, please any explanation to that or probably a solution?
@StudentCompanion
@StudentCompanion 7 лет назад
+Temitayo Abel which codes you are referring to? What error messages you are getting when you build your project?
@dbrezzy4957
@dbrezzy4957 7 лет назад
your above code... and these are the errors it shows.... "C:\Program Files (x86)\Microchip\xc8\v1.41\bin\xc8.exe" --pass1 --chip=18F2220 -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/lcd.p1 lcd.c lcd.c:23: warning: (361) function declared implicit int lcd.c:24: warning: (361) function declared implicit int lcd.c:25: warning: (361) function declared implicit int lcd.c:34: warning: (361) function declared implicit int lcd.c:34: error: (192) undefined identifier "FOUR_BIT" lcd.c:34: error: (192) undefined identifier "LINES_5X7" lcd.c:35: warning: (361) function declared implicit int lcd.c:36: warning: (361) function declared implicit int lcd.c:49: warning: (361) function declared implicit int lcd.c:53: warning: (361) function declared implicit int (908) exit status = 1 nbproject/Makefile-default.mk:100: recipe for target 'build/default/production/lcd.p1' failed make[2]: Leaving directory 'C:/Users/Lekan/MPLABXProjects/lcd.X' make[2]: *** [build/default/production/lcd.p1] Error 1 make[1]: *** [.build-conf] Error 2 nbproject/Makefile-default.mk:84: recipe for target '.build-conf' failed make[1]: Leaving directory 'C:/Users/Lekan/MPLABXProjects/lcd.X' make: *** [.build-impl] Error 2 nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed BUILD FAILED (exit value 2, total time: 8s)
@StudentCompanion
@StudentCompanion 7 лет назад
+Temitayo Abel The problem is because you are using XC8 version 1.41. From version 0.45 XC8 compiler does not include the PIC18F peripherals libraries which contains the lcd library. You need to download this library separately and install it into your compiler. They are now called Legacy libraries. Watch this video to learn more: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-4WaB_Lj8FnY.html
@LetoausmGhetto
@LetoausmGhetto 7 лет назад
I watched the video now 5 times but cannot see what my misstake is. I have got the following problem: When compiling an error occurs.... it says: DelayFor18TCY and DelayXLCD are never called it also says conversion to a shorter data type and refers to the OpenXLCD line Thank you in advance
@StudentCompanion
@StudentCompanion 7 лет назад
+Leto ausm Ghetto what PIC Microcontroller are you using? What version of your XC8 compiler are you using?
@LetoausmGhetto
@LetoausmGhetto 7 лет назад
I already found my misstake I missspelled DelayFor18TCY P.S.: Your videos are very helpful for learning to programm thank you
@StudentCompanion
@StudentCompanion 7 лет назад
Thank you. We are also pleased that you have resolved it.
@tiwar87
@tiwar87 9 лет назад
Thanks for the Video.. How much you can write on XC8 Demo Version? im afraid to beggin in this compiler C of Microchip because if my skills improve in time i wont have money to purchase the professional version, so do you think is better to program in CCS or Mikrotik instead a pay program compiler like XC8?
@StudentCompanion
@StudentCompanion 9 лет назад
tiwar87 , there is no code limit on the XC8 demo version, you can write a code as big as you want, the only difference is the optimization of the generated code, with free version, there is no optimization so the generated HEX file might be a little bigger than if you used a professional version. Depending on other compilers, it's up to you. You can try them and decide yourself, but you must remember that the XC8 is the manufacture compiler with a wide range of application libraries.
@tiwar87
@tiwar87 9 лет назад
StudentCompanionSA Thnks for the info and advices Sir. Very useful, thnks a lot
@StudentCompanion
@StudentCompanion 9 лет назад
You are welcome!
@StudentCompanion
@StudentCompanion 9 лет назад
You are welcome!
@zahidfaheem3233
@zahidfaheem3233 6 лет назад
if our compiler version is new and we download the peripheral library, then do we have to use MPLAB Code Configurator or will it work with normal mplab ide? cause i watched video 22, downloaded and installed the peripheral libraries, added the lcd_libraries and all and even the red underlines all disappeared but it still gives error 2 when i build it. is it because i'm not using MPLAB Code Configurator?
@StudentCompanion
@StudentCompanion 6 лет назад
Did you link the peripheral libraries as explained in video 22?
@zahidfaheem3233
@zahidfaheem3233 6 лет назад
Student Companion yep did that too :/
@StudentCompanion
@StudentCompanion 6 лет назад
What are those 2 errors? Can you post your project in the forum? We will build your project and see if we can recreate those errors. Forum: www.studentcompanion.co.za/forums/
@actyon20
@actyon20 5 лет назад
Greetings, ( please don't get mad if I ask this type of question. I am genuinely interested to learn and your videos were amazing helpfully ! ) For some reason I keep having this errors: Lectia5main.c:36:15: error: use of undeclared identifier 'FOUR_BIT' OpenXLCD( FOUR_BIT & LINES_5X7 ); ^ Lectia5main.c:36:26: error: use of undeclared identifier 'LINES_5X7' OpenXLCD( FOUR_BIT & LINES_5X7 ); -and I have no idea why...In a previous attempt I had a similar error with OSSCON. The funny thing was when I typed OSSCON it gave me undeclared identifier but when I copy and paste the same word from a working program , it stopped saying undeclared identifier.- I know that this is a long shot and I could have done many things wrong but I am starring for 4 hours at this code and I have no idea what is wrong...Do you have an explanation? My entire code is the following: #include #include #include "Lectia5h.h" void init_XLCD (void); void DelayFor18TCY (void); void DelayPORXLCD(void); void DelayXLCD(void); void main (void) { init_XLCD(); putrsXLCD("Vai de viata mea"); SetDDRamAddr ( 0x40); putrsXLCD("Alba neagra"); while(1) { } } void init_XLCD (void) { OpenXLCD( FOUR_BIT & LINES_5X7 ); while(BusyXLCD()); // verifica daca e busy, ai grija la punct si virgula ! ( iti dai seama tu )) WriteCmdXLCD(0x06); WriteCmdXLCD(0x0C); } void DelayFor18TCY (void) { Nop();Nop();Nop();Nop(); Nop();Nop();Nop();Nop(); Nop();Nop();Nop();Nop(); Nop();Nop(); return; } void DelayPORXLCD(void) { Delay1KTCYx(30); //cauta cu help "delays' } void DelayXLCD(void) { Delay1KTCYx(10); }
@StudentCompanion
@StudentCompanion 5 лет назад
Which PIC model are you using? What is the version of your MPLAB X IDE and the XC8 compiler you are using?
@actyon20
@actyon20 5 лет назад
@@StudentCompanion Greetings sir. Thank you for your answer in such a short amount of time. I am using: MPLAB X IDE v5.10 Compiler is XC8 (v2.05)
@StudentCompanion
@StudentCompanion 5 лет назад
​@@actyon20 Hi. I have seen your video. The problem you don't have the library installed into your compiler to use LCD functions. This library is called PIC18F Peripheral library or simply plib. It has library files for most peripherals including the xlcd.h file that you couldn't include in your project. Because this tutorial is a bit too old, before in earlier versions of XC8 compilers up to version 1.34, this library was included by default whenever you install XC8 compiler. But from XC8 v1.35 this library has to be downloaded separately from Microchip website and installed into the compiler directory, because Microchip is phasing out this library in favor of the new MPLAB Code Configurator or MCC. But after Microchip released XC8 v2.x.x, this library is no longer supported at all, you can't even install it separately, you can either try to install an old version of XC8 compiler, any version before v2.xx or ignore it all together and start using the new MCC, or not use libraries at all, but this will require advanced knowledge of PIC registries and understand the LCD controller datasheet. This video gives you an introduction to MCC: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-JxSSVtTj_fA.html And this video shows you how to control an LCD without using the Peripheral library, I will recommend to try this way: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-4WaB_Lj8FnY.html Please note if you use MCC, use an newer PIC model as MCC doesn't support older PIC models at the moment.
@actyon20
@actyon20 5 лет назад
@@StudentCompanion I managed to install the additional library but now I am getting the following error: newmain.c:41:: warning: (520) function "_DelayFor18TCY" is never called newmain.c:50:: warning: (520) function "_DelayPORXLCD" is never called newmain.c:55:: warning: (520) function "_DelayXLCD" is never called :0:: error: (500) undefined symbols: _SetDDRamAddr(dist/default/production\tesstttt.X.production.o) _WriteCmdXLCD(dist/default/production\tesstttt.X.production.o) _putrsXLCD(dist/default/production\tesstttt.X.production.o) _OpenXLCD(dist/default/production\tesstttt.X.production.o) _BusyXLCD(dist/default/production\tesstttt.X.production.o) (908) exit status = 1 My guessing is that you called the delay functions in the header file. Do you by any chance have the file? because the link that you posted to download the "project source files" doesn't work anymore. Or maybe you can paste the code? :) again , thank you very much for the help.
@StudentCompanion
@StudentCompanion 5 лет назад
When you say you installed the additional library, which library did you install? If you are talking about the peripheral libraries as I explained to you earlier on even if you install this library, it wont work if you using latest XC8 compiler v2.x.x. either you install an older version.
@twitttertsai5228
@twitttertsai5228 Год назад
Very useful
@NurzulHealme
@NurzulHealme 9 лет назад
Hallo Sir.. Thank for the tutorial.. Where statement to define port B .. and how to choose other PORT.. TQ
@StudentCompanion
@StudentCompanion 9 лет назад
Nurzul Healme Hi, The default LCD connection is on PORTB using the LCD library, so you don't have to define PORTB. This library is called xlcd.h it define the connections of the LCD. If you want to connect your LCD on a different PORT other than PORTB, then you should modify it accordingly. You can access this xlcd.h file in your XC8 compiler installation folder in this directory: ...Microchip/xc8/v1.34/include/plib Note: v1.34 is your XC8 version
@NurzulHealme
@NurzulHealme 9 лет назад
Ok ..Thank for quick reply . :)
@StudentCompanion
@StudentCompanion 9 лет назад
Nurzul Healme you are welcome!
@StudentCompanion
@StudentCompanion 9 лет назад
Nurzul Healme Watch this video to learn how to connect LCD to another PORT beside PORTB: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-RkDN2GW_SxU.html
@NurzulHealme
@NurzulHealme 9 лет назад
Thank man.. :).. i try this .
@solomonkojah2378
@solomonkojah2378 8 лет назад
does mplab need lcd libraries to recognize the code
@StudentCompanion
@StudentCompanion 8 лет назад
+Solomon Kojah yes.
@cyberking28
@cyberking28 4 года назад
Cannot find lcd function description under the help in mplab 5.4.was function description removed?
@StudentCompanion
@StudentCompanion 4 года назад
It's probably about the XC8 compiler not MPLAB X IDE. What's the PIC and the XC8 version you are using? Newer versions of XC8 don't include the PIC18F peripherals libraries anymore, depending on your version, you might have to install it manually first or use an older supported compiler because from XC8 v2.00 and above it's no longer supported at all. Watch this video to learn more: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-4WaB_Lj8FnY.html
@cyberking28
@cyberking28 4 года назад
@@StudentCompanion I'm using pic18f2220 and version 2.20 of XC8
@StudentCompanion
@StudentCompanion 4 года назад
You can't use the PIC18F peripherals libraries with XC8 v2.20. Either install an older version before v2.0 then install the Peripherals Libraries now called legacy peripherals libraries or install the oldest supported version XC v1.34 it will work without installing anything else. Or use v2.20 and a different library like the one shown in the video we shared with you.
@cyberking28
@cyberking28 4 года назад
@@StudentCompanion alright thanks
@StudentCompanion
@StudentCompanion 4 года назад
You are welcome!
@rjakhil6362
@rjakhil6362 8 лет назад
how to assign pin pins of MC to LCD
@StudentCompanion
@StudentCompanion 8 лет назад
watch our tutorial 17. you'll learn how to do it.
@piyushsingh1985
@piyushsingh1985 7 лет назад
Sir the videos are excellent, but I don't know anything about Proteus for simulation. You are using Proteus 8 professional for simulation and i can only download Proteus 8 demo
@StudentCompanion
@StudentCompanion 7 лет назад
+piyush singh you must buy the professional version
@aasimzia9781
@aasimzia9781 8 лет назад
I have xc8 1.30. I think it has peripheral libraries in it?. I checked it with the pic that ur using but still same error.
@StudentCompanion
@StudentCompanion 8 лет назад
are you referring to Mplab ide version or xc8?
@aasimzia9781
@aasimzia9781 8 лет назад
+Student Companion SA referring to compiler. I am using mplab idea 2.05.
@StudentCompanion
@StudentCompanion 8 лет назад
+Aay zee then I guess it shouldn't be the problem with peripherals libraries. send us the screen shot of your errors so we can have a look at them
@aasimzia9781
@aasimzia9781 8 лет назад
+Student Companion SA wait
@huntex8736
@huntex8736 3 года назад
Hello Sir, where can i download the Lcd libraries so that this example would work?
@StudentCompanion
@StudentCompanion 3 года назад
Hi. Which PIC are you using? What is the version of your xc8 compiler?
@huntex8736
@huntex8736 3 года назад
@@StudentCompanion PIC18F26K20 (the same in this video) xc8 compiler is v2.10
@StudentCompanion
@StudentCompanion 3 года назад
Unfortunately you can't use the PIC18F peripherals libraries that was used in this video with new versions of XC8 compiler from v2.x.x. You will have to use an older version for it to work or use a different library. Watch this video we explained you can overcome that problem: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-4WaB_Lj8FnY.html
@unrmaestro
@unrmaestro 5 лет назад
i didnot understand the concept of "LCD.h" header file do we download this file or it comes with the compiler and al we need to do is specify it ? by wrting #include
@StudentCompanion
@StudentCompanion 5 лет назад
It used to come with the compiler with the PIC18F peripheral libraries. A set of libraries for PIC18F series peripherals like SPI, ADC, I2C etc. Now this library has been discontinued in favour of MPLAB Code Configurator.
@StudentCompanion
@StudentCompanion 5 лет назад
Watch this video to understand more: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-JxSSVtTj_fA.html
@StudentCompanion
@StudentCompanion 5 лет назад
And this video for LCD using new tools and library: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-4WaB_Lj8FnY.html
@unrmaestro
@unrmaestro 5 лет назад
@@StudentCompanion ty so much u are the best
@StudentCompanion
@StudentCompanion 5 лет назад
Thanks for your feedback.
@sarahnidia3053
@sarahnidia3053 6 лет назад
If am I using the peripheral libraries for pic18f I need to put the archives 'delay.h' and 'xlcd.h' on headers files? And always I change the 'ROM Ranges' on 'memory model' in the 'xc8 linker' on the program for 010-7FF, Orders by teacher, but If i put the '010-7ff' appears a error : "Delay... Is never called' why this happens? Thank u for ur attention
@StudentCompanion
@StudentCompanion 6 лет назад
Hi. Are you getting errors or warnings?
@sarahnidia3053
@sarahnidia3053 6 лет назад
Student Companion "main.c: 121: warning: (520) function" _DelayXLCD "is never called : 0: error: (500) undefined symbols: __mediumconst (dist / default / production \ test.X.production.obj) __smallconst (dist / default / production \ teste.X.production.obj) make [2]: *** [dist / default / production / teste.X.production.hex] Error 1 make [1]: *** [.build-conf] Error 2 make: *** [.build-impl] Error 2 (908) exit status = 1 nbproject / Makefile-default.mk: 131: recipe for target 'dist / default / production / teste.X.production.hex' failed make [2]: Leaving directory 'C: /Users/SARAH/Desktop//PROJECTS/teste.X' nbproject / Makefile-default.mk: 90: recipe for target '.build-conf' failed make [1]: Leaving directory 'C: /Users/SARAH/PROJECTS/teste.X' nbproject / Makefile-impl.mk: 39: recipe for target '.build-impl' failed BUILD FAILED (exit value 2, total time: 2s) " This message appears, but only when I put "010-7ff" in "properties-> xc8 linker -> memory model-> ROM RANGES" if I do not put such a parameter (010-7ff "compiles normally. put such thing so as not to erase the bootloader. and a question, if I am linking the "peripheral libraries" do I need to put the "xlcd.h" and "delays.h" files in the "header files"?
@StudentCompanion
@StudentCompanion 6 лет назад
I am not sure about the "010-7ff". If you link the peripheral libraries, there is no need to include "xlcd.h" and "delay.h". The code will still compile without errors. But if you use an lcd on a different PORT beside the default PORTB, you'll have to recompile the lcd library files.
@sarahnidia3053
@sarahnidia3053 6 лет назад
Student Companion thanks
@StudentCompanion
@StudentCompanion 6 лет назад
You are welcome!
@KubuntuYou
@KubuntuYou 9 лет назад
I'm having a heck of a time implementing I2C with a 16F1508. I've tried so many different things with no luck. I considered moving to PIC18 family but plib is not installed on my system. I have no plib folder in include and there is no documentation for it in the docs folder. I don't suppose you'd consider doing an I2C tutorial for the PIC16 family would you?
@StudentCompanion
@StudentCompanion 9 лет назад
hi. if you are considering PIC18 it ia very easy to implement especially if you using the library. They have to be a library help document unless you are looking on a wrong installation folder. check our tutorial 6 (ADC) or 14 (rs232) to learn how to using the library help document. we have an I2C tutorial on our website. check for it on www.studentcompanion.co.za
@KubuntuYou
@KubuntuYou 9 лет назад
I've looked in every folder relating to XC8 and MPLABX. There's no mention of plib anywhere. :/
@StudentCompanion
@StudentCompanion 9 лет назад
+KubuntuYou The library help file is called: MPLAB_XC8_Peripheral_Libraries and is located in the docs folder in XC8 installation folder. It is not in lib folder. Check out this tutorial, we clearly show you where to find it and how to use this document: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-8dDOp2pPm6c.html
@KubuntuYou
@KubuntuYou 9 лет назад
+StudentCompanionSA www.dropbox.com/s/pkmovudkxcmh0wr/docs.png?dl=0 This is a screenshot of my docs folder. There are only 3 PDFs in there and nothing about Peripheral Libraries. Were they supposed to be installed when I installed XC8 or do I need to install XC18 or something else to get them? I appreciate the help.
@KubuntuYou
@KubuntuYou 9 лет назад
+StudentCompanionSA I found the legacy peripheral libraries installer for download from microchip. They seem to be working now but i won't be sure until i have a chip to test with.
@suaibislam2923
@suaibislam2923 6 лет назад
Sir, you've used XLCD.h libraries but you've included lcd.h, I didn't get the point.
@StudentCompanion
@StudentCompanion 6 лет назад
The lcd.h file is the configuration bits header file. It's not the lcd library file. We could have named it any name it wouldn't make a difference. Please watch our tutorial 1 to understand about configuration bits: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-mUofSucHx_E.html
@suaibislam2923
@suaibislam2923 6 лет назад
Ok, I thought so. Then how you used those library without including xlcd.h?
@StudentCompanion
@StudentCompanion 6 лет назад
If you have installed the PIC18F peripheral libraries, there is no need to explicitly include the xlcd.h .
@zahidfaheem3233
@zahidfaheem3233 6 лет назад
if we were going to write a function with 14 Nop()s then what's the meaning of DelayFor18TCY? i mean we wrote a function, we can name it anything we want can't we? shouldn't that delay code make our life easier?
@StudentCompanion
@StudentCompanion 6 лет назад
I guess you can but the problem this DelayFor18TCY is used by many other other functions. So renaming it will affect other functions that will need it.
@StudentCompanion
@StudentCompanion 6 лет назад
In programming you are not obliged to stick to what is given to you. These are library functions are there to guide you. You can rewrite them or write your own tk fit your purpose.
@HemangJoshi
@HemangJoshi 10 лет назад
hello uploader, Where is the 4th part of MPLAB XC8 for beginners
@StudentCompanion
@StudentCompanion 10 лет назад
Hi, sorry for that, we had to pull it out to correct some few things. We will upload more this weekend. Thanks for watching.
@StudentCompanion
@StudentCompanion 10 лет назад
Hemang Joshi Here is the 4th part: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-fXgh2oZ3Mmg.html
@StudentCompanion
@StudentCompanion 7 лет назад
+Hemang Joshi this is part 4: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-fXgh2oZ3Mmg.html
@HemangJoshi
@HemangJoshi 7 лет назад
+Student companion Thanx man...
@StudentCompanion
@StudentCompanion 7 лет назад
+Hemang Joshi you are welcome.
@suaibislam2923
@suaibislam2923 6 лет назад
Sir, actually I have previously used Mikroc. When I used lcd_init function I didn't needed to create a function for lcd_init. Here I need to create a function for init_XLCD. That means I can use any name instead of init_XLCD. Then actually what "pic 18 peripheral library" is doing?
@StudentCompanion
@StudentCompanion 6 лет назад
Even with mikroC you have to initialize it witk Lcd_Init()
@suaibislam2923
@suaibislam2923 6 лет назад
Student Companion yes, but I don't need to creat function like 'void lcd_init ()'.
@StudentCompanion
@StudentCompanion 6 лет назад
You are right but this is not like mikroc. The advantages of mikroC it's easy to use with plenty hardware and software libraries. The disadvantages of mikroC is that their libraries are sealed, you can't modify it, you can't extend it and sometimes it restrict your options unlike MPLAB XC8. You can accomplish more once you understand it
@usmanashraf3199
@usmanashraf3199 6 лет назад
Now my program is working like a dream using peripheral libraries, now please tell me how to check against which pins of microcontroller which pin of LCD to connect.
@StudentCompanion
@StudentCompanion 6 лет назад
Good to hear that it's working now. Can you clarify your question?
@usmanashraf3199
@usmanashraf3199 6 лет назад
Its actually how I would know that which pins of Micro-controller are in use.
@StudentCompanion
@StudentCompanion 6 лет назад
The default connection of the lcd is on PORTB. To learn more of individual pins or to connect your lcd to a different PORT, please watch this video: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-RkDN2GW_SxU.html
@usmanashraf3199
@usmanashraf3199 6 лет назад
Thanks!!! you are a legend :p
@StudentCompanion
@StudentCompanion 6 лет назад
You are welcome!
@birdiesaura768
@birdiesaura768 5 лет назад
Hello I am getting an error while compiling the code :0:: error: (499) undefined symbol: _BusyXLCD(dist/default/production\ADC_Test_-1_22-9-18.X.production.o) I have checked in the library to verify that im not doing a syntax error please help me with it
@StudentCompanion
@StudentCompanion 5 лет назад
You didn't specify the PIC used, the compiler version etc.
@birdiesaura768
@birdiesaura768 5 лет назад
@@StudentCompanion I have used pic 18f45k22 And compiler xc8 v.2.00
@StudentCompanion
@StudentCompanion 5 лет назад
The new compiler XC8 v2 doesn't support the peripheral libraries anymore. Either use MPLAB Code Configurator as explained in this video: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-4WaB_Lj8FnY.html or download an earlier version of XC8 v1xx and link in the peripheral libraries.
@birdiesaura768
@birdiesaura768 5 лет назад
@@StudentCompanion what do you recommend among the two? Should I rebuild the project with mcc or an compile with an earlier version of xc8
@StudentCompanion
@StudentCompanion 5 лет назад
Microchip is basically discontinuing the peripheral libraries. It's never advisable to start a new project with an old discontinued tool. You'll face problems in the future. It's still there just to support old existing projects.
@miracleobiano1825
@miracleobiano1825 5 лет назад
Thank for the video, mine is working but the first character in the first row of tell lcd refused to display
@StudentCompanion
@StudentCompanion 5 лет назад
Can you post your code? Are you testing in simulation or hardware?
@miracleobiano1825
@miracleobiano1825 5 лет назад
Am simulating. Here's the code #include #include #include #include "xlcd.h" //#include "delays.h" #define _XTAL_FREQ 8000000 /* * */ int main(void) { void init_XLCD(void); //initialize LCD void DelayFor18TCY(void); //Delay for 18 instruction cycle void DelayPORXLCD(void); //Delay for 15ms void DelayXLCD(void); //Delay for 5ms init_XLCD(); while(BusyXLCD()); SetDDRamAddr(0x00); putrsXLCD("Welcome"); SetDDRamAddr(0x40); putrsXLCD("LCD Display"); //WriteCmdXLCD(0x0C); while(1){ } } void init_XLCD(void){ OpenXLCD( FOUR_BIT & LINES_5X7 ); while(BusyXLCD()); WriteCmdXLCD(0x06); WriteCmdXLCD(0x0F); } void DelayFor18TCY(void){ Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); return; } void DelayPORXLCD(void){ Delay1KTCYx(30); } void DelayXLCD(void){ Delay1KTCYx(10); }
@miracleobiano1825
@miracleobiano1825 5 лет назад
I have tried my best to find the error but I couldn't find it but became worst, this time around it can't display any thing again but the display is ON
@StudentCompanion
@StudentCompanion 5 лет назад
@@miracleobiano1825 Hi, Try to change this function code: void DelayFor18TCY(void){ Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); return; } with: void DelayFor18TCY(void){ Delay10TCYx920); }
@miracleobiano1825
@miracleobiano1825 5 лет назад
It's working now, thank you sir. But my question is why was the previous one not working?
@bharatkumar9048
@bharatkumar9048 2 года назад
From where we have to include "LCD.h" file
@luank8599
@luank8599 Год назад
I also have question like that so by the way can you include that library? Please show me 🙏
@dbrezzy4957
@dbrezzy4957 7 лет назад
please another question... you said if RS is given logic 1, D0-D7 becomes data, and if given logic 0 they become commands and also the E pin must be given 1 to work on LCD. but in the above code didn't specify if RS and E was given 1 or 0 . my question is what gives this RS logic 1 in your code and also the enable (E) pin as well.. because i thought they were going to be specified, please explain.
@StudentCompanion
@StudentCompanion 7 лет назад
+Temitayo Abel that's why you are using lcd libraries. If you open those library files lcd.h and lcd.c you'll see how the commands are executed. All those functions like to initialize lcd or send characters the pins RS, E and data pins are manipulated in the background. You can also control the lcd yourself without a library just the same way you are controlling an LED or you can write your own library then you'll use those pins.
@dbrezzy4957
@dbrezzy4957 7 лет назад
wow! didn't know that.. thanks so much sit!
@StudentCompanion
@StudentCompanion 7 лет назад
+Temitayo Abel you are welcome!
@dbrezzy4957
@dbrezzy4957 7 лет назад
How do i set up my own library?
@StudentCompanion
@StudentCompanion 7 лет назад
+Temitayo Abel depends on what you want to do. It's a bit complex. You need to read your datasheets very well first. I'll suggest you learn the basics first then think of libraries later.
@jayeshkumarpr6219
@jayeshkumarpr6219 6 лет назад
hi sir, i successfully built the program, but the lcd does nt work. what need to be checked, ?
@StudentCompanion
@StudentCompanion 6 лет назад
+Jayesh kumar p r what do you mean it doesn't work? Does it display anything? Does it display black squares? Is the lcd back light on?
@jayeshkumarpr6219
@jayeshkumarpr6219 6 лет назад
the back light is on and there is black squares.
@StudentCompanion
@StudentCompanion 6 лет назад
+Jayesh kumar p r if there is black squares than the problem is the contrast of the lcd. Turn the potentiometer connected to the lcd in both direction until it display some characters
@jayeshkumarpr6219
@jayeshkumarpr6219 6 лет назад
HI SIR ,i adjusted the potentiometer ,when i adjust it it slowly disapper. it does nt shows any word. only black squares
@StudentCompanion
@StudentCompanion 6 лет назад
+Jayesh kumar p r uplaod your code and a sketch of your circuit diagram in the Forum . We will have a look at it.
@cooldude-rm5fc
@cooldude-rm5fc 8 лет назад
from where to download heder file for lcd
@StudentCompanion
@StudentCompanion 8 лет назад
Read more at: www.studentcompanion.net/en/interfacing-lcd-display-with-pic-microcontroller-xc8/
@suaibislam2923
@suaibislam2923 6 лет назад
Sir, I am using xc8 version 1.45. How can I use lcd library?
@StudentCompanion
@StudentCompanion 6 лет назад
If you are using v1.34 or earlier, the libraries are included in the compiler. You can use them as explained in this tutorial. But from v1.35, they are no longer included. You must download them separately from microchip website at the same place you downloaded your XC8 compiler. They are now called Legacy peripherals libraries and you must install them into your XC8 compiler. If you don't want to install them, there are other lcd libraries that you can use. Please watch this video it explain how to download the PIC18F peripheral libraries and install them and also how to use another lcd library which is easy to use especially if you're gonna use MCC: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-4WaB_Lj8FnY.html
@romeomichael5303
@romeomichael5303 6 лет назад
why are there so many red underlines? i wrote the same codes (except of course the header file, i included my own header file) but it gives 2 errors :(
@StudentCompanion
@StudentCompanion 6 лет назад
Hi. We can't really guess what could be wrong without more information. Which PIC are you using? What version of XC8 compiler you are using? What are those 2 errors saying?
@romeomichael5303
@romeomichael5303 6 лет назад
well the red underlines are exactly in the same places as in the video. and when i build it, at the end it says in red lines: "make[2]: *** [build/default/production/my_mplab_project.p1] Error 1 make[1]: *** [.build-conf] Error 2 make: *** [.build-impl] Error 2 BUİLD FAILED (exit value 2, total time: 2s)" i've followed the tutorial from the beginning and done exactly the same, PIC18F2220 and all. the compiler version is v4.15 why are the codes in the video underlined red at all? they work with you :/
@StudentCompanion
@StudentCompanion 6 лет назад
Well. Red underline are not necessarily errors. There might be many reasons for that but what i have observed if you did not specify explicitly the libraries used, it will underline those codes. Like for example we did not include xlcd.h and adc.h in this video. But when you build the code it will get all the required libraries that's why it won't generate errors. In your case it does not find those libraries that's why I think it generating errors. The reason because you are using a newer XC8 compiler. PIC18F peripheral libraries are no longer included in new versions of XC8 compilers from version 1.35. You must now download them separately and install them into your compiler and they are now called Legacy peripherals libraries.
@StudentCompanion
@StudentCompanion 6 лет назад
V4.15 is not the compiler version, this is MPLAB X IDE version. This is just the editor not the compiler. The compiler works in the background. That's the version that I need.
@StudentCompanion
@StudentCompanion 6 лет назад
Microchip wants people to use MPLAB Code Configurator now for new designs because they are no longer supporting the peripheral libraries. Watch this video to learn how to download the peripheral libraries and link them into your compiler. And also how to use MPLAB Code Configurator for ADC and LCD: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-4WaB_Lj8FnY.html
@cyberking28
@cyberking28 4 года назад
I can't see any download link for legacy peripherals on the microchip website
@StudentCompanion
@StudentCompanion 4 года назад
You can download it from the same place as XC8 compilers. From this link under compiler Downlod Tab, scroll down and you will see PIC18F legacy peripherals libraries: www.microchip.com/mplab/compilers
@StudentCompanion
@StudentCompanion 4 года назад
The beginning of this video also shows you how to download it: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-4WaB_Lj8FnY.html
@cyberking28
@cyberking28 4 года назад
@@StudentCompanion seen it thank you
@StudentCompanion
@StudentCompanion 4 года назад
You are welcome!
@cyberking28
@cyberking28 4 года назад
So i installed it in the xc8 folder but I'm still getting errors in the code and a failed build
@aasimzia9781
@aasimzia9781 8 лет назад
and configuration I set the same in mikro c and it works in mikro c, but I wanna try it in mplab bcoz I don't have full version of mikro c. Sir could u please help?
@StudentCompanion
@StudentCompanion 8 лет назад
send us a full screen shot of your errors so we can have a look at them
@aasimzia9781
@aasimzia9781 8 лет назад
+Student Companion SA this is the code #include #include #include "pic18.h" void init_XLCD (void); void DelayFOR18TCY (void); void DelayPORXLCD (void); void DelayXLCD (void); void main(void) { init_XLCD(); putrsXLCD("aayzee"); SetDDRamAddr(0x40); putrsXLCD("Electrical"); while(1) { } } void init_XLCD (void) { OpenXLCD(FOUR_BIT & LINES_5X7); while(BusyXLCD()); WriteCmdXLCD(0X06); WriteCmdXLCD(0X0C); } void DelayFOR18TCY (void) { Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); return; } void DelayPORXLCD (void) { Delay1KTCYx(30); } void DelayXLCD (void) { Delay1KTCYx(10); }
@aasimzia9781
@aasimzia9781 8 лет назад
+Student Companion SA errors are: make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf make[1]: Entering directory `C:/Users/Baghdadi/MPLABXProjects/pic.X' make -f nbproject/Makefile-default.mk dist/default/production/pic.X.production.hex make[2]: Entering directory `C:/Users/Baghdadi/MPLABXProjects/pic.X' "C:\Program Files (x86)\Microchip\xc8\v1.30\bin\xc8.exe" --pass1 --chip=18F2620 -Q -G --double=24 --float=24 --emi=wordwrite --opt=default,+asm,+asmfile,-speed,+space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist --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/pic18f.p1 pic18f.c "C:\Program Files (x86)\Microchip\xc8\v1.30\bin\xc8.exe" --chip=18F2620 -G -mdist/default/production/pic.X.production.map --double=24 --float=24 --emi=wordwrite --opt=default,+asm,+asmfile,-speed,+space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist --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: %%s" "--warnformat=%%f:%%l: warning: (%%n) %%s" "--msgformat=%%f:%%l: advisory: (%%n) %%s" -odist/default/production/pic.X.production.elf build/default/production/pic18f.p1 Microchip MPLAB XC8 C Compiler (Free Mode) V1.30 Copyright (C) 2014 Microchip Technology Inc. License type: Node Configuration :: advisory: (1233) Employing 18F2620 errata work-arounds: :: advisory: (1234) * Corrupted fast interrupt shadow registers :: advisory: (1234) * Data in RAM location can be corrupted if async. reset occurs during write :: warning: (1273) Omniscient Code Generation not available in Free mode :0: error: undefined symbol: _DelayFor18TCY(dist/default/production\pic.X.production.obj) make[2]: Leaving directory `C:/Users/Baghdadi/MPLABXProjects/pic.X' make[1]: Leaving directory `C:/Users/Baghdadi/MPLABXProjects/pic.X' (908) exit status = 1 make[2]: *** [dist/default/production/pic.X.production.hex] Error 1 make[1]: *** [.build-conf] Error 2 make: *** [.build-impl] Error 2 BUILD FAILED (exit value 2, total time: 5s)
@aasimzia9781
@aasimzia9781 8 лет назад
did u check?
@StudentCompanion
@StudentCompanion 8 лет назад
+Aay zee we checked your project but it's not clear what could be the problem. it could be configuration bits.
@mustafayilmaz-vr9ti
@mustafayilmaz-vr9ti 6 лет назад
hello, how i can find the lcd library used in this video? thank u so much in advance
@StudentCompanion
@StudentCompanion 6 лет назад
Hi. It's now called Legacy peripherals libraries you can download it from microchip website at the same location you downloaded the XC8 compiler. And install it into your compiler. Please watch this video to learn more how to download it and link it and also how to use another simpler lcd library: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-4WaB_Lj8FnY.html
@mustafayilmaz-vr9ti
@mustafayilmaz-vr9ti 6 лет назад
hello, thank you for your disponibility... i am wondering if u can help me with an another problem.. i did what u said to me ..then i changed some names of the function to my main C code to make compatible the functions in both the source code and the library.. now i have a problem in : #include "mcc_generated_files/mcc.h" when I am trying to build the problem is : lcd.h:46: error: (141) can't open include file "mcc_generated_files/mcc.h": No such file or directory I will be glad if u can give me some aadvice to solve it. thank u so much for your precious time :)
@StudentCompanion
@StudentCompanion 6 лет назад
Why will you want to rename the functions? Don't complicated things for yourself.
@StudentCompanion
@StudentCompanion 6 лет назад
And remember mcc is completely different from the peripheral libraries. They use different libraries.
@mustafayilmaz-vr9ti
@mustafayilmaz-vr9ti 6 лет назад
Student Companion mcc library is cited in the downloaded peripheral libraries from the microchip site as u reccomended 😅
@jiteshlimbachia205
@jiteshlimbachia205 5 лет назад
Can you make videos on how to program pic18f45k22
@StudentCompanion
@StudentCompanion 5 лет назад
Here is a video showing how to program a PIC, it doesn't matter which PIC model you are using, the procedure will be the same. The difference will depend on the type of programmer used: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-mg6WkaN-u8w.html
@abubakarabbas9384
@abubakarabbas9384 5 лет назад
Sir i have many error in program every function of lcd show error
@StudentCompanion
@StudentCompanion 5 лет назад
Hi. What do you mean every function shows an error? Is it a red underline? Or when you build it generate errors?
@abubakarabbas9384
@abubakarabbas9384 5 лет назад
@@StudentCompanion sir every line show erroe red and when compile then show message undefine functions
@StudentCompanion
@StudentCompanion 5 лет назад
@@abubakarabbas9384 can you copy the full build log and paste it here so I can see the full error message. What isbthe PIC you are using? What is the version of your XC8 compiler?
@abubakarabbas9384
@abubakarabbas9384 5 лет назад
@@StudentCompanion sir i am using mplab xide and xc8 sir the issue is when the f1 is pressed and search the lcd function then where writethat use these function to include the header file but in your code i cannot see any header file. this is my problem i cantot find any xlcd header file
@guillaumev678
@guillaumev678 4 года назад
Hello, I am learning how to use the lcd display but when I compile your program I ve got errors do you think I need to domnload a librairy to make it work? Thank you for your tutorials!
@StudentCompanion
@StudentCompanion 4 года назад
Possibly. Which PIC model you are using? What is the version of your XC8 compiler? Can you post the exact errors you are getting?
@guillaumev678
@guillaumev678 4 года назад
@@StudentCompanion I use the program I downloaded on your website, the PIC is 18f2620, my compiler version is 2.10. I can compile some programs but I think Something is missing because for example I don t the pdf with peripheral librairies. Thank you for your help!
@StudentCompanion
@StudentCompanion 4 года назад
It won't work with xc8 v2. You will need to install the peripheral libraries. It's now called legacy peripheral libraries. But you will have to install an earlier version of XC8. V1.45 or earlier. From xc8 v2.0 the peripheral libraries are mo longer supported.
@StudentCompanion
@StudentCompanion 4 года назад
Watch this video to learn more: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-4WaB_Lj8FnY.html
@guillaumev678
@guillaumev678 4 года назад
I downloaded the 1.45 and the 1.34 version of xc8, I installed the peripheral librairies in both files. I linked it in the properties. I still doesn t work. I don t know what else I can do. I created a new project with a pic 18f4550, I defined the 1.45 version and I copied your code.
@aasimzia9781
@aasimzia9781 8 лет назад
I have used 18f252 and it is not working. same code!!! :: advisory: (1233) Employing 18F252 errata work-arounds: :: advisory: (1234) * Address 4000h boundary :: advisory: (1234) * Faulty table reads at -40 degrees C :: advisory: (1234) * GOTO instruction at reset vector must be preceded by NOP :: advisory: (1234) * Peripherals can misbehave if BSR = 15 :: advisory: (1234) * DAW instruction may improperly clear CARRY bit :: advisory: (1234) * Specifically disable interrupt sources during tblwt instruction :: advisory: (1234) * Writes to flash must target opposite side of 4000h boundary :: warning: (1273) Omniscient Code Generation not available in Free mode :0: error: undefined symbol: _DelayFor18TCY(dist/default/production\LCD.X.production.obj) make[2]: Leaving directory `C:/Users/Baghdadi/MPLABXProjects/LCD.X' (908) exit status = 1 make[2]: *** [dist/default/production/LCD.X.production.hex] Error 1 make[1]: *** [.build-conf] Error 2 make: *** [.build-impl] Error 2 make[1]: Leaving directory `C:/Users/Baghdadi/MPLABXProjects/LCD.X' BUILD FAILED (exit value 2, total time: 5s)
@StudentCompanion
@StudentCompanion 8 лет назад
+Aay zee Yuo can use the same code but because the PIC is different, you must set correctly the configuration bits according to this PIC. Watch our tutorial 1 to learn how to set configuration bits correctly.
@StudentCompanion
@StudentCompanion 8 лет назад
+Student Companion SA If you are using XC8 compiler from version 1.35 to up, the project might complain about the peripheral library which is no longer included in XC8 compiler, you'll have to download it separately and install it into your compiler. watch this video to learn more: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-4WaB_Lj8FnY.html or you can learn more from this page: www.studentcompanion.co.za/interfacing-lcd-display-with-pic-microcontroller-xc8/
@rolandoaguilera3114
@rolandoaguilera3114 7 лет назад
What does the LCD.h header file include? Thanks by the way, amazing tutorial!
@StudentCompanion
@StudentCompanion 7 лет назад
+Rolando Aguilera hi. Thanks for watching our videos. The lcd.h file is a library file. It has the declarations and functions to access and control the lcd instead of you writing your own functions.
@rolandoaguilera3114
@rolandoaguilera3114 7 лет назад
Awesome you have constant feedback with the viewers! Thank you so much! I'm trying to understand the 14 Nop + a return statement(2 cycles) = 16cycles, but the function requires 18 cycles delays. Iam missing something I know...
@rolandoaguilera3114
@rolandoaguilera3114 7 лет назад
Nevermind my last comment, I aleady found my fool mistake. Also I realized to didn't use the LCD.h header file, since you use the XC8 compiler defined functions, right?
@StudentCompanion
@StudentCompanion 7 лет назад
+Rolando Aguilera yes.
@StudentCompanion
@StudentCompanion 7 лет назад
+Rolando Aguilera when a return function is used, a BRA statement branches to the end of the function where a RETURN 0 is executed from the function , this adding 2 more cycles
@unrmaestro
@unrmaestro 5 лет назад
dude u told me code configurator doesnot work with not old model but in ur site u say pic16f and pic18f are programmable with code configurator i am so confused
@StudentCompanion
@StudentCompanion 5 лет назад
Confuse by what? PIC16 and PIC18 has got nothing to do with old or new, there are new device models of PIC16F, PIC18F even PIC10F and PIC1F in these series. The MCC release note has a list of all supported devices
@unrmaestro
@unrmaestro 5 лет назад
@@StudentCompanion ty
@bindu6
@bindu6 7 лет назад
What if I want to interface my lcd to port c?
@StudentCompanion
@StudentCompanion 7 лет назад
Watch these 2 videos: 1. LCD connected to any PORT: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-RkDN2GW_SxU.html 2. ADC and LCD with MCC: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-4WaB_Lj8FnY.html
@usmanashraf3199
@usmanashraf3199 6 лет назад
Isnt it necessary to add include "XLCD.h" library
@StudentCompanion
@StudentCompanion 6 лет назад
Not necessary. The project will still build
@usmanashraf3199
@usmanashraf3199 6 лет назад
Sir from where I can find libraries
@StudentCompanion
@StudentCompanion 6 лет назад
Which libraries? If you are talking about PIC18F peripheral libraries used in this video, they are no longer installed by default with your XC8 compiler in recent versions. Actually since v1.35. They are now callef Legacy peripherals libraries. You must download them separately from microchip website at the same place you downloaded your XC8 compiler. Install these libraries into your XC8 compiler installation folder.
@StudentCompanion
@StudentCompanion 6 лет назад
As Microchip is phasing out The peripheral libraries and no longer included in new versions of compilers, it's not advisable to use them with new designs. If you are designing using a new PIC model, try to ise MPLAB Code Configurator. It's easy to use and it generate library codes for your peripherals. Watch this video to learn more: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-JxSSVtTj_fA.html
@StudentCompanion
@StudentCompanion 6 лет назад
You can also use other LCD libraries like the one used in this video: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-4WaB_Lj8FnY.html
@fernandosaraiva672
@fernandosaraiva672 6 лет назад
Hi sir, i found the error: main.c:115: warning: (520) function "_DelayFor18TCY" is never called main.c:124: warning: (520) function "_DelayPORXLCD" is never called main.c:138: warning: (520) function "_DelayXLCD" is never called, how can I resolve?
@StudentCompanion
@StudentCompanion 6 лет назад
Did you include and link the peripheral libraries?
@fernandosaraiva672
@fernandosaraiva672 6 лет назад
I include w #include "C:\Program Files (x86)\Microchip\xc8\v1.45\include\plib\xlcd.h", what u say with link?
@StudentCompanion
@StudentCompanion 6 лет назад
You must download it separately and install it into your compiler if you are Using a new XC8 compil2. The peripheral libraries are no longer included in XC8 compiler installation since version 1.34.
@StudentCompanion
@StudentCompanion 6 лет назад
Watch the beginning of this video to learn where to download the peripheral libraries and how to link them: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-4WaB_Lj8FnY.html
@fernandosaraiva672
@fernandosaraiva672 6 лет назад
when I click on MCC , shows me a warning message, "the projects device is not supported by the currently loaded libraries. all library versions are avaliable for download on the MCC website", so i tried compiled, and so I tried to compile anyway, and it did not appear as an error, just a warning that only the DelayXLCD function had not been called. so I recorded on the PIC 18F4550, and the characters are blank, I sent the message "hello world" and it showed me 00_oo
@unrmaestro
@unrmaestro 5 лет назад
guys what is contrastpin code in proteus help me pls and great videos dude ty alot
@StudentCompanion
@StudentCompanion 5 лет назад
Hi. Your question is not clear. Please explain what do you mean by code in proteus?
@unrmaestro
@unrmaestro 5 лет назад
@@StudentCompanion I mean when u search for a component you look for it
@StudentCompanion
@StudentCompanion 5 лет назад
Which component you are looking for? Yoi are talking about contrast input, this won't have any effect in simulation but only in hardware because it adjust the contrast of the characters displayed on the lcd. The contrast is to adjust the blackness of the characters, increase it or decrease it to be light
@StudentCompanion
@StudentCompanion 5 лет назад
So far I can't understand your question
@setsutsubasa8742
@setsutsubasa8742 7 лет назад
Hi Student Companion. I am writing a code for LCD with PIC18F4550. I was successful with 8 bit interface using internal oscillator. However I am not receiving anything on my LCD if I am using 4 bit interface with external oscillator. I think it is highly likely that I am not able to define external oscillator in my code. Could it be possible for you to share code snippet for using external oscillator? My compiler is XC8
@setsutsubasa8742
@setsutsubasa8742 7 лет назад
If you require me to share the whole code I don't mind it. Basically its same as the one is your video abover
@StudentCompanion
@StudentCompanion 7 лет назад
+Setsu Tsubasa how are you connecting your lcd? PORTB? Paste your configuration bits code and main code.
@StudentCompanion
@StudentCompanion 7 лет назад
+Setsu Tsubasa are you using PIC18F peripherals libraries? Did you install it into your compiler installation folder?
@setsutsubasa8742
@setsutsubasa8742 7 лет назад
//****MAIN FUNCTION**** void main(void) { //OSCCON = 0x72; //Configuring OSCON Register to use internal Oscillator. float current = 1, voltage = 3.13 ; char buf[30]; sprintf (buf, "PV: %0.2fV %0.2fA", voltage, current); // text[] = "3.13"; DelayPORXLCD(); //15 ms delay after VDD>4.5V LCD_init(); //Initialise LCD DelayXLCD(); //5ms delay SetDDRamAddr(0x80); putrsXLCD(buf); SetDDRamAddr(0x01); // To clear LCD display (without this in ISIS 2nd line command doesn't work) SetDDRamAddr(0xC0); //Shift cursor to beginning of 2nd line sprintf (buf, "H %f", current); putrsXLCD(buf); while (1); return; } //*****xLCD.h***** #define LCD_PORT PORTD //LCD_PORT defines the port to which the LCD data lines are connected #define TRIS_LCD_PORT TRISD /* CTRL_PORT defines the port where the control lines are connected. * These are just samples, change to match your application. */ #define RW_PIN LATCbits.LATC1 /* PORT for RW */ #define TRIS_RW TRISCbits.TRISC1 /* TRIS for RW */ #define RS_PIN LATCbits.LATC0 /* PORT for RS */ #define TRIS_RS TRISCbits.TRISC0 /* TRIS for RS */ #define E_PIN LATCbits.LATC2 /* PORT for D */ #define TRIS_E TRISCbits.TRISC2 /* TRIS for E */
@setsutsubasa8742
@setsutsubasa8742 7 лет назад
By PIC18F peripherals libraries you mean xlcd.h and related files then yes. I Have installed them and using them.
@luank8599
@luank8599 Год назад
where i can download your source code ?
@luank8599
@luank8599 Год назад
How to add library LDC.h in the source? Please help me
@dharmalingeswarparasa1609
@dharmalingeswarparasa1609 4 года назад
Can you explain the same thing with assembly level language sir?
@StudentCompanion
@StudentCompanion 4 года назад
Unfortunately we don't do Assembly
@enriquebenalcazarp
@enriquebenalcazarp 9 лет назад
maybe do you have the xlcd.h ?¿? i need it
@StudentCompanion
@StudentCompanion 9 лет назад
what version of XC8 you are using?
@enriquebenalcazarp
@enriquebenalcazarp 9 лет назад
+StudentCompanionSA the newest!!! v 1.35 xc8
@StudentCompanion
@StudentCompanion 9 лет назад
+Enrique Benalcázar if you don't find any library files you may download and install the legacy PIC18 peripheral libraries. they have removed them in version 1.35. they want people to use the code configurator.
@enriquebenalcazarp
@enriquebenalcazarp 9 лет назад
+StudentCompanionSA thanks!!! do you have any link of libraries??
@StudentCompanion
@StudentCompanion 9 лет назад
+Enrique Benalcázar on this link: www.microchip.com/pagehandler/en-us/devtools/mplabxc/home.html Under Download, click on PIC18F Legacy Peripheral Libraries v1.0 - Windows if you are using a Windows computer.
@abubakarabbas9384
@abubakarabbas9384 5 лет назад
sir plz show the configuration file of this code and please teach me for add new liabrary like xlcd in xc8
@StudentCompanion
@StudentCompanion 5 лет назад
The configuration bits is explained in the video
@abubakarabbas9384
@abubakarabbas9384 5 лет назад
@@StudentCompanion sir sorry kuch sahi samaj nahi lagi us ki
@abubakarabbas9384
@abubakarabbas9384 5 лет назад
@@StudentCompanion Sir can we talk on whats app
@StudentCompanion
@StudentCompanion 5 лет назад
No. We don't provide tutorial support in private messages on WhatsApp. Ask all your questions here. Another person can benefit from your question by just reading them as see the proposed solution instead on discussing in private.
@abubakarabbas9384
@abubakarabbas9384 5 лет назад
sir tell me
@birdiesaura768
@birdiesaura768 7 лет назад
Hi Can I please get some help from you in understanding a few things from this project? I mean can we have a little chat please? I need to ask a few things from you
@StudentCompanion
@StudentCompanion 7 лет назад
+Gray Fox Hi. You can ask any questions you like concerning this project
@birdiesaura768
@birdiesaura768 7 лет назад
in lcd.c You have right shifted the nibble, why is that? ch = (ch >> 4)
@StudentCompanion
@StudentCompanion 7 лет назад
+Gray Fox have you read the lcd datasheet?
@birdiesaura768
@birdiesaura768 7 лет назад
I tried but I'm a beginner and I didnt understand much of it.
@StudentCompanion
@StudentCompanion 7 лет назад
+Gray Fox for you to understand the lcd library you'll need to understand the datasheet first as nothing will make sense to you. The datasheet explain how the module work and how to send instructions
@FloppyEmulatorPicF
@FloppyEmulatorPicF 4 года назад
very good
@StudentCompanion
@StudentCompanion 4 года назад
Thank you.
Далее
a hornet bit me on the nose 👃😂
00:16
Просмотров 2,5 млн
Новый уровень твоей сосиски
00:33
LCD1602 - это очень просто!
22:19
Просмотров 143 тыс.
PIC Mikrodenetleyici ile LCD Ekran Kullanımı
11:15
Просмотров 12 тыс.
NEVER install these programs on your PC... EVER!!!
19:26
a hornet bit me on the nose 👃😂
00:16
Просмотров 2,5 млн