Hello, You probably know this but... I assume you are reading the PINx bit rather than the PORTx bit on input of data. (After changing the DDRx, of course.) I always seem to forget to do this since I've always done so much Moto stuff in the past. It has got me a number of times. Jim ----- Original Message ----- From: "billsputters" <richardaustin@eircom.net> To: <AVR-Chat@yahoogroups.com> Sent: Tuesday, January 23, 2007 1:02 PM Subject: [AVR-Chat] Changing ports from output to input What is the considered wisdom regarding changing a port from output to input? I am trying to interface to a LCD display and attempting to read the busy flag which is available on the data lines of the device. I've looked around and some code just changes the DDR as required and some set the outputs of the port to all 0's before this so as not to get a flase reading. Is this a belts and braces approach or a requirement. BTW, I've tried both versions of changing the port over and the LCD does not function how I want, but it's a case of eliminating errors. Thanks in advance.
Message
Re: [AVR-Chat] Changing ports from output to input
2007-01-24 by James Hatley
Attachments
- No local attachments were found for this message.