I am developing a device using a ks0108 LCD as my display. Standing alone, I have had no trouble implementing and programming the display. I am using the default pin configs stated in the ks0108 library. I am also implementing a ds3234 RTC in my project and standing alone it also functions properly. The ds3234 is an SPI chip and I am using the default pins included in the ds3234 library. Alas, when I combine the two codes the ds3234 stops functioning and the LCD shows flicker in sequence.
According to the schematic posted here MONOCHRON - Design for a device with a very similar set of ICs the E input of the LCD is fed with MISO and to RW with SCK. My question is, do these need to match the MISO and SCK for SPI? I just wanted to get a second opinion before modifying the libraries and connections. I am using a mega 1280. Thanks.
If you are using hardware SPI (the SPI library) you have to use the MISO, MOSI, and SCK pins of the hardware SPI port. Those three pins are shared between all SPI devices. The SS signal can be any pin and has to be a different pin for each device. The hardware SPI SS pin can be used for one of the devices but must be left set as an output whether it is used for SS or not.
I'm including both the SPI library and the ks0108 library in my script. I suppose given the info you've provided, my question is: do I need to change the pin values in the ks0108 header to match the SPI pins? Or do I just use the SPI pins and leave the header file unchanged?
To clarify this for any future readers, the ks0108 does indeed use its own pins and does not require alteration to any of the headers to operate simultaniously with SPI. I was calling the ReadTime() function within the GLCD.put() command and that seems to be the reason the RTC would lock up, or the whole script actually. I just had to assign the RTC value to a string, convert that to char, and then put the data to the LCD. I am still having some issues with screen flicker in sequence and random dimmingg, but I'm sure this is because I need to do some more work on my over-all design.