Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[moved] Arduino / LCD / '595 cascade

Status
Not open for further replies.
Klaus, your understanding is still correct ...

* two 595 connected in series:
* MOSI --> 595A_SER (LCD)
* 595A_QH´--> 595B_SER
* (optionlal: 595B_QH´--> MISO)
* all other control lines in parallel to both 595

Software:
* activate chipselect
* write 8 bits for 595B
* write 8 bits for 595A
* deactivete chipselect

What is needed is that 595A, as you called it, drives the liquidcrystal595 library (liquidcrystal595.h), and the 595B part drives the additional outputs at the same time. This is what I asked about at the start.

But I cannot put this together and make it work.

I find the SPI communication difficult to understand and especially using it for this purpose, i.e. to simply add a few outputs using a 2nd '595.
(Using alternative chips and methodolgy seems unnecessary because the '595-cascade should easily function.)

I have searched and found many suggestions of using 74HC595 in 'cascade' and 'daisy-chain' but none that can complete the picture using this LCD-library plus a few additional outputs.
In theory it should be very simple.
But I am not able to get that going and therefore asking for help.
(Experimenting/messing with the original liquidcrystal595 library so far has been unsuccessfull. Alas, I read that Steve Hobley, the author, perished at sea near Florida, USA in 2012.)

I am looking for help to complete this project. If someone can help it would be appreciated.
Much thanks in advance.
 

I can help you with the code. If you want me to modify Arduino LCD library code then I need one week time. If you can use PIC or AVR (any) then I can write code using mikroC PRO PIC or mikroC PRO AVR Compilers.
 

Hi,

You say you find it difficult, but don't tell what exactely.

Transferring 8 bits to a 595 are just these couple of instructins:
* clear CS line (one instruction)
* transfer the byte to be sent to the SPI data out register (one instruction)
* wait for the SPI transmission is completed (a simple loop to wait until a bit in a register is changed. One, maybe two instructions)
* set the CS line.
(This is how the usual LCD library will work)

For shifting two bytes through two 595:
* clear CS line (one instruction)
* transfer the byte for the second 595 in chain to the SPI data out register (one instruction)
* transfer the byte for the first 595 in chain to the SPI data out register (one instruction)
* wait for the SPI transmission is completed (a simple loop to wait until a bit in a register is changed. One, maybe two instructions)
* set the CS line.

Either you change the LCD library for this, or you write it on your own.
You just need two variables for the two bytes.
If you want to communicate with the LCD you just need to re-transmit the last sent byte of the other 595...and vice versa.
..so that only the LCD_595 contents are changed, but the other byte is unchanged.

For us it's impossible to help without seeing your SPI code.

We are not talking about hundreds of instructions....only a couple of instructions.

Klaus
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top