Hi everybody,
I need Library 3-wire serial lcd using 74hc595 for CodevisionAvr I searched on Google, but not found
Help me please
Thank
Hi everybody,
I need Library 3-wire serial lcd using 74hc595 for CodevisionAvr I searched on Google, but not found
Help me please
Thank
Why don't you ask on the Codevision forum? They would be the best, however as you not providing any hardware information maybe no one can help.
I have published a Codevision library for the popular I2C adapters. (on this Forum)
I really can't see the point of using a 74HC595. It needs more pins. No one makes the adapters. It would be expensive.
If you can show me that you actually possess an adapter for the 16x2, I will write and publish the Codevision library.
Please post a link to the adapter on Ebay or similar.
All that I can find is http://www.ebay.co.uk/itm/Serial-UART-I2C-SPI-Adapter-for-1602-1604-2002-2004-4002-LCD-in-Arduino-AVR-PIC-/371649946300?hash=item56881022bc:g:B7UAAOSwImRYbCu1
And it is a lot more expensive than the I2C Adapters.
David.
I have published a Codevision library for the popular I2C adapters. (on this Forum)
I really can't see the point of using a 74HC595. It needs more pins. No one makes the adapters. It would be expensive.
If you can show me that you actually possess an adapter for the 16x2, I will write and publish the Codevision library.
Please post a link to the adapter on Ebay or similar.
All that I can find is http://www.ebay.co.uk/itm/Serial-UART-I2C-SPI-Adapter-for-1602-1604-2002-2004-4002-LCD-in-Arduino-AVR-PIC-/371649946300?hash=item56881022bc:g:B7UAAOSwImRYbCu1
And it is a lot more expensive than the I2C Adapters.
David.
Hi thanks for the answer
I using a typical LCD 4*20 i need more 2 i/o so i want drive LCD with 74HC595 This low-cost way for me
If you help me I will be grateful
I have used this excellent adaptation of Peter Fleury's LCD library for I2C by Davide Gironi:
http://davidegironi.blogspot.com...
I had asked him about developing a multiple LCD version of his library which I believe he did....I will have to look for it.
I really can't see the point of using a 74HC595. It needs more pins. No one makes the adapters. It would be expensive
Agreed.
Jim
@azadfalah,
Please post a photo or link to a real 74HC595 adapter.
I do not mind spending 30 minutes of my life writing "lcd_spi.h" for Codevision if helps more than one person.
.
If you provide a good reason, I would do it just for you. e.g. if you already have other SPI devices on a single SPI bus.
.
David.
You can find exactly what you want to do on this WEB PAGE Sorry, but your internet search skills are lacking. I typed "74hc595 c code example" to find the code in less than 3 minutes.
I took another look and you problem has been solved two years ago on this forum. https://www.avrfreaks.net/forum/s...
I took another look and you problem has been solved two years ago on this forum.
AVRfreaks reached critical mass some years ago -- every possible AVR issue has been raised, discussed, and consensus reached. ;)
OK, I suppose I have to add something on-topic. In a couple apps we have gone the "serial backpack" route and added a small AVR at the display. Then UART or UART+transceiver added for the distance. Not as inexpensive as the shift-register approach but handles the "remote" problem. In addition, that remote AVR can scan user buttons/keys associated with the display and handle associated I/O (LEDs; buzzer; ...)
@azadfalah, Please post a photo or link to a real 74HC595 adapter. I do not mind spending 30 minutes of my life writing "lcd_spi.h" for Codevision if helps more than one person. . If you provide a good reason, I would do it just for you. e.g. if you already have other SPI devices on a single SPI bus. . David.
Thanks for the answer
The image of what I want
i want this Library for CodevisionAvr
Please guide me
Are you serious?
Most people would wire:
Q0 RS
Q1 RW
Q2 EN
Q3
Q4 DB4
Q5 DB5
Q6 DB6
Q7 DB7
And use the ATmega8 SPI pins: SS, MOSI, SCK
I did ask for either a real-life hardware adapter or a "compelling reason".
Is this just a Proteus exercise to use random pins?
David.
azadfalah,
You want, you want, you want a specific library, for a specific circuit, for a specific compiler without doing the slightest bit of work on your own. It's clearly a school project most likely run on a pirated simulator. I posted two links to a partial solution. The code is all over the web. Sorry, I won't offer more help. You are on your own.
someguy22
BASCOM-AVR?.
Sigh.......
Jim
Are you serious?
Most people would wire:
Q0 RS
Q1 RW
Q2 EN
Q3
Q4 DB4
Q5 DB5
Q6 DB6
Q7 DB7
And use the ATmega8 SPI pins: SS, MOSI, SCK
I did ask for either a real-life hardware adapter or a "compelling reason".
Is this just a Proteus exercise to use random pins?
David.
David.
Well, I at first I wanted to use 3 pin different from spi but now I realized more quickly spi
How can I drive the LCD with ُSPI ?
Thanks,
Does it have to be SPI? Could you not use I2C?
Please give an honest answer.
Do you have a genuine product with a wrong pcb layout?
i.e. you just want to make a quick fix to existing hardware.
It happens. It is a perfectly good reason.
Or do you just have a Proteus Simulation project?
When someone asks an interesting question or even a sob story, they are likely to get a good response.
If you try to be secretive, you will just get ignored.
Even if it is a school project, people will happily answer specific questions. Don't expect them to do your schoolwork for you.
David.
How can I drive the LCD with ُSPI ?
Obviously (I hope?) the SPI is completely irrelevant to the LCD itself: the LCD itself neither knows nor cares anything about SPI - it is totally oblivious to SPI.
All the LCD sees is the signals at its pins - so your task is to replicate from the shift register exactly the same signals that the LCD would see if it were directly connected to your microcontroller.
Please give an honest answer.
Do you have a genuine product with a wrong pcb layout?
i.e. you just want to make a quick fix to existing hardware.
It happens. It is a perfectly good reason.
Or do you just have a Proteus Simulation project?
When someone asks an interesting question or even a sob story, they are likely to get a good response.
If you try to be secretive, you will just get ignored.
Even if it is a school project, people will happily answer specific questions. Don't expect them to do your schoolwork for you.
David.
This is the Real project And production in large numbers
I use the i2c to communicate with RTC and use Usart for other works
In my project i using Atmega64 but we should use Atmega32 and when i want use Atmega32 even though I used the IC latch for Increase I/O i need two PIN more ,
so i want Drive LCD with less PIN for free my two PIN ...
Low-cost way for me is Drive the LCD with SPI this way Free Four PIN and great
I am using the codevisionAVR ,
Sajjad,
I use the i2c to communicate with RTC...
So you could also use I2C to talk to your LCD.
azadfalah wrote:I use the i2c to communicate with RTC...
So you could also use I2C to talk to your LCD.
Why do not you think the economy 74HC595 Cheap and abundant
PCF8575 could not find in my country
The popular I2C adapters use PCF8574 or PCF8574A (8-bit expander).
The PCF8575 is a 16-bit expander.
Seriously, sit down with a nice cup of tea. Think about how to wire a 74HC595 e.g. as suggested in #10.
If you want to wire things differently, please explain your reasons.
Incidentally, the whole I2C adapter costs about $0.99 on Ebay. Since you already have an active I2C bus, an extra device does not need ANY extra pins.
David.
PCF8575 could not find in my country
Then if you do not want to buy the adapters on Ebay at a very reasonable cost compared to building these 'quantities' you need, take a look for the MCP23017. THere is an Arduino library for it too from Adafruit.
JIm
A couple of left field suggestions:
1) use a 40 pin rather than a 28 pin AVR - you will get more than enough extra IO pins that way! I bet any cost up is no more than the cost of the 595 anyway.
2) What is actually on the whole of PORTC and PORTD of that mega8? You may find that some form of multiplexing (multiple buttons on a single ADC input for example) frees the additional IO lines you need for a direct connect. Your picture already shows there's just 6 active wires to the LCD and 3 to the 595 so it would seem you are only actually looking for 3 additional pins.
1) use a 40 pin rather than a 28 pin AVR - you will get more than enough extra IO pins that way! I bet any cost up is no more than the cost of the 595 anyway.
Yabbutt what does this mean:
In my project i using Atmega64 but we should use Atmega32 and when i want use Atmega32 even though I used the IC latch for Increase I/O i need two PIN more ,
So we have three different AVRs called out. Pick a chip, any chip.
JIm
Oh I see the (mega8) picture was just "generic" culled from Google Images was it?
If the problem is really finding 2 pins on a mega32 then surely to goodness there's got to be something there that can be multiplexed to free just 2 more pins?
We have no idea what the OP actually wants or needs.
Oh, the software took 5 minutes to write. By the time I have dug out a breadboard and 595 and wired it up, I would have wasted 25 minutes of my life.
It is a no-brainer to add an I2C LCD to an existing bus. Zero extra pins.
Adding a 595 to an existing SPI bus. One extra pin.
If there were no existing buses, I2C costs two pins. SPI costs three pins.
Driving the LCD directly with its existing 4-bit interface only costs six pins in the first place!
As I understand, the OP is migrating from a 64-pin mega64 to a 44-pin mega32.
Most apps would be happy with the GPIO from either chip.
David.
I made a mistake I find PCF8574 But twice the price of 595
I using the Atmega32 Because we should use dip package
If you want to wire things differently, please explain your reasons.
David.
no, i dont want wire things differently If you have the library please help me
Thanks to friends
We have no idea what the OP actually wants or needs.
Just think, it took only 25 posts to get there! The OP can't even post the actual problem. The solution to this problem is all over the web. The boding; Ill.
i dont want wire things differently
david.prentice wrote:We have no idea what the OP actually wants or needs.
Just think, it took only 25 posts to get there! The OP can't even post the actual problem. The solution to this problem is all over the web. The boding; Ill.
i want drive LCD with spi and don't Have any library for codevisionAVR
It was obvious problem?
azadfalah wrote:Not even if it saves the cost of the 595 from the design? I suppose it depends whether you are making just one of this circuit or 10,000 units? If the latter then saving the cost of $0.50 chip from the design could be significant.i dont want wire things differently
Here I buy the more expensive Yes, nearly 10,000 units And cost savings are significant
I think instead of posting
I worked the library was now over.
i want drive LCD with spi and don't Have any library for codevisionAVR
To be accurate you aren't looking for a library; when talking about compilers the word has a specific meaning. What you want is sample or example code.
As you are using an AVR, not matter what type, you can look at any code written for the Arduino. If I search on "lcd 595 spi" I very quickly find this page which does exactly what you want...
http://playground.arduino.cc/Mai...
It will take you about 10 minutes to make that work on your chosen chip.
Here I buy the more expensive Yes, nearly 10,000 units And cost savings are significant
And that's just one example - it'd be unusual in a 40 pin chip design not to be able to find at least a couple of pins that can do "double duty".
Perhaps you don't have a key matrix but just 4 buttons on individual inputs? If you could shuffle things round so that all 4 would connect to one ADC pin you can often use a switched resistor network to present different voltages depending on which button is pressed. However it's true that a possible complication is if you might expect to see more than one button pressed at once. However even that's do able. Conceptually have one button switch 0.5Vcc, one switch 0.25Vcc, one 0.125Vcc and so on. Now if you read 0.75Vcc you can be pretty sure it's buttons 1 and 2 that are pressed.
There are many ways to skin this cat!
If it could save $5000 from the production cost (10,000 74595's at $0.50 each) then it's got to be worth spending at least an hour studying how you might cut it from the design?
Or are you entrenched in the belief that the only way to gain the 2 pins you need is with a port expander?
33 Posts only to be told:
I realized that I have to Drive LCD via SPI Now, by analyzing code arduino I will make a library
Where back in Post #7:
You can find exactly what you want to do on this WEB PAGE Sorry, but your internet search skills are lacking. I typed "74hc595 c code example" to find the code in less than 3 minutes. I took another look and you problem has been solved two years ago on this forum. https://www.avrfreaks.net/forum/s...
Jim