Offline
Full Member
Karma: 0
Posts: 106
look at this might be intresting: http://www.youtube.com/user/Shockszzbyyous and my Website: freeduality.tk
|
 |
« on: December 22, 2011, 02:09:58 pm » |
Hi all, thought I might share my project with the world, and with you all, since this is the section that goes about Displays, http://tkkrlab.nl/wiki/Lcd_through_IOexpanderComplete with example code and library  The library is not finished yet, so report anything you'd like to see added, and any tips are welcome! Hope it's useful, Greetings, Duality ps. also if wrong subforum to post on sorry 
|
|
|
|
|
Logged
|
|
|
|
|
Central MN, USA
Offline
Faraday Member
Karma: 38
Posts: 6050
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
|
 |
« Reply #1 on: December 22, 2011, 04:28:30 pm » |
Here's a version made by a forum member fm: http://www.electrofunltd.com/p/pedidos.htmlLook at the bottom of the page. Might be useful for you to compare your implementation with hers.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Full Member
Karma: 0
Posts: 106
look at this might be intresting: http://www.youtube.com/user/Shockszzbyyous and my Website: freeduality.tk
|
 |
« Reply #2 on: December 25, 2011, 12:52:57 pm » |
Yes I will take a look at it  I've been in contact with here, but that was just regarding the code, But i'll have a look that the hardware, looks nice small and snug  this will do able with the ic's I use, because they also available in smd. Greetings, Duality
|
|
|
|
|
Logged
|
|
|
|
|
Dallas, TX USA
Offline
Edison Member
Karma: 27
Posts: 1657
|
 |
« Reply #3 on: December 25, 2011, 08:51:44 pm » |
Duality, Have a look a fm's LiquidCrystal replacement library. https://bitbucket.org/fmalpartida/new-liquidcrystal/downloadsIt should be a drop in for your implementation. For a slight cost savings you can use a MPC23008 and 4bit mode on the lcd. Here is a hd44780 backpack that uses the MPC23008: https://www.adafruit.com/products/292It also supports controlling the backlight through the i/o expander. --- bill
|
|
|
|
« Last Edit: December 25, 2011, 09:01:35 pm by bperrybap »
|
Logged
|
|
|
|
|
Offline
Full Member
Karma: 0
Posts: 106
look at this might be intresting: http://www.youtube.com/user/Shockszzbyyous and my Website: freeduality.tk
|
 |
« Reply #4 on: December 29, 2011, 08:28:17 am » |
4 bit is no option for me 
|
|
|
|
|
Logged
|
|
|
|
|
Dallas, TX USA
Offline
Edison Member
Karma: 27
Posts: 1657
|
 |
« Reply #5 on: December 29, 2011, 01:00:15 pm » |
4 bit is no option for me  Why not? For a hd44780 it is 4 less pins to hook up. Using 4 bit mode allows the lcd to be controlled by a single 8 bit port and still have 2 bits in the 8 bit port left over for things like backlight control. (Just add a transistor) It would allow the lcd to be controlled through 1 of the 8 bit ports on the 23016 (say GP0) and keep the full 8 bits of the other port (GP1) free for other uses. 4 bit mode would also allow using a smaller cheaper 8 bit i/o expander like the 23008 instead of the dual port 23016. --- bill
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Full Member
Karma: 0
Posts: 106
look at this might be intresting: http://www.youtube.com/user/Shockszzbyyous and my Website: freeduality.tk
|
 |
« Reply #6 on: January 13, 2012, 11:08:13 am » |
What I meant was, that 4bit was not an option, since I had some timeing iseus and data getting lost, which I don't have anymore since I use 8Bit more over yes I could build in a 4 bit option though  , I'll work that out later, bussy making the library arduino1.0 compatible 
|
|
|
|
|
Logged
|
|
|
|
|
Western New York, USA
Offline
Faraday Member
Karma: 17
Posts: 3507
|
 |
« Reply #7 on: January 13, 2012, 06:03:39 pm » |
I'll work that out later, bussy making the library arduino1.0 compatible While you are at it why don't you change the initialization sequence to comply with the steps specified by Hitachi?Don
|
|
|
|
|
Logged
|
|
|
|
|
Western New York, USA
Offline
Faraday Member
Karma: 17
Posts: 3507
|
 |
« Reply #8 on: January 13, 2012, 06:15:00 pm » |
...since I had some timeing iseus and data getting lost Probably because you are not following the requirements of the data sheet. You are using the same delay for all of the commands even though some of them require significantly more time than others. Also, you are not accounting for the fact that some LCDs may run slower than the nominal speed upon which the datasheet times are based. The 4-bit mode seems to be more sensitive to these discrepancies which could be why your 8-bit code appears to work.Don
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Full Member
Karma: 0
Posts: 106
look at this might be intresting: http://www.youtube.com/user/Shockszzbyyous and my Website: freeduality.tk
|
 |
« Reply #9 on: January 14, 2012, 09:25:16 am » |
yes, i had these issue's before i even made the circuit, had 4 bit issue's when hooked up to the arduino directly  hey I thought i had made it like the datasheet lol, nope copied the initialization part from Liquid Crystal, does that not work? Beside's I had removed the delay and worked just fine, but didn't save the source, Greetings, Duality
|
|
|
|
|
Logged
|
|
|
|
|
Western New York, USA
Offline
Faraday Member
Karma: 17
Posts: 3507
|
 |
« Reply #10 on: January 14, 2012, 10:05:10 am » |
hey I thought i had made it like the datasheet lol, nope copied the initialization part from Liquid Crystal, does that not work? You didn't copy it from any version of LiquidCrystal that I recall. Their current code isn't correct either, but it is closer to being correct than yours. Why don't you take a few minutes and follow the LCD Initialization link at http://web.alfredstate.edu/weimandn ?Beside's I had removed the delay and worked just fine, ... AARRGGHH. So it worked just fine on the particular display(s) that you tested it on and therefore you believe that it will work on all displays. Go back and take a look at the section called "About the Delays" at the end of the link posted above.Don
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Full Member
Karma: 0
Posts: 106
look at this might be intresting: http://www.youtube.com/user/Shockszzbyyous and my Website: freeduality.tk
|
 |
« Reply #11 on: January 15, 2012, 08:42:54 am » |
No, I tested it with the Hitachi HD44780, And works, don't worry the library is still in early stage's  There is waay room for improvement, and I appreciate your tips and help, And i'll try to make the library more efficient and better. Greetings, Duality
|
|
|
|
|
Logged
|
|
|
|
|
Western New York, USA
Offline
Faraday Member
Karma: 17
Posts: 3507
|
 |
« Reply #12 on: January 15, 2012, 09:24:01 am » |
I tested it with the Hitachi HD44780, And works, You tested it with one HD44780 and it works. How about all the other HD44780s that are out there?Don
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Full Member
Karma: 0
Posts: 106
look at this might be intresting: http://www.youtube.com/user/Shockszzbyyous and my Website: freeduality.tk
|
 |
« Reply #13 on: January 24, 2012, 12:32:13 pm » |
Why does it matter? isn't it the same hardware? Or is there something i am not seeing?
|
|
|
|
|
Logged
|
|
|
|
|
Dallas, TX USA
Offline
Edison Member
Karma: 27
Posts: 1657
|
 |
« Reply #14 on: January 24, 2012, 12:56:25 pm » |
Why does it matter?
yes isn't it the same hardware? No Or is there something i am not seeing? Yes, It is kind of like saying all cars in the US have a steering wheel on the left and a foot pedal on the right of the foot pedals to control speed and a brake to the left of that pedal to slow down. You interface to them the same, but Do they all accelerate and brake the same? No. Not all "hd44780" based modules are the same speed at processing commands as they are not all using the design or the same chips. --- bill
|
|
|
|
|
Logged
|
|
|
|
|
|