Searching \ for '[AVR]: strange if sentence' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=strange+sentence
Search entire site for: 'strange if sentence'.

Exact match. Not showing close matches.
PICList Thread
'[AVR]: strange if sentence'
2001\05\01@161342 by Marco Trapanese

flavicon
face
Hi!
Under here I reported a very simple code which should write on LCD 'A' if pind(1) is pressed and 'B' if pind(2) is pressed. When I try it, if I press the same switch more times, character on LCD change!!!
I don't understand why. Could anyone suggest me anything ?

thx,
Marco Trapanese

---
e-mail: spam_OUTmarcotrapaneseTakeThisOuTspamtin.it
web: http://members.xoom.it/m_trapanese


*** C code ***

#include <lcdstk.h>
#include <90s8515.h>

void main(void)
{
   DDRD.1=0;
   DDRD.2=0;
   lcd_init(16);
   lcd_clear();
   while (1)
   {
       if (PIND.1)
       {
           lcd_gotoxy(0, 0);
           lcd_putsf("A");
       }
       if (PIND.2)
       {
           lcd_gotoxy(0, 0);
           lcd_putsf("B");
       }
   };
}

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam@spam@mitvma.mit.edu


2001\05\02@094241 by Michael Rigby-Jones

flavicon
face
Does your lcd_putsf function poll the LCD's busy flag?  If not you may be
trying to write to the LCD while it's still processing a previous command.

Mike

> {Original Message removed}

2001\05\02@094653 by Marco Trapanese

flavicon
face
> Does your lcd_putsf function poll the LCD's busy flag?  If not you may be
> trying to write to the LCD while it's still processing a previous command.
>
> Mike

thanks for answer !!!
I solved the problem, there was a problem in lcd_putsf function and also in
hardware input pins.

best regards,
Marco Trapanese

---
e-mail: marcotrapanesespamKILLspamtin.it
web: http://members.xoom.it/m_trapanese

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...