Hi Jason,

I have not used the PIC port of SDCC yet. But I believe what I am writing
is valid for PIC as well.

The 'puts' function works by calling 'putchar' repeatedly. However, the
'putchar' function is not defined in the SDCC library, because SDCC does
not know anything about the 'terminal' you are using in your project. So
you have to write your own definition of 'putchar'.

In your program, there is no 'putchar' function (and you are not using
'puts' anyway). So please post the code where you used 'puts' function,
along with the code of 'putchar'.

It is worth mentioning that by definition, the 'puts' function prints a
'new line' (i.e. '\n' in C) at the end.

Cheers,
Krish

On Mon, Nov 7, 2011 at 9:33 AM, Jason White <
whitewaterssoftwarei...@gmail.com> wrote:

> Hello, I am writing a program (using SDCC) for the pic16f887, it is
> driving a Hitachi HD44780 character LCD. In the code I am trying to write
> characters to the LCD. First: directly 1 character at a time and then
> Second: using what is essentially the puts function (void puts_lcd(char
> *s)). The puts function fails to send anything more than the first
> character. What am I doing wrong ? or is it a compiler error ? relevant
> files are attached. Thanks ...
>
> >void puts_lcd (char *s)
> >{
> >    REG_SEL=1;
> >
> >    while (*s)
> >    {
> >        lcd_command(*s++);
> >    }
> >
> >    REG_SEL=0;
> >}
>
> --
> Jason White
>
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> Sdcc-user mailing list
> Sdcc-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sdcc-user
>
>


-- 
Krishnendu Chatterjee
Research Scholar
IIT Delhi
India
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to