From: Bill P. <goa...@ya...> - 2004-01-31 12:07:58
|
Hi again, Yes I much prefer them to LCDs but they are very expensive. That is changing, though. These specific modules you can see at: http://www.noritake-elec.com/uversion.htm Sure thing. Already done. Easy as you say. I was asking because it does deviate from 'normal' HD44780 if you preferred having another driver or just sticking this function into the stock one. Here is snippet against v1.50 from yesterday: --- HD44780.c.original +++ HD44780.c @@ -573,4 +573,16 @@ HD_clear(1); + +// Change Noritake CU series VFD brightness level + char tmpbuffer[2]; + int cu_vfd_brightness; + if (cfg_number("CU_VFD_Brightness", 0, 0, 3, &cu_vfd_brightness)<0) return -1; + if (cu_vfd_brightness) { + snprintf (tmpbuffer, 2, "\%o", cu_vfd_brightness); + HD_command (0x03, 0x38, T_EXEC); // enable function + HD_write (0x03, tmpbuffer, 1, T_WRCG); // set brightness + info ("HD44780: Noritake CU VFD detected. Brightness = %d (0-3)", cu_vfd_brightness); + info (" Settings: 0=100\%, 1=75\%, 2=50\%, 3=25\%"); + } return 0; ### snip ### I just stuck it at the end of HD_init, feel free to do whatever. Thanks, -BP PS: I edited your banner logo to emulate a character VFD. I've seen .sigs this big so I don't feel guilty. :-) begin-base64 640 vfdlcd4linuxlogo31.png iVBORw0KGgoAAAANSUhEUgAAAN0AAAApBAMAAABD6TEmAAAAD1BMVEUAAAAA /+EBPzVSIT9SRFywh+ewAAAA5ElEQVR4nO1W0QnFIAzUbpAVOkGLHaH7z/QI R4haFS08nzzN/RzhSjgT0hizYkVTWNp2wJhtt8RgLgx5huR9PbKqKXNjnDvp ugHnrvskBnNhyDMk7+uRVU2ZH939/bZ/wi0JhyewtL8WPkO9EfoXe4XPlD+d YcxzqNF3Ap+h3oj982c1t19ynvy3ifdnip8kvLw/n3pwKPBtvD+/72/U/gne +FPNDPVG6F/q/9A+n3iPeD7/vV7//uns1d1nOX24U+Aq/j/IncmovT9z+nBn YmuG+aO7v/4h0/bm3mrlM9RbsaI6PsjBsvOqrlHaAAAAAElFTkSuQmCC ==== --- Michael Reinelt <re...@eu...> wrote: > Hi Bill, > > > I have a question on how things that slightly deviate from standard should be done. > > For example the CU series VFDs from Noritake/Itron. They are HD44780 compatible but > > contrast doesn't exist - Pin 3 goes nowhere. It's a brightness setting in software. > Never heard of these displays. Do you own such a thing? > > > The relevant bits are R/W low, RS high, and put 0x00h-0x03h on the pins for 4 levels of > > brightness. Add a cfg_number "VFDBrightness" (or whatever) entry, the sprintf and the > > HD_write call and that's it. > Should be easy to implement, indeed. > > > It seems redundant duplicating the HD44780 driver for a slight variant. > Of course not, you are right. As things like "Contrast", "Brightness" > and so on are generally implemented as "plugins" and not hardcoded, we > can register any function we want to. > > If you have access to such a display, would you be willing to implement > this feature? > > bye, Michael > __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! http://webhosting.yahoo.com/ps/sb/ |