Using MPLABX IDE v.5.35 , I receive this error when compiling. What changes would I have to make in order to fix this error? make [2]: *** [nbproject/Makefile-default.mk:139:dist/default/production/proj2.x.production.hex]Error1 This is the code that I added. Please explain and highlight any changes that would need to be made. I am using this code to display the rotation % on the LCD for the PIC16F1829. // Lcd pinout settings sbit LCD_RS at RC0_bit; sbit LCD_EN at RC1_bit; sbit LCD_D7 at RD1_bit; sbit LCD_D6 at RD0_bit; sbit LCD_D5 at RC3_bit; sbit LCD_D4 at RC2_bit; // Pin direction sbit LCD_RS_Direction at TRISC0_bit; sbit LCD_EN_Direction at TRISC1_bit; sbit LCD_D7_Direction at TRISD1_bit; sbit LCD_D6_Direction at TRISD0_bit; sbit LCD_D5_Direction at TRISC3_bit; sbit LCD_D4_Direction at TRISC2_bit; float pot; char pot1[4]; void main() { LCD_init(); Delay_ms(1000); ADC_init(); Delay_ms(1000); Lcd_Cmd(_LCD_CURSOR_OFF); Delay_ms(100); Lcd_Cmd(_LCD_CLEAR); Delay_ms(100); while(1) { pot = ADC_Read(0); Delay_ms(100); if(( pot>0 ) && ( pot<50 )) { LCD_OUT(1,1,"0 %"); Delay_ms(100); } else if(( pot>50 ) && ( pot<100 )) { LCD_OUT(1,1,"10 %"); Delay_ms(100); } else if(( pot>100 ) && ( pot<200 )) { LCD_OUT(1,1,"20 %"); Delay_ms(100); } else if(( pot>200 ) && ( pot<300 )) { LCD_OUT(1,1,"30 %"); Delay_ms(100); } else if(( pot>300 ) && ( pot<400 )) { LCD_OUT(1,1,"40 %"); Delay_ms(100); } else if(( pot>400 ) && ( pot<500 )) { LCD_OUT(1,1,"50 %"); Delay_ms(100); } else if(( pot>500 ) && ( pot<600 )) { LCD_OUT(1,1,"60 %"); Delay_ms(100); } else if(( pot>600 ) && ( pot<700 )) { LCD_OUT(1,1,"70 %"); Delay_ms(100); } else if(( pot>700 ) && ( pot<800 )) { LCD_OUT(1,1,"80 %"); Delay_ms(100); } else if(( pot>800 ) && ( pot<900 )) { LCD_OUT(1,1,"90 %"); Delay_ms(100); } else if( pot>900 ) { LCD_OUT(1,1,"100%"); Delay_ms(100); } } }
Using MPLABX IDE v.5.35 , I receive this error when compiling. What changes would I have to make in order to fix this error?
make [2]: *** [nbproject/Makefile-default.mk:139:dist/default/production/proj2.x.production.hex]Error1
This is the code that I added. Please explain and highlight any changes that would need to be made. I am using this code to display the rotation % on the LCD for the PIC16F1829.
// Lcd pinout settings
sbit LCD_RS at RC0_bit;
sbit LCD_EN at RC1_bit;
sbit LCD_D7 at RD1_bit;
sbit LCD_D6 at RD0_bit;
sbit LCD_D5 at RC3_bit;
sbit LCD_D4 at RC2_bit;
// Pin direction
sbit LCD_RS_Direction at TRISC0_bit;
sbit LCD_EN_Direction at TRISC1_bit;
sbit LCD_D7_Direction at TRISD1_bit;
sbit LCD_D6_Direction at TRISD0_bit;
sbit LCD_D5_Direction at TRISC3_bit;
sbit LCD_D4_Direction at TRISC2_bit;
float pot;
char pot1[4];
void main() {
LCD_init();
Delay_ms(1000);
ADC_init();
Delay_ms(1000);
Lcd_Cmd(_LCD_CURSOR_OFF);
Delay_ms(100);
Lcd_Cmd(_LCD_CLEAR);
Delay_ms(100);
while(1)
{
pot = ADC_Read(0);
Delay_ms(100);
if(( pot>0 ) && ( pot<50 ))
{
LCD_OUT(1,1,"0 %");
Delay_ms(100);
}
else if(( pot>50 ) && ( pot<100 ))
{
LCD_OUT(1,1,"10 %");
Delay_ms(100);
}
else if(( pot>100 ) && ( pot<200 ))
{
LCD_OUT(1,1,"20 %");
Delay_ms(100);
}
else if(( pot>200 ) && ( pot<300 ))
{
LCD_OUT(1,1,"30 %");
Delay_ms(100);
}
else if(( pot>300 ) && ( pot<400 ))
{
LCD_OUT(1,1,"40 %");
Delay_ms(100);
}
else if(( pot>400 ) && ( pot<500 ))
{
LCD_OUT(1,1,"50 %");
Delay_ms(100);
}
else if(( pot>500 ) && ( pot<600 ))
{
LCD_OUT(1,1,"60 %");
Delay_ms(100);
}
else if(( pot>600 ) && ( pot<700 ))
{
LCD_OUT(1,1,"70 %");
Delay_ms(100);
}
else if(( pot>700 ) && ( pot<800 ))
{
LCD_OUT(1,1,"80 %");
Delay_ms(100);
}
else if(( pot>800 ) && ( pot<900 ))
{
LCD_OUT(1,1,"90 %");
Delay_ms(100);
}
else if( pot>900 )
{
LCD_OUT(1,1,"100%");
Delay_ms(100);
}
}
}
Step by step
Solved in 3 steps