LCD graphics controller wi th RS232 lonk to PC

LCD graphics modules are not always easy to drive. Sometimes you have an embedded processor system X, and writing yet an other driver for the LCD module may suck. It may also suck if the LCD display has to be far away from the PC, say several meters.

To solve that, I programmed a Microchip PIC 18F14K22 as graphics controller for a 128x64 HG1286418C graphics LCD module. It is controlled via RS232 at 115200 Baud. So you only need a simple cable (no return data needed), and a transistor, diode, and resistor to interface the RS232 to the PIC serial input

I designed a protocol that only uses 2 bytes per pixel to transfer data to the LCD. Also added a character generator in the PIC.

You can watch the video of the PC sending graphics data to the LCD here:

formatting link

More info on this page:

formatting link

I may want to sell pre-programmed, read protected PICs if people are interested. A driver example in C for the PC (the one from youtube) is available for buyers.

Reply to
Jan Panteltje
Loading thread data ...

I noticed Parallax makes asynchronous serial interfaced LCDs for use with their BASIC stamp stuff. Hard to beat 'PRINT #1, "Hello World"' (or however exactly they write it for a serial transfer) for a microcontroller.

Tim

-- Deep Friar: a very philosophical monk. Website:

formatting link

Reply to
Tim Williams

On a sunny day (Sun, 14 Mar 2010 19:53:33 -0500) it happened "Tim Williams" wrote in :

Maybe, but try to plot a cicle, flash a whole screen, plot a waveform, add text to it, etc, FAST. And nobody uses BASIC these days :-)

I now have the following C funtions;

int lcd_plot(int x, int y, int color) /* plots a dot on LCD at position x, y, if color = 1, black, if color is 0 white dots, returns 0 if x or y out of range, 1 if OK */ int lcd_print_pos(int x, int y) /* set plot position to x (0 - 123) , y (0 - 63), return 0 if x or y out of range, 1 if OK */ void lcd_print_char(int c) /* print character c on LCD at position x, y */ int lcd_print_string(int x, int y, char *text) /* prints 0 terminated string at position x, y , return 0 if x or y out of range, if text is a zero pointer, or text has zero length, 1 if OK */ void lcd_cls() /* clear screen LCD */ void lcd_on() /* switches LCD display on */ void lcd_off() /* swicthes LCD display off */

Will perhaps add void lcd_backlight_on() and void lcd_backlight_off() or maybe void lcd_backlight(int brightness) using PWM.

There is also things like void lcd_circle(int x, int y, int radius, int color) /* plots a circle on LCD at position x, y, with radius radius, if color = 1, black, if color is 0 white dots */ but those are higher level routines users should make themselves, that was just for the demo.

Try to beat this with BASIC: lcd_print_string(0, 0, "Hello world");

Or, the better way, with parameter check and error report: if(! lcd_print_string(x, y, "Hello world") ) { fprintf(stderr, "lcd_print_string(): x=%d y=%d parameter out of range, aborting.\n", x, y); exit(1); }

It is C, it is only limited by the imagination.

Reply to
Jan Panteltje

Nobody? I claim to use basic...

Depends on how many you want and how you want it packaged, but a $1 palm pilot (25-cents if you don't need color) makes a dandy display for a serial-connected PIC. And you can let the Palm do the heavy lifting, graphics, user input, storage, etc. and leave the realtime stuff to the PIC. And your projects don't need buttons or displays. Much easier/cheaper to construct that gadget you use infrequently. YMMV

position x, y, if color = 1, black, if color is 0 white dots, returns 0 if x or y out of range, 1 if OK */

x (0 - 123) , y (0 - 63), return 0 if x or y out of range, 1 if OK */

LCD at position x, y */

string at position x, y , return 0 if x or y out of range, if text is a zero pointer, or text has zero length, 1 if OK */

on */

off */

at position x, y, with radius radius, if color = 1, black, if color is 0 white dots */

just for the demo.

"lcd_print_string(): x=%d y=%d parameter out of range, aborting.\n", x, y); exit(1); }

Reply to
mike

On a sunny day (Mon, 15 Mar 2010 16:38:36 -0700) it happened mike wrote in :

Where does one get 1$ palm pilots? ;-)

Reply to
Jan Panteltje

In civilized countries, of course.

--
Lead free solder is Belgium's version of 'Hold my beer and watch this!'
Reply to
Michael A. Terrell

garage sales, swapmeets, craigslist, junk dealers, They're everywhere.

Reply to
mike

Just don't depend on getting one when you need it.

Other than that, they're everywhere.

hamilton

Reply to
hamilton

On a sunny day (Wed, 24 Mar 2010 11:42:52 -0700) it happened mike wrote in :

OK, junk... What would you do if your next Tek equipment came with a voucher for a Palm Pilot as user interface or display?

I agree that modular thinking will make many things possible, for example there is a model helicopter project in the make, controlled by an Apple Iphone. From a price POV a very expensive solution for a very expensive toy. I do not think the Palm Pilot can display dots at x,y at 115200 Bd, it would need significant programming, on an OS I do not know about, perhaps in 68xxx asm that has been dead and I have no tools for, so fine for some toys, but not a good solution if you just want to include a graphics display in your design.

Reply to
Jan Panteltje

These guys are infamous for sticking off-the-shelf PDAs/UMPCs/etc. into another case that, together, makes it into a piece of test equipment:

formatting link

I know I've seen someone doing that with a Palm Pilot for a spectrum analyzer as well...

Reply to
Joel Koltner

Why? If it's something you already own or can obtain for almost nothing and it gets the job done with no more effort than purchasing something newer, who cares if in the grand scheme of things it's obsolete?

Reply to
Joel Koltner

Using a off-the-shelf hardware solution if fine, if that hardware is currently available.

Starting with an obsolete device is just dumb, even for a one-off project.

hamilton

Reply to
hamilton

I think the term product got lost here.

Doing a project for myself is one thing, selling it as a product is another.

Would you buy a new product with a Palm Pilot in it ??

hamilton

Reply to
hamilton

That would depend on what it was, and what it was used for.

Would you buy a piece of lab gear built from all used parts? I've sold some, and they were tickled to get it. On was a one input, 32 output 10 MHz distribution amplifier for the in house frequency standard at a small electronics manufacturing company. They got it for about

1/40th of the price on a new unit with 20 outputs.
--
Lead free solder is Belgium's version of 'Hold my beer and watch this!'
Reply to
Michael A. Terrell

The key is PLANNING. If you find one for under a dollar, buy it. I've got six Palm IIIC's. Don't expect I'm ever gonna need more than that, but I'll buy as many as pop up. Yep, have a couple of bux invested that I can't use for other toys.

Reply to
mike

Pilot as user interface or display?

If it was a wireless remote display that worked for a bunch of different stuff. If it was fully supported for the long term. If it saved me SUBSTANTIAL $$$ and/or time. Sure!

Apple Iphone.

graphics display in your design.

Maybe the difference is that I want to design simple projects to do a specific job...for me. You want to sell me something that's overkill for my particular job.

For a one-off simple project, it's a no-brainer. I can get graphical user interface graphical user output, easily change/evolve the design. I don't plan to cut a hole for a pushbutton or readout ever again. I can be done with the task before the overnight shipment of parts arrives for a dedicated display.

Reply to
mike

Just to understand the goal here,

are these going to be used in a salable product ??

Or are you just hoarding junk ??

hamilton

Reply to
hamilton

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.