PDA

View Full Version : GLCD handling in PBP



spreader
- 13th March 2009, 17:02
Can anyone say if there will be any intention of including GLCD commands in PBP in any future updates? I expect the reason this as not included at the time the compiler was written was because GLCD modules were considered either too expensive or too esoteric for most hobbyists to use. However these modules have proliferated from Chinese manufacturers in the last few months and prices have dropped substantially. Considering that BASCOM compiler users have the luxury of support for a number of graphics displays for AVRs and 8051 mpus, :eek: the same such support for PIC users would be superb.

GregYent
- 16th March 2009, 04:40
I've written routines for a GLCD. They are very controller dependent, ie no two are alike. The LCD command in the existing PICBasic is barely usefull to me, only if I'm "playing" with the X1 protoboard.

I used the Shiftout command, I set up variables per the LCD mfg instructions, and then used a freeware tool to "make" the fonts. These were all stored at the end of the program with Writecode, 3.5K worth. Most GLCD's (bare) don't have fonts. To encode that into PICBasic would be difficult and only possible on the chips with larger (8K) memory. Then people wouldn't like those fonts or that controller, etc. Not worth the engineering time in my opinion. Also, it is easier for YOU to do it than you think.

Also, many LCDs are now serial. So all that is built into the module, again the routines are different for each mfg. It would be like requesting a command for every I2C chip on the market, just too many.

And then you might find that the command is too bloated. I don't use HPWM anymore because it adds dozens of lines and computations to a simple process (once you learn it). Same for ADCIN, BUTTON, TOGGLE, and a few others. I don't mean that I use assembly. Set the CCPCON registers, done in 6 lines.

spreader
- 17th March 2009, 20:41
Thanks for that Greg. I was just curious since I might want to explore the option of using one in a multi-PWM LED controller project. A 4x20 LCD module that has RGB LED backlighting would be lovely. To date I believe Crystalfonz sells a GLCD module with RGB backlight but not a character display (yet). Since my project involves between 10 and 100+ PWM controlled RGB channels, needless to say the more feedback the user has with regard to setting the various colour programs, the better!

bcd
- 17th March 2009, 23:58
Checkout http://www.circuit-ed.com/index.aspx - they have a graphic LCD with RGB backlight for $36us.

I have used it with MikroE basic and it works well (other than missing all the non-GLCD commands I was used to in PBP...)

bill.