Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases

JW-002 (aka HG12603, PJRC) 8x24 Serial LCD Driver

Announcements of new plugins or updates.

Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo

Post Reply
mattcro
Forum Supporter
Posts: 590
Joined: March 8th, 2006, 1:58 pm
Location: Scotland

JW-002 (aka HG12603, PJRC) 8x24 Serial LCD Driver

Post by mattcro »

I've got the driver for my JW002 LCD to a useable state, so on the off-chance that somebody else has one, here's the driver.

Current version 0.4 uploaded 17 Dec 2007. Fixed a cursor positioning bug. See readme.txt in the ZIP for details.

This LCD module is an 8x24 alphanumeric panel originally for AT&T phones but now available surplus and as the LCD for the PJRC MP3 project. I came across one going for next to nothing at a radio/electronics junk sale and thought it could be useful. It connects via a COM port.

For info on the LCD, see:
http://www.btinternet.com/~e2one/lcd/lcd.htm
http://www.btinternet.com/~markd833/LCD/intro.htm
http://www.pjrc.com/store/mp3_display.html
http://www.earthlcd.com/jw002.htm
http://www.techknowman.com/Electronics/ ... eshoot.htm

Incidentally, I started this driver in VC++2005 .NET using various .net classes such as Ports::SerialPort and String but discovered the memory usage was substantial and the CPU usage not particularly good. I've converted the code to old win32 (file handle type serial port access and stdio like Enrico74 and rfryar have used) and it's substantially less resource hungry.

Feedback and comments in this thread please.

Matt
You do not have the required permissions to view the files attached to this post.
Last edited by mattcro on December 17th, 2007, 3:01 pm, edited 3 times in total.
Luccie_007
Posts: 12
Joined: November 23rd, 2005, 7:38 pm

Post by Luccie_007 »

EDIT: Forgot to login so couldnt see your added driver, but have you laready made a newer version?
mattcro
Forum Supporter
Posts: 590
Joined: March 8th, 2006, 1:58 pm
Location: Scotland

Post by mattcro »

Hi Luccie,

I haven't done any more work on the driver since posting this thread (I have other projects on the go) but if there's some interest, I'll add features like buttons, LED as GPO, fix any bugs. I don't plan to have backlight control since there is no backlight as standard. I think the basics of display control are in place.

Do you have one of these LCD modules? I'd appreciate any feedback, bug reports, feature requests here.
Luccie_007
Posts: 12
Joined: November 23rd, 2005, 7:38 pm

Post by Luccie_007 »

Yes ive got one :) Real cheap, :D

I will report any bugs andso on over here.

But how wil i get all lines full? Because LCDSmartie only has 4x40?

I havent tested your driver yet but i will next week.

Do you have msn?
mattcro
Forum Supporter
Posts: 590
Joined: March 8th, 2006, 1:58 pm
Location: Scotland

Post by mattcro »

Yeah, I got mine really cheap too, at an electronics junk sale.

I made the driver use 8 lines of only 20 characters because Smartie doesn't support anything bigger than 4x40 (maybe in future...) and I split the lines in the middle to make 8 lines. That means that there is a space at the right hand side of the LCD which is not used.

I don't think there's much I can do about it for now, except maybe use the middle 20 characters of each line, with a gap of 2 characters at the left and the right. That might look better than a big gap at the right side.

I am sometimes on MSN, usually evenings in UK. See my profile for MSN user name.
Luccie_007
Posts: 12
Joined: November 23rd, 2005, 7:38 pm

Post by Luccie_007 »

Ah i already thought youve tried it like that.

Im from holland so same evening times ;)

But i will test your driver next week :)
minerva9
Posts: 3
Joined: October 6th, 2007, 10:13 am
Location: Glasgow
Contact:

Those last four chars ...

Post by minerva9 »

Matt,

Great to see that you've come up with such an elegant solution to having this neat display supported. I have many of these units & did, many months ago, look at the task of enhancing Smartie to handle 8 lines. I know Delphi a lot better than C.

Sadly, the main Smartie code seems to be predicated upon a max of four lines - this is hardcoded in many places. So, I stopped looking.

I'll try your driver this weekend. I see that your LCD has a PLCC chip that supports 9600baud. If you would like me to flash & send you a 19200 one, let me know.

Derek.
mattcro
Forum Supporter
Posts: 590
Joined: March 8th, 2006, 1:58 pm
Location: Scotland

Post by mattcro »

Hey Derek - someone fairly close geographically! I'd love a 19200baud chip, as the display refresh is fairly slow at 9600baud. I think 19200 is the standard rate for the PJRC firmware, but for some reason mine is 9600, and I got a 4800baud ROM with the unit too. The previous owner had planned to use it with a GPS I think. The chips are both 29F010 devices. Maybe we could exchange a set? I'll probably keep the 4800baud one because I might end up using the LCD as a GPS repeater myself, with microcontroller to format the display.

Much as I'd like to claim credit for it, the 4x40 -> 8x20 conversion idea isn't mine. I think Rick (rfryar) on this forum used it for a large LCD with Smartie. The idea seems to work fine, but it's a bit confusing editing the screens. Perhaps a future version of Smartie will handle arbitrary screen sizes.

I haven't got round to updating my driver yet, apart from shifting the 20 columns to the centre of the display area instead of the left side. It's not so obvious that 4 columns are blank that way. I plan to add button support using the PJRC buttons circuit sometime, plus drive the LED with GPO commands.
mattcro
Forum Supporter
Posts: 590
Joined: March 8th, 2006, 1:58 pm
Location: Scotland

Post by mattcro »

Well, I decided this evening to have a bash at adding button support and controlling the LED as GPO1. I've attached v0.3 to the first post.

The buttons work but it's not the most robust programming... if the LCD is reset while Smartie is running, the buttons stop working and you need to re-load Smartie or restart the driver...
minerva9
Posts: 3
Joined: October 6th, 2007, 10:13 am
Location: Glasgow
Contact:

v0.3 - looking good

Post by minerva9 »

Great job!

Tested v0.3 today at 19200baud. Display driving works well. GPO lights the red LED correctly (tested with a 'if 1=1 then GPO(1,1)' action). However, deleting this action & adding 'if 1=1 then GPO(1,0)' doesn't seem to extinguish the LED on hitting the 'Apply' button.

This does take effect after a restart of Smartie. I have not used Smartie enough to understand when actions actually fire, so it's probably just the way that actions are implemented.

Haven't tried the button handling yet.
mattcro
Forum Supporter
Posts: 590
Joined: March 8th, 2006, 1:58 pm
Location: Scotland

Post by mattcro »

The button handling generally works, but I've had a few glitches with it and managed to lock up Smartie a couple of times... (working on some code mods at the mo). I've got a 3x4 matrix keypad wired up, and the LCD firmware debouncing seems good - it's an old keypad and the contacts are a bit dirty but I haven't noticed any "ghost" keypresses. Before that I just touched a bit of wire on the appropriate connector pins to generate keypresses. I only use the button press events, not release or autorepeat.

The LED seems to be working for me, tested with Winamp status actions (GPO=1 if playing, GPO=0 otherwise). I'm not too sure about the action checks/timing either - I've had a couple of odd situations with it, not detecting changes of conditions etc.

I made the driver turn the LED off when Smartie closes, and it's also turned off as part of the initialisation.

When you get some buttons connected, try using them as triggers for GPO test actions. I just tried GPOFlash triggered by a button and that worked OK.
mattcro
Forum Supporter
Posts: 590
Joined: March 8th, 2006, 1:58 pm
Location: Scotland

Post by mattcro »

Just so you all know... here's what the LCD looks like in my testing setup.
Image

I have a 3x4 matrix keypad (at the right of the pic, and used for Winamp and Smartie theme/screen control) connected to the LCD and it talks to the PC (and LCD Smartie) via a serial port. The Olimex development board at the top of the pic is providing +5V power and the RS232 level conversion (basic MAX232 circuit). No backlight unfortunately, but there's a GPO LED at bottom-right.

And I haven't even used all the lines on the LCD...
Post Reply