Comments on: Using Push Button Switch – MPLAB XC8 https://electrosome.com/switch-pic-microcontroller-mplab-xc8/ You Inspire.....We Create..... Fri, 30 Oct 2020 04:24:29 +0000 hourly 1 https://wordpress.org/?v=6.1.1 By: Ligo George https://electrosome.com/switch-pic-microcontroller-mplab-xc8/#comments/9793 Fri, 30 Oct 2020 04:24:29 +0000 https://electrosome.com/?p=8181#comment-9793 In reply to alireza.

This is a very simple program, and it 100% works.

]]>
By: alireza https://electrosome.com/switch-pic-microcontroller-mplab-xc8/#comments/9792 Thu, 29 Oct 2020 20:58:40 +0000 https://electrosome.com/?p=8181#comment-9792 Hi Sir
i wrote this but it dose not working
when i turn on micro, led is high but i don’t push the switch

]]>
By: kristiano https://electrosome.com/switch-pic-microcontroller-mplab-xc8/#comments/7105 Tue, 05 Jun 2018 21:52:30 +0000 https://electrosome.com/?p=8181#comment-7105 I’m trying to do in pic12f683, I just change RB0 for GP0 ​​and RD0 for GP1 will work? i need to help to work in pic12f683

]]>
By: Ligo George https://electrosome.com/switch-pic-microcontroller-mplab-xc8/#comments/6501 Sun, 27 Nov 2016 08:59:00 +0000 https://electrosome.com/?p=8181#comment-6501 In reply to Md. Aminur Rahman (Sohel).

You might need to add delay in required places.

Kindly use our forums ( https://electrosome.com/forums/ ) for asking doubts outside the scope of above article.

]]>
By: Md. Aminur Rahman (Sohel) https://electrosome.com/switch-pic-microcontroller-mplab-xc8/#comments/6439 Sun, 30 Oct 2016 09:18:00 +0000 https://electrosome.com/?p=8181#comment-6439 we know the processes of continuous monitoring is known as POLLING , but how is it in c code. actually i wanted to make a project that will monitor its input and when the input is high it will send a sms to its given number again when its input is low it will also send a sms to given number. i putted all code in while(1) loop but its continuously sending sms. please help me how can i get rid of from it.

]]>
By: Ligo George https://electrosome.com/switch-pic-microcontroller-mplab-xc8/#comments/6099 Thu, 02 Jun 2016 12:28:00 +0000 https://electrosome.com/?p=8181#comment-6099 In reply to henry2576.

Yes, you can definitely use interrupt for that purpose.
If the polling is fast enough, it will not lose any inputs.

]]>
By: henry2576 https://electrosome.com/switch-pic-microcontroller-mplab-xc8/#comments/6028 Fri, 15 Apr 2016 12:12:00 +0000 https://electrosome.com/?p=8181#comment-6028 Hi, what happens when an input pin receives a short input before the pin is read? is this short input missed or is it held in the port register until its been read and then register is cleared? my problem is I cant afford to lose this input signal as this will stop another process/action taking place, at the moment I’m using an interrupt to ensure this doesn’t get lost but I’m not sure if this is necessary and have limited inputs with interrupts.

]]>
By: Ligo George https://electrosome.com/switch-pic-microcontroller-mplab-xc8/#comments/6015 Fri, 15 Apr 2016 02:36:00 +0000 https://electrosome.com/?p=8181#comment-6015 In reply to Lisa Nielsen Bred.

Don’t you included the header file. Please verify that you selected the correct pic. You can also try PORTBbits.RB0.

]]>
By: Lisa Nielsen Bred https://electrosome.com/switch-pic-microcontroller-mplab-xc8/#comments/5973 Mon, 04 Apr 2016 08:25:00 +0000 https://electrosome.com/?p=8181#comment-5973 Hello. I’m getting a “newmain1.c:20: error: (192) undefined identifier “RB0″” error. What can I write instead of RB0? Or do I have to define it?

]]>
By: Ligo George https://electrosome.com/switch-pic-microcontroller-mplab-xc8/#comments/5859 Sat, 27 Feb 2016 14:21:00 +0000 https://electrosome.com/?p=8181#comment-5859 In reply to Nuzly Nuz.

PORTA and PORTE are multiplexed with analog inputs. So you need to define those pins are digital by writing to ADCON1 or ANSEL registers.

]]>