SX28 Parallel to 2X40 LCD
Hi Guys
Does anyone have some simple SXBasic code to write a line of text from an SX28 to a 4 or 8 bit parallel 2X20 LCD. I’ve been battling with the example in the help menu as well as two of the VPs. I am a simple soul and I'm getting·very confused.
I need to display a couple of different messages depending on three inputs. I'll store the messages as DATA
Kind regards from Kwa Dukuza
John Bond
Does anyone have some simple SXBasic code to write a line of text from an SX28 to a 4 or 8 bit parallel 2X20 LCD. I’ve been battling with the example in the help menu as well as two of the VPs. I am a simple soul and I'm getting·very confused.
I need to display a couple of different messages depending on three inputs. I'll store the messages as DATA
Kind regards from Kwa Dukuza
John Bond
Comments
As for actual code, I'll have to check for differences between PBASIC and SX/B, maybe I can give you mine. It's not exactly optimized, though.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chicks dig nerds... but not until after the prom.
Look in the SX/B help under Example Project->Serial LCD
It's kind of misleading, the project is a serial interface to a parallel LCD.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
"I reject my reality, and substitute yours." NOT Mythbusters
·
http://forums.parallax.com/showthread.php?p=591741
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
stand back! I have a slide rule and I know how to use it!
Thanks for your quick response...
1. The SX is a bit different to BS2. For starters, it seems like you pass veriable to your SUBs rather than just using variables I regard myself as very proficiant on Stamp2s and LCDs, thats why I'm so frustrated...
2. I said in my intro - I’ve been battling with the example in the help menu - I meant the SXHelp Menu examples. Ive stripped out the UART from the example and the remaining code doesn't work.
3. Dunnsept, thanks for the pointer to that code. The code is for LCDs with a totally different interface from the traditional LCD (2 reset pins but only 3 data pins!) but this may give me some direction on how to do it. The code is VERY WELL DOCUMENTED
Thanks John Couture for such well documented code - 17 pages in all
Kind regards
John Bond
I converted the Parallax 2x16 BS2 code to my 2x12 LCD.
Keep in mind you need to hook up the LCD for 4 bits as in the Parallax documentation...
Besides that E goes to RB.0, RW to RB.2, RS to RB.3 and the four databits are RB.4 to RB.7...
Have fun...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Living on the planet Earth might be expensive but it includes a free trip around the sun every year...
Experience level:
[noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
[noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
[noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
[noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
[noparse][[/noparse] ] I dream in SX28 assembler...
/Bamse
also just in case I missed it, all of the code, as far as I know, is going to be for a hitachi HD44780 controller. as long as your LCD has that chip or a compatible one, you should be set.
bamse's code is similar to mine and should work just fine for you as we both converted existing pbasic code
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
stand back! I have a slide rule and I know how to use it!
As the Zulus round here would say "You are a mamba, Ngiabonga baba". It seems strange to pay you a compliment by calling you a snake and then thank you as an ancient man (baba) but I assure you it's the highest compliment I can pay you.
Hey Dunnsept, Do you really have a slide rule... I chucked mine out about 5 years ago but I still have my 50 year old Facit crank (mechanical) calculator. I've forgotten how to devide on it though.
Thanks for all the help and kind regards from Darkest Africa
John Bond
I'm not as stupid as I thought - The LCD is a NoNameBrand of a type I've not used before and the protocol is a bit different (We never get the spec sheets...). The moment I had code that I knew worked, it took me 15 minutes to find the problem.
Maybe I should have got it working on a BS2 first.
Thanks again
John