View previous topic :: View next topic |
Author |
Message |
Mrshilov
Joined: 24 Jan 2009 Posts: 314 Location: Russia
|
Posted: Wed Jul 24, 2013 1:51 am Post subject: |
|
|
I tried all versions of lib.
Tried InitLCD with Wait.
Tried 1MHz...8MHz clock.
Tried Config Lcdbus = 4 : Config Lcd = 16x2 ect.
All what I have achieved is blinking cursor. |
|
Back to top |
|
|
Mrshilov
Joined: 24 Jan 2009 Posts: 314 Location: Russia
|
Posted: Wed Jul 24, 2013 9:28 pm Post subject: |
|
|
Code from Marcel Kroll (in attached archive) really working in hardware and software Proteus emulation. With software and hardware I2C.
|
|
Back to top |
|
|
aphawk
Joined: 23 Jan 2010 Posts: 168 Location: Brazil
|
Posted: Sun Jul 28, 2013 2:10 pm Post subject: |
|
|
Mrshilov and MWS,
Thanks by your efforts, I tried too, with the same result : blinking cursor...
It's possible that many people in Dutch Forum can be wrong ????
Maybe one small change in Bascom compiler can make this stop work ?
I will study the lib and see if I can make the change. This can help because today we can buy one I2C LCD adapter at less than US$ 2, and use very small attiny with display.
Thanks again,
Paulo |
|
Back to top |
|
|
aphawk
Joined: 23 Jan 2010 Posts: 168 Location: Brazil
|
Posted: Mon Jul 29, 2013 4:32 am Post subject: |
|
|
Well .... I must be doing something very wrong...
I tried all the examples I found in this Forum that uses the lib lcd_i2c.lib, and tried to run in Proteus 7.10.
No one works for me !!!!!! Even the AN #118 don't works anyway. Maybe Proteus problem ? I don't think so, but ......
I try change the microprocessor, change the pins, etc, and again, nothing works. Maybe BASCOM version problem ?
Please someone can see if this LCD_I2C.LIB works, compiling some test code and see what happens in Proteus ?
And if works, can post the test code and Proteus simulating circuit ?
Paulo
(EDIT)
Last Informations :
I put one I2C Debugger , and see what is wrong ( maybe ) ...
The firsts bytes sent to LCD are wrong.... many sent without activing signal E ( Level 0 )...... but when I use the command LCD "TESTE" , all bytes are sent with signal E set to level 1, that appears right to me.
I think that this is a LCD initializing problem , maybe BASCOM are not compatible with this library anymore. |
|
Back to top |
|
|
Mrshilov
Joined: 24 Jan 2009 Posts: 314 Location: Russia
|
Posted: Mon Jul 29, 2013 6:43 am Post subject: |
|
|
I found second error in library. E (E2) changes 0>1>0, but must 1>0>1 (as write in datasheet). Therefore some strings corrupt.
In attach fully working, repaired versions.
i2c_lcd.lib - library without suggestion of pins. Port 5 now used as backlight output. See i2c_lcd example.bas.
i2c_lcd_suggestion.lib - library with suggestion of pins. Backlight control is simplified from original and now the same as in i2c_lcd.lib. See i2c_lcd_suggestion example.bas
For both libraries necessarily Initlcd. On high freq may need Config I2cdelay = 2.
Backlight pin switched ON or OFF with every Display command. If you want switch it without changes on LCD you may send Display On command.
NOTE! At power on, all I/Os of PCF8574 are high and while controller startup and send first command to it stays high. Therefore better connect Backlight from Vcc to P5 pin. In this case at power on it will be OFF, but _backlight=0 will means "Backlight ON" and vice versa.
Libraries tested in hardware and in Proteus. Proteus design included in attach.
|
|
Back to top |
|
|
aphawk
Joined: 23 Jan 2010 Posts: 168 Location: Brazil
|
Posted: Mon Jul 29, 2013 2:26 pm Post subject: |
|
|
Mrshilov,
Thanks !!!!! I tested the new versions and works very good !
The i2c_lcd_suggestion.lib with the new Backlite control is very simple to use, and if the display used have only one Enable line, I can use the second Enable signal to activated one Buzzer when necessary !
I'm surprised that anyone have noted that the original libraries don't works from sometime ago or worked only for some strange display since was created, but now for sure it works with the hd44780 compatible models !
I'll put this library in my Portuguese Tutorial with examples, with your mod's credits.
Thanks again, Mrshilov !
Paulo |
|
Back to top |
|
|
sasha_1973
Joined: 30 Jul 2013 Posts: 58
|
Posted: Tue Jul 30, 2013 12:24 pm Post subject: Attiny85 and 8 LCD |
|
|
Example of use, Attiny85 and 8 LCD. Work is checked in Proteus 7.10 and hardware.
About the library, please contact MrShilov
Screenshot Proteus
http://uploads.ru/VSFyt.jpg |
|
Back to top |
|
|
aphawk
Joined: 23 Jan 2010 Posts: 168 Location: Brazil
|
Posted: Tue Jul 30, 2013 2:13 pm Post subject: |
|
|
Sasha_1973,
Thanks for your example, very good use of a simple Attiny85.
About the library, I read in the statements that the code are free to use, and because this I don't ask about the use.
But for sure will be mentions to Ken ( original idea ) and to MrShilov for this beautiful mod.
I'm trying to show to many young peoples in Brasil how to use small microcontrollers, and this is very difficult because they don't have the acknowledge to make this alone, even in the technical curse.
Many people outside Brasil don't know the real fact : in our public schools, the student pass to the next level only being present at classroom ! it's true, we have this statements in law for about 10 years ago !
The exams exists, but even if reproved, he will pass to the next degree !
This happens in all basic level schools, and changes only when they arrives in one high school. But even in High Schools, the teachers don't reclaim more acknowledge from the students, we have a lot of particular High Schools where the director's board insist that the teacher don't push the teaching, or the student will be out, looking for an "easier" school.... i name this the "Brazilian Way To Make Profit Cheating All World" .
I and many others like me are trying to help these young peoples, in the most known Brazilian Hardware and Software Fórum from many years ago, for free, and always looking for simple solutions in the hope that these students learn something usefull and make the learning by yourselves using Internet.
Thanks for all people from this Forum, and excuse my English mistakes !
Paulo |
|
Back to top |
|
|
sasha_1973
Joined: 30 Jul 2013 Posts: 58
|
Posted: Tue Jul 30, 2013 2:18 pm Post subject: |
|
|
Last edited by sasha_1973 on Wed Jul 31, 2013 4:27 am; edited 1 time in total |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Tue Jul 30, 2013 9:44 pm Post subject: |
|
|
@Mrshilov
thank you for sorting this out and sharing with us.
Maybe a good idea to put it in Share your code?
@sasha_1973
thanks, maybe a good idea to put it in Share your code?
@aphawk/Paulo
no need to excuse for your English. I think it is pretty good. And this forum is not for teaching English anyway
Had no idea that education worked that way in Brazil. But i do know that the "way to make profit" is not unique for Brazil.
In fact in our country there were some schools that almost gave away the diploma's only because they were paid for each student with a diploma.
It is great to see that there are people that understand the importance of study and learning and that they are prepared to help children with that.
Keep up the good work! _________________ Mark |
|
Back to top |
|
|
sasha_1973
Joined: 30 Jul 2013 Posts: 58
|
Posted: Tue Jul 30, 2013 10:31 pm Post subject: |
|
|
I apologize for the question, Mark, I can get a license to "Bascom"? 80$ for Ukraine, a large amount of money, and the program is really good!
Last edited by sasha_1973 on Tue Jul 30, 2013 10:58 pm; edited 1 time in total |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Tue Jul 30, 2013 10:53 pm Post subject: |
|
|
I do not understand the question. But maybe this answers it. It is off topic.
The price is fixed but since not all the countries are the same in respect to the average income and costs, the reseller (if exist) can use a lower or higher price. And there is also an educational discount in case the demo is not sufficient.
What is high and low is relative. In our country petrol cost about 1,837 euro/liter but in Algiers, people pay just 0,215 euro/liter. But i guess they do not pay the same rent for their home.
And banks have extreme high rent here for mortgage. So you can say that life is expensive here. And the price is based on that.
I also do custom projects otherwise i could not even sell for the current price.
I know that this price can be too high for some countries and that is why a reseller can fix a lower price. What we want to prevent however is that low cost license are sold for profit on ebay or so. you can best contact sales if you have more questions. _________________ Mark |
|
Back to top |
|
|
sasha_1973
Joined: 30 Jul 2013 Posts: 58
|
Posted: Tue Jul 30, 2013 10:53 pm Post subject: Button, switching certain things, LCD20x4, through PCF8574x |
|
|
Mark, thank you for your response.
Screenshot
http://uploads.ru/U6su4.jpg
About the library, please contact MrShilov! |
|
Back to top |
|
|
Mrshilov
Joined: 24 Jan 2009 Posts: 314 Location: Russia
|
Posted: Wed Jul 31, 2013 12:36 am Post subject: |
|
|
Bug fix for i2c_lcd_suggestion.lib - it worked correctly only in BASCOM 2.0.7.6.
In attach fixed version. Tested in 2.0.7.1. & 2.0.7.5. |
|
Back to top |
|
|
aphawk
Joined: 23 Jan 2010 Posts: 168 Location: Brazil
|
Posted: Wed Jul 31, 2013 2:08 am Post subject: |
|
|
Mrshilov,
Again, thanks for your new improvement to make the library more compatible !
Mark,
Thank you for the words, and you too make a good decision in permit that the free Bascom version can compile 4k of code ! This is very good to the people that are learning with low cash resources.
You told about resellers. When I decided to buy the licence, first I see the resellers in Brasil, but the price they are asking for are about 50% above than stated in your site.
I understand that the reseller must gain something, but in my opinion 50% is a lot of value, even guessing that the reseller has a little less price to buy directly from you.
Sasha_1973,
Please put your example in the Share your Bascom program sectíon in this Forum.
Paulo |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|