bugAVR C Runtime Library - Bugs: bug #16125, HD44780 data bit assignment...

 
 

bug #16125: HD44780 data bit assignment restrictive

Submitted by:  None
Submitted on:  Sun 19 Mar 2006 12:19:39 AM UTC  
 
Category: LibrarySeverity: 3 - Normal
Priority: 7 - HighItem Group: None
Status: FixedPercent Complete: 0%
Assigned to: Joerg Wunsch <joerg_wunsch>Originator Email: -unavailable-
Open/Closed: ClosedRelease: None
Fixed Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 19 Mar 2006 12:19:39 AM UTC, original submission:

As written, the four data bits of a HD44780 are restricted to bits 0 - 3. A small change can allow the low bit to be set to anywhere from bit 0 to bit 4 (with the other three bits just above the low bit). The four bits will still be restricted to being consecutive and sequential, but since this is the logical thing to do, it shouldn't be a problem.

The code would need to be changed in two places:

In hd44780_outnibble(), the line:

x = (HD44780_PORTOUT & ~HD44780_DATABITS) | (n & HD44780_DATABITS);

should be changed to:

x = (HD44780_PORTOUT & ~HD44780_DATABITS) | ( (n << HD44780_D4) & HD44780_DATABITS);

and in hd44780_innibble(), the line:

return x & HD44780_DATABITS;

should be changed to:

return x >> HD44780_D4;

It might also be wise to only allow the definition of the low bit, since the others are forced in relation to it anyways. If this is done, then the line:

#define HD44780_DATABITS \
(_BV(HD44780_D4)|_BV(HD44780_D5)|_BV(HD44780_D6)|_BV(HD44780_D7))

would have to be changed appropriately (and possibly some sanity checks).

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 6 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sun 08 Oct 2006 09:49:29 PM UTCjoerg_wunschStatusNone=>Fixed
  Open/ClosedOpen=>Closed
Mon 04 Sep 2006 09:46:04 PM UTCjoerg_wunschPriority3 - Low=>7 - High
Wed 19 Apr 2006 08:55:29 PM UTCjoerg_wunschPriority5 - Normal=>3 - Low
  Assigned toNone=>joerg_wunsch
Sun 19 Mar 2006 12:19:40 AM UTCNoneCarbon-Copy-=>Added koshchi --AT-- shaw --DOT-- ca

Back to the top


Powered by Savane 3.1-cleanup1