Hi this is balaji
I am new Lerner on pic controller i am design and program for water level cintroler but problem is I have loaded the program reset button press 3or more time the program works .what is the problem please help me.
Can you please provide more details? Is it only the first time you run the program you need to keep hitting reset or every time you power up? Is everything else working?
A schematic may help here if it shows how this reset button works.
as per your suggestion i have to change 1k to 10 k. but problem is in portA pin con't read the digital inputs.
PORTA is pull up with 10K
case1: PORT A = 0X00 moter off
case2: PORTA = 0XFF moter on
// Lcd pinout settings
sbit LCD_RS at RB2_bit;
sbit LCD_EN at RB3_bit;
sbit LCD_D7 at RB7_bit;
sbit LCD_D6 at RB6_bit;
sbit LCD_D5 at RB5_bit;
sbit LCD_D4 at RB4_bit;
// Pin direction
sbit LCD_RS_Direction at TRISB2_bit;
sbit LCD_EN_Direction at TRISB3_bit;
sbit LCD_D7_Direction at TRISB7_bit;
sbit LCD_D6_Direction at TRISB6_bit;
sbit LCD_D5_Direction at TRISB5_bit;
sbit LCD_D4_Direction at TRISB4_bit;
//connection end
#pragma config PWRT = ON
#pragma config MCLR = ON
void main()
{
You test on portA all BITS high or low is that what you want?
If you only want to test one port you should address it like PORTAbits.RA0 or depending at compiler RA0 ( 0 is wanted Pin)