On 20-05-15 11:20, hernani wrote:
hello,
i have this code and give me this errors--->
i put line numbers and bold where give me errors
5.c:53: warning: warning 112: function 'Delay_ms' implicit declaration
This is the first error and it says that Delay_ms is declared here
implicitly (no former declaration of Delay_ms was found) Too many
parameters is caused by this too (no declaration of Delay_ms let alone
its parameters)..
Where is Delay_ms defined in your code ?
Gert
5.c:53: error: 101: too many parameters
5.c:91: warning: warning 112: function 'Delay_ms' implicit declaration
5.c:88: error: 25: Structure/Union expected left of '.->'
5.c:89: error: 25: Structure/Union expected left of '.->'
5.c:90: error: 25: Structure/Union expected left of '.->'
5.c:91: error: 101: too many parameters
5.c:92: error: 25: Structure/Union expected left of '.->'
5.c:101: warning: warning 112: function 'Delay_ms' implicit declaration
5.c:98: error: 25: Structure/Union expected left of '.->'
5.c:99: error: 25: Structure/Union expected left of '.->'
5.c:100: error: 25: Structure/Union expected left of '.->'
5.c:101: error: 101: too many parameters
5.c:102: error: 25: Structure/Union expected left of '.->'
--------------------------------------------------------------------- */
/* Template source file generated by piklab */
#include <pic18f4550.h>
/*
-----------------------------------------------------------------------
*/
/* Configuration bits: adapt to your setup and needs */
// Program to interface 16x2 LCD with PIC18F4550 Microcontroller
using 4-bit mode
// Configuration bits
/* _CPUDIV_OSC1_PLL2_1L, // Divide clock by 2
_FOSC_HS_1H, // Select High Speed (HS) oscillator
_WDT_OFF_2H, // Watchdog Timer off
MCLRE_ON_3H // Master Clear on
*/
//LCD Control pins
#define rs LATA.F0
#define rw LATA.F1
#define en LATA.F2
//LCD Data pins
#define lcdport LATB
void lcd_ini();
void dis_cmd(unsigned char);
void dis_data(unsigned char);
void lcdcmd(unsigned char);
void lcddata(unsigned char);
void main(void)
{
unsigned char data0[]="EngineersGarage";
unsigned int i=0;
TRISB=0; // Configure Port B as output port
LATB=0;
lcd_ini(); // LCD initialization
while(data0[i]!='\0')
{
dis_data(data0[i]);
*53-> Delay_ms(200);*
i++;
}
}
void lcd_ini()
{
dis_cmd(0x02); // To initialize LCD in 4-bit mode.
dis_cmd(0x28); // To initialize LCD in 2 lines, 5x7 dots and 4bit mode.
dis_cmd(0x0C);
dis_cmd(0x06);
dis_cmd(0x80);
}
void dis_cmd(unsigned char cmd_value)
{
unsigned char cmd_value1;
cmd_value1 = (cmd_value & 0xF0); // Mask lower nibble because RB4-RB7
pins are being used
lcdcmd(cmd_value1); // Send to LCD
cmd_value1 = ((cmd_value<<4) & 0xF0); // Shift 4-bit and mask
lcdcmd(cmd_value1); // Send to LCD
}
void dis_data(unsigned char data_value)
{
unsigned char data_value1;
data_value1=(data_value&0xF0);
lcddata(data_value1);
data_value1=((data_value<<4)&0xF0);
lcddata(data_value1);
}
void lcdcmd(unsigned char cmdout)
{
lcdport=cmdout; //Send command to lcdport=PORTB
*8**8**-> rs=0; **
**89-> rw=0;**
**90-> en=1;**
**91-> Delay_ms(10);**
**92**->**en=0;*
}
void lcddata(unsigned char dataout)
{
lcdport=dataout; //Send data to lcdport=PORTB
*98-> rs=1;**
**99-> rw=0;**
**100-> en=1;**
**101-> Delay_ms(10);**
**102-> en=0;*
}
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user