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.
What i really like about this is how timeless this is. I still can't believe this came out in 2014, was just a dumb kid back then and yet this tutorial is just as applicable in this time as it would have been in the early 2000s. Great work mate, really appreciate content with this quality.
This is the best set of tutorials I have found. I really like how simple you make it for the new guys like myself. Also thanks for putting text at bottom as you speak, makes understanding much easier. I can just pause and still see what you said. Thank You very much!
Nicely done....I"ve watched the first 7 tutorial and learned a lot, but I think you should have explain in tutorial 1 all the details about the code as you did in tutorial 2. because I had difficulty to understand the first, until I watched the second.
+Cedric Akilimali Thank you for your feedback. The reason we didn't explain the code more in tutorial 1, tutorial 1 was just an introductory and to learn how to create a new project using MPLAB XC8. That what we emphasized on, the tutorial could have been very long if we explained other things and people generally don't like long tutorials, it's kind of boring. Thnaks.
ako ikaw As long as it can compile and generate an HEX file, then you can load the hex file to simulate your code. Proteus is not limited to MPLAB compilers only. Any compiler that can generate an HEX file, like MikroC pro for PIC, Flowcode, etc. Check our first tutorial to learn how to load an HEX file: th-cam.com/video/mUofSucHx_E/w-d-xo.html
You set 0x76 - what exactly mean this value. Not clear about "complimenting" of LATbits - what is the function, how they work? And why second LED starting after delay from first LED? How is defined this delay?
+try again if you studied binary arithmetic, complimenting is basically to invert the value of a binary number. A compliment of 1 is 0 and of 0 is 1. To blink an LED this function can be used. If the value of LAT register was 1 (LED ON) it will be inverted to 0 (switch OFF the LED) and so on.
Hi! In my example, the LEDs must light up in the place, but for some reason only one lit? M1: __delay_ms(100); RB1=1; PORTBbits.RB2=1; PORTBbits.RB3=1; __delay_ms(100); PORTBbits.RB1=0; PORTBbits.RB2=0; PORTBbits.RB3=0; goto M1;
StudentCompanionSA I apologize! I translate the text the translator! In my program light-emitting diodes have to be lit in a place but why only one is lit?
I have two questions: 1. On the diagram in Proteus there is an external generator, but in the program you use the OSCCON register for the internal generator. Why? 2. Where did you get the value 0x76? I didn't find this value in the table 3-1"Power Managed Mode" on page 29 for the OSCCON register?
Hi, thanks for your comment. 1. This is an error on our part, we showed the external oscillator circuit just for explanation but we referred to tutorial 1 for configuration bits (header file), in tutorial 1, we used the internal oscillator, so just ignore the external oscillator circuit in this video. 2. For OSCCON value of 0x76, refer to REGISTER 2-2: OSCCON REGISTER section in the datasheet on page 26. 0x76 configure to use 8MHz internal oscillator, see the individual bits we enabled, 0x76 equals to 0b1110110 in binary.
Hello. Your videos have been a great help! Got a question. I see you changed PICs throughout your series. I jus realized this. I was having trouble with memory limits on the PIC18F2220. I see you go to other PIC18F chips. Do you by chance have a recommendation on what chip is the newest or should I focus on with your tutorials? I appreciate any feedback!
There are many considerations. The internal oscillator circuit is used to generate the device clock. The device clock is required for the device to execute instructions and for the peripherals to function. Every microcontroller needs a clock source. They govern the speed at which the processor executes instructions, the baud rate of serial-communication signals, the amount of time needed to perform an analog-to-digital conversion, type of application, battery powered, physical conditions and much more. So you have to carefully choose the best frequency available depending on your application. Usually the choice will depend on Power requirements and operating frequency. The lower the frequency the lower the power consumption which is very good for battery powered applications, the higher the frequency, the higher the power consumption. If your application does not require high speed in executing its instructions or does not have peripherals which require high speed such as high baud rate of serial-communication, USB, Ethernet, high speed conversion of ADC for example, a low speed can be the choice otherwise you might need high speed. For your information you'll need 48MHz (direct or through PLL) for full speed USB communication. The same goes for other peripherals. For high accuracy and stability you better consider an external crystal oscillator.
You can read more from these Microchip documents: ww1.microchip.com/downloads/en/AppNotes/00849a.pdf and ww1.microchip.com/downloads/en/appnotes/00949a.pdf
Hi. What is the programm allows to build different srtucture? I have builded my project but I can not to watch the result. How can I build my own structure? Can someone tells me?
Hi, I mean how to watch the Simulation result? You debuged the c-code then built the structure of the circuit. Can you show any control circuit using dspic microcontroller? I do not use pic but I use dspic30f4011.
Hi Payrav Nusratov if you are using Proteus software for simulation, there's no difference between the PIC or Dspic. The procedure is the same. Watch our videos to see how we simulated.
If you mean the Proteus simulated LED then you are correct. You can't damage it even if you apply higher current or voltage. Thank you for watching our videos.
Very educational and helpful. I am working with an older chip, a PIC16F716 and am getting an error: "undefined identifier "LATbits" " when I try to assign LAT4= 1. I am quite new at programming. Can you help?
+Michael Stoltzfus PIC16F series like your PIC16F716 don't have the LAT register, only PIC18F series and higher. You must use the PORT register to read and to write to outputs
+Michael Stoltzfus and the other thing, you cannot just say LAT4 = 4. LAT of what? You must specify the PORT like PORTB, PORTC etc. For your case you can write for example: PORTB = 4; // or PORTBbits.RB4=1; // for example to output a logic 1 to bit 4 of PORTB
+Temitayo Abel you can make it blink the way you want. Can you explain more what you mean by light bouncing back? What is the rhythm/patterns of your blinking?
+Temitayo Abel you can send those values exactly as they are to the Port. line by line.: for example: LATB= 0b10000000; LATB =0b01000000; .... LATB =0b00000001
Your question is not clear. What do you mean? If you write a delay of 1 second, it should take 1 second to be executed. If it takes longer or shorter than there is something wrong in your code
Did you look at the simulation execution time? When you run simulation at the bottom bar there is an execution time. Compare that clock with the code, not your PC clock as simulation speed can be effected by many parameters including your computer speed among others.
I am sending the code to a microcontroller PIC18F45K22 mounted on Curiosity/starter kits (PKOB4) It is a pre-built project, I have hex code. when I send the code via usb the LED is not blinking not even coming on. I am using MPLAB X IDE v5.20 What can be the reason? (I don't know if I have explained my question properly) Thanks
@@StudentCompanion 1. THis is the message I am getting as configuration error but I don't know how to sort it out error: Configuration "C32_PIC32MX795F512L" builds with "C32", but no toolchains of that type are installed. Errors have occurred while loading one or more configurations. If a specific error is not shown above, this may happen when you import a project from another computer. + You can add language tools in Tools->Options embedded tab. + You can change which language tool to use in the project properties dialog. 2. the build log of code in Flowcode ( I am not sure about this) I have just compiled the hex code and it was showing success at the end.
This is a great tutorial and thank you for the awesome videos. I have a question though. What is the difference between LATBbits.RB0 and LATBbits.LATB0?
Hi. Thanks for watching our videos and for your feedback. When writing to a PORT like setting it High or Low, use the LAT register. It should be written like this: LATBbits.LATB0 And when you are reading from a PORT, then you must use a PORT register. It should be written like this: PORTBbits.RB0 So for LAT use .LATB0 and for PORT use RB0
You can also use MPLAB Code Configurator to generate code functions and configuration for you and it's easy to use. Watch this video: th-cam.com/video/JxSSVtTj_fA/w-d-xo.html
Dear Sir, Thank you very much for you tutorial. However Where can I download code for all xc8 tutorial ?. It look like the link to download page was dead.
Hi. Thanks for watching our videos and for your feedback. You can download the code for all our tutorials from our website: www.studentcompanion.co.za/category/tutorials/mplab-xc8/
first of all very nice tutorial. And i like the teaching way of yours. bro i need all the the commands list like the some u showed (@4:37), like _delay_ms, TRISB, LAT etc etc. bro i want all this command , please share a link or whatever u have. once again thanks alot for this nice tutorials.
+Shahzad Bhai Hi, thanks for watching our tutorials. Each command depends on what we are trying to achieve in our examples. It will be difficult to tell you all the commands, you can read the datasheet of your PIC or watch more of our videos, or you can visit our website to learn more.
+StudentCompanionSA Thanks for reply, now i understand every single step except the "OSCCON=0x76" how to find OSCCON value, i have seen pic18f2220 data sheet but i cant find its value. what is the purpose of this command? and what is the value of OSCCON on other pic's.
+Shahzad Bhai the OSCCON register is used to set the frequency when you are using the internal oscillator of the PIC. in our example we set it to use 8MHz internal oscillator.
+Tefera Ergoye what is for jow? I presume you meant to show. As we have said earlier on, you can program this chip exactly the same way as the chips in our tutorials.
Hello! I was watching this series of videos and I found them really useful and clear! But unfortunately I couldn´t find your tutorials sequence chapter by chapter. Are those gone videos gonna be published again in a near future or are they gonna be missing forever? I have to know, please :c
Hi. Thanks for watching our videos and for your feedback. Yes we will publish them again in the near future. Just subscribe to our TH-cam channel and you'll be notified when we upload new tutorials.
Hi this is greet thank you I have a question: how to use a multiple logical or gate? the pic 16f84a have 2 ports I want to use RA0 as output and the reset as input so any one (input) will activate the output(or gate) Thank
Please watch the rest of the videos and try to understand and learn. You are asking basic questions that are already covered in the videos. We can't answer to each and everyone line of your code when you are not doing any effort to learn.
1. Connect a push button to the MCLR pin using a pull-up resistor as in the circuit diagram in this tutorial: th-cam.com/video/mUofSucHx_E/w-d-xo.html Watch from 6:11 2. Activate the MCLR function in the configuration bits as in this video: th-cam.com/video/mUofSucHx_E/w-d-xo.html watch from 9:51
@@hichamredoine1817 can you post the full error message you received not just a simplified version of the message. Did you use your generated Hex file from your project using poc16f84?
In the earlier versions of XC8 compiler when we recorded that video, the delay function did not allow the use of a large number like 1000 for 1000ms. It generated errors. So we had to use a short delay and loop it several times to achieve the desired delay. But this has been fixed in the latest compiler version. You now don't need to use the loop.
Well understood but I want it to blink 3 times and it didn't work; Am using pic16f877a and this is the code #include #include #include #define _XTAL_FREQ 8000000 /* * */ int main(void) { TRISB=0x00; PORTB=0x00; int i=0; int n=1; while(n
Hi. Thanks for watching our videos and for your. What kind of documentation you are looking for? In your MPLAB and XC8 compiler installation folder there are documents.
Please ask your questions here on TH-cam or in the Forum on our website. There you can also upload images or project files. We don't provide support in private messages on Facebook or emails
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.
What i really like about this is how timeless this is. I still can't believe this came out in 2014, was just a dumb kid back then and yet this tutorial is just as applicable in this time as it would have been in the early 2000s. Great work mate, really appreciate content with this quality.
This is the best set of tutorials I have found. I really like how simple you make it for the new guys like myself. Also thanks for putting text at bottom as you speak, makes understanding much easier. I can just pause and still see what you said. Thank You very much!
thank you for watching our videos. we appreciate your feedback.
Great tutorial! Thanks. Keep it.
I really like the quick answers.
You are welcome!
thanks for the video tutorial!
Nicely done....I"ve watched the first 7 tutorial and learned a lot, but I think you should have explain in tutorial 1 all the details about the code as you did in tutorial 2. because I had difficulty to understand the first, until I watched the second.
+Cedric Akilimali Thank you for your feedback. The reason we didn't explain the code more in tutorial 1, tutorial 1 was just an introductory and to learn how to create a new project using MPLAB XC8. That what we emphasized on, the tutorial could have been very long if we explained other things and people generally don't like long tutorials, it's kind of boring.
Thnaks.
We appreciate all your feedback guys. Thanks
We appreciate all your feedback guys. Keep commenting with your suggestions for future tutorials. Thank you!
thanks sir very helpful lecture
You are welcome!
Thank you very much.
Great!
Thanks sir, This series very useful. But I want to learn ASM, could you make it in next video, please?
+An Nguyen unfortunately ASM is not part of our plan in the near future. Only C.
Thank you very much) You saved me))
©Alpha
You are welcome!
how can i run JAL (just another language) program to proteus design suit 8.1? great tutorial by the way.
ako ikaw As long as it can compile and generate an HEX file, then you can load the hex file to simulate your code. Proteus is not limited to MPLAB compilers only. Any compiler that can generate an HEX file, like MikroC pro for PIC, Flowcode, etc.
Check our first tutorial to learn how to load an HEX file: th-cam.com/video/mUofSucHx_E/w-d-xo.html
You set 0x76 - what exactly mean this value.
Not clear about "complimenting" of LATbits - what is the function, how they work?
And why second LED starting after delay from first LED? How is defined this delay?
+try again 0x76 is a value loaded into the OSCCON register to select 8MHz internal oscillator. You can find this information in the datasheet.
+try again if you studied binary arithmetic, complimenting is basically to invert the value of a binary number. A compliment of 1 is 0 and of 0 is 1. To blink an LED this function can be used. If the value of LAT register was 1 (LED ON) it will be inverted to 0 (switch OFF the LED) and so on.
Very Nice hank you
+Umar Hayat Thanks
Hi!
In my example, the LEDs must light up in the place, but for some reason only one lit?
M1:
__delay_ms(100);
RB1=1;
PORTBbits.RB2=1;
PORTBbits.RB3=1;
__delay_ms(100);
PORTBbits.RB1=0;
PORTBbits.RB2=0;
PORTBbits.RB3=0;
goto M1;
Flay Sorry we really can't understand your question. If you could try to elaborate more, we could see how to assist.
Thanks.
StudentCompanionSA I apologize! I translate the text the translator!
In my program light-emitting diodes have to be lit in a place but why only one is lit?
Flay It's difficult to tell from only that piece of code. can you write the full code?
superb tuts....👌
+Vaidesh Iyer thank you
I have two questions: 1. On the diagram in Proteus there is an external generator, but in the program you use the OSCCON register for the internal generator. Why? 2. Where did you get the value 0x76? I didn't find this value in the table 3-1"Power Managed Mode" on page 29 for the OSCCON register?
Hi, thanks for your comment.
1. This is an error on our part, we showed the external oscillator circuit just for explanation but we referred to tutorial 1 for configuration bits (header file), in tutorial 1, we used the internal oscillator, so just ignore the external oscillator circuit in this video.
2. For OSCCON value of 0x76, refer to REGISTER 2-2: OSCCON REGISTER section in the datasheet on page 26.
0x76 configure to use 8MHz internal oscillator, see the individual bits we enabled, 0x76 equals to 0b1110110 in binary.
@@StudentCompanion Thank you very much. I got a very quick response. I'm happy.
You are welcome!
hi, kindly help me make a code to make an led chaser. say three leds blinking in sequence . im using pic18f4550.
+Solomon Kojah here is an example of an led chaser:
www.studentcompanion.net/en/connecting-light-emitting-diodes-led-to-a-pic-microcontroller-xc8/
Obrigado pelo tutorial, tem me dado um caminho com o MPLAB XC, eu uso o PIC C compiler e estou tendo algumas dificuldades.
Alexandro Chagas Thank you. We hope you will enjoy learning with MPLAB XC8.
Hello. Your videos have been a great help! Got a question. I see you changed PICs throughout your series. I jus realized this. I was having trouble with memory limits on the PIC18F2220. I see you go to other PIC18F chips. Do you by chance have a recommendation on what chip is the newest or should I focus on with your tutorials? I appreciate any feedback!
thanks a lot
you are welcome!
Hello mate. Is there any different between for ( int countDelay=0; countDelay
What are the advantages or disadvantages of choosing an specific internal crystal frequency? Why did you choose 8MHZ?
There are many considerations.
The internal oscillator circuit is used to generate the device clock. The device clock is required for the device to execute instructions and for the peripherals to function. Every microcontroller needs a clock source. They govern the speed at which the processor executes instructions, the baud rate of serial-communication signals, the amount of time needed to perform an analog-to-digital conversion, type of application, battery powered, physical conditions and much more. So you have to carefully choose the best frequency available depending on your application.
Usually the choice will depend on Power requirements and operating frequency.
The lower the frequency the lower the power consumption which is very good for battery powered applications, the higher the frequency, the higher the power consumption.
If your application does not require high speed in executing its instructions or does not have peripherals which require high speed such as high baud rate of serial-communication, USB, Ethernet, high speed conversion of ADC for example, a low speed can be the choice otherwise you might need high speed. For your information you'll need 48MHz (direct or through PLL) for full speed USB communication. The same goes for other peripherals.
For high accuracy and stability you better consider an external crystal oscillator.
You can read more from these Microchip documents:
ww1.microchip.com/downloads/en/AppNotes/00849a.pdf and ww1.microchip.com/downloads/en/appnotes/00949a.pdf
Hi. What is the programm allows to build different srtucture? I have builded my project but I can not to watch the result. How can I build my own structure? Can someone tells me?
Hi Payrav Nusratov What do you mean by own structure? can you please be specific about your question because it's not clear. Do you mean Simulation?
Hi, I mean how to watch the Simulation result? You debuged the c-code then built the structure of the circuit. Can you show any control circuit using dspic microcontroller? I do not use pic but I use dspic30f4011.
Hi Payrav Nusratov if you are using Proteus software for simulation, there's no difference between the PIC or Dspic. The procedure is the same. Watch our videos to see how we simulated.
U cant damage a LED in Proteus XD. Great tutorial.
If you mean the Proteus simulated LED then you are correct. You can't damage it even if you apply higher current or voltage.
Thank you for watching our videos.
Very educational and helpful. I am working with an older chip, a PIC16F716 and am getting an error: "undefined identifier "LATbits" " when I try to assign LAT4= 1. I am quite new at programming. Can you help?
+Michael Stoltzfus PIC16F series like your PIC16F716 don't have the LAT register, only PIC18F series and higher.
You must use the PORT register to read and to write to outputs
+Michael Stoltzfus and the other thing, you cannot just say LAT4 = 4. LAT of what? You must specify the PORT like PORTB, PORTC etc.
For your case you can write for example:
PORTB = 4; // or
PORTBbits.RB4=1; // for example to output a logic 1 to bit 4 of PORTB
IT WORKS!!!! Thank you so much! =)
Michael Stoltzfus you are welcome!
Best tutorial ever watched, but please, what if i want it to blink like a cylon making the light bouncing back
and forth with 7 LEDs/ 7pins??
+Temitayo Abel Aaaahh! Why add a but....after such a great compliment...?
+Temitayo Abel you can make it blink the way you want. Can you explain more what you mean by light bouncing back? What is the rhythm/patterns of your blinking?
like, make it blink.
10000000
01000000
00100000
00010000
00001000
00000100
00000010
00000001
then go back again.. how do i code this to the port?
+Temitayo Abel you can send those values exactly as they are to the Port. line by line.: for example:
LATB= 0b10000000;
LATB =0b01000000;
....
LATB =0b00000001
Will try that.. Thanks.
Does delay command take longer time than it that is written to source code?
Your question is not clear. What do you mean? If you write a delay of 1 second, it should take 1 second to be executed. If it takes longer or shorter than there is something wrong in your code
@@StudentCompanionSeems like the code that you write takes longer than 1 second in your proteus simulation. I havent written code yet.
Did you look at the simulation execution time? When you run simulation at the bottom bar there is an execution time. Compare that clock with the code, not your PC clock as simulation speed can be effected by many parameters including your computer speed among others.
I am sending the code to a microcontroller PIC18F45K22 mounted on Curiosity/starter kits (PKOB4)
It is a pre-built project, I have hex code.
when I send the code via usb the LED is not blinking not even coming on.
I am using MPLAB X IDE v5.20
What can be the reason?
(I don't know if I have explained my question properly)
Thanks
Are you able to transfer without errors the hex file to your PIC?
What are the build log of your code in Flowcode?
@@StudentCompanion
1. THis is the message I am getting as configuration error but I don't know how to sort it out
error: Configuration "C32_PIC32MX795F512L" builds with "C32", but no toolchains of that type are installed.
Errors have occurred while loading one or more configurations.
If a specific error is not shown above, this may happen when you import a project from another computer.
+ You can add language tools in Tools->Options embedded tab.
+ You can change which language tool to use in the project properties dialog.
2. the build log of code in Flowcode ( I am not sure about this) I have just compiled the hex code and it was showing success at the end.
It looks like you selected a wrong pic or compiler
This is a great tutorial and thank you for the awesome videos. I have a question though. What is the difference between LATBbits.RB0 and LATBbits.LATB0?
Hi. Thanks for watching our videos and for your feedback.
When writing to a PORT like setting it High or Low, use the LAT register. It should be written like this: LATBbits.LATB0
And when you are reading from a PORT, then you must use a PORT register. It should be written like this: PORTBbits.RB0
So for LAT use .LATB0 and for PORT use RB0
You can also use MPLAB Code Configurator to generate code functions and configuration for you and it's easy to use. Watch this video: th-cam.com/video/JxSSVtTj_fA/w-d-xo.html
Thank you for this tutorial, One question, where i can download the software that you use for simulate the circuit with PIC and LED?
Hi, you can download a free demo version from their website. For professional version, you will need to buy a license: www.labcenter.com/
my pic16f87a doesn't have LAT register.
Yes. It's an old PIC it does not have LAT register. Use the PORT register for both reading and writing.
Dear Sir,
Thank you very much for you tutorial.
However Where can I download code for all xc8 tutorial ?.
It look like the link to download page was dead.
Hi. Thanks for watching our videos and for your feedback. You can download the code for all our tutorials from our website:
www.studentcompanion.co.za/category/tutorials/mplab-xc8/
first of all very nice tutorial. And i like the teaching way of yours.
bro i need all the the commands list like the some u showed (@4:37), like _delay_ms, TRISB, LAT etc etc.
bro i want all this command , please share a link or whatever u have.
once again thanks alot for this nice tutorials.
+Shahzad Bhai Hi, thanks for watching our tutorials. Each command depends on what we are trying to achieve in our examples. It will be difficult to tell you all the commands, you can read the datasheet of your PIC or watch more of our videos, or you can visit our website to learn more.
+StudentCompanionSA
Thanks for reply,
now i understand every single step except the "OSCCON=0x76"
how to find OSCCON value, i have seen pic18f2220 data sheet but i cant find its value.
what is the purpose of this command?
and what is the value of OSCCON on other pic's.
+Shahzad Bhai the OSCCON register is used to set the frequency when you are using the internal oscillator of the PIC. in our example we set it to use 8MHz internal oscillator.
+Shahzad Bhai check the PIC18F2220 datasheet on page 26 to learn more. convert this hex number to binary and you'll see the bits we enabled.
+Shahzad Bhai if you still have more questions don't hesitate. it's just a comment away. ...
Where can I find the text u used in the Video?
wonderful way of teaching for bignner like me......can you do a clip for jow to programm PIC18F2423? Please
+Tefera Ergoye what is for jow? I presume you meant to show. As we have said earlier on, you can program this chip exactly the same way as the chips in our tutorials.
+Tefera Ergoye Thank you for watching our videos and we appreciate all your feedback and suggestions.
my delay function is not working .I am getting the error "function without prototype"
Yous must post your full code and full error messages then we could be able to figure out what could be wrong.
Hello! I was watching this series of videos and I found them really useful and clear! But unfortunately I couldn´t find your tutorials sequence chapter by chapter. Are those gone videos gonna be published again in a near future or are they gonna be missing forever? I have to know, please :c
Hi. Thanks for watching our videos and for your feedback. Yes we will publish them again in the near future. Just subscribe to our TH-cam channel and you'll be notified when we upload new tutorials.
hello! in what programming language do you program? C or C++?
We are using C.
Hi this is greet thank you I have a question: how to use a multiple logical or gate?
the pic 16f84a have 2 ports I want to use RA0 as output and the reset as input so any one (input) will activate the output(or gate)
Thank
HI. We don't understand your question, what do you mean by logical or gate? Which pin you want as input?
Hi Thank you all pins as input except the pin RA0 witch is the output
TRISB= 0xFF; //all PORTB pins as input
TRISA= 0x1E; // All PORTA pins as input except RA0 as output
Thank you i want the output to be activated when any one of the input is activated like the
or gate (TTL 7432)
Please watch the rest of the videos and try to understand and learn. You are asking basic questions that are already covered in the videos. We can't answer to each and everyone line of your code when you are not doing any effort to learn.
How to program that MCLR would reset PIC?
1. Connect a push button to the MCLR pin using a pull-up resistor as in the circuit diagram in this tutorial: th-cam.com/video/mUofSucHx_E/w-d-xo.html Watch from 6:11
2. Activate the MCLR function in the configuration bits as in this video: th-cam.com/video/mUofSucHx_E/w-d-xo.html watch from 9:51
Hello when I majke the simulation in ISIS the message display (pic is not supported the program
Hi. Which PIC did you selected in MPLAB X IDE project? And which PIC did you use in Proteus simulation?
@@StudentCompanion i select 16f84A in isis and in mplabx
@@hichamredoine1817 can you post the full error message you received not just a simplified version of the message. Did you use your generated Hex file from your project using poc16f84?
@@StudentCompanionPic16 program filetype'X'
Is not supported
Post your mplab and proteus projects in our forum we will look at it: www.studentcompanion.co.za/forums
Why we used the for loop with the delay_ms
In the earlier versions of XC8 compiler when we recorded that video, the delay function did not allow the use of a large number like 1000 for 1000ms. It generated errors. So we had to use a short delay and loop it several times to achieve the desired delay.
But this has been fixed in the latest compiler version. You now don't need to use the loop.
Got it. Thank you.
Example , plz.
What example?
what country is you?
boa noite, vc faz programas por encomenda?
??
Good evening. Yes we do do.
You can send us your specifications then we will send you a quotation .
What do you mean by ??
Well understood but I want it to blink 3 times and it didn't work;
Am using pic16f877a and this is the code
#include
#include
#include
#define _XTAL_FREQ 8000000
/*
*
*/
int main(void) {
TRISB=0x00;
PORTB=0x00;
int i=0;
int n=1;
while(n
Hi. Why use int main()?
In your code you are not looping 3 times that's why it's not working.
Student Companion what's the problem?
Try something like this:
for (int i 0; i
You are incrementing the wrong counter
Same issue, it's not working
hi bro , thank you for your tutorial , can you give me MPLAB documentation
Hi. Thanks for watching our videos and for your. What kind of documentation you are looking for? In your MPLAB and XC8 compiler installation folder there are documents.
@@StudentCompanion i want to know about documentation which will explain statement in programming
You can read the datasheet of your PIC.
@@StudentCompanion can you replay on facebook for me bro
Please ask your questions here on TH-cam or in the Forum on our website. There you can also upload images or project files. We don't provide support in private messages on Facebook or emails
do you use skype?
Send us a message or call on WhatsApp: +27145945051
th-cam.com/video/SafkRe9MUkk/w-d-xo.html you say 10 amps, i think is 0.010A, if I'm not mistaking
what country is you?
South Africa