View Full Version : Programming ScreenKeys with BS2?
11-29-2006, 05:14 AM
We got our hands on nice button with LCD screen and got stuck in programming it. The screen data is bitshifted to the driver chip inside the button, but it is programmed with two pins, data and clock, no enable or pulsout pin as we have used to do. The screen needs constant clock signal for data and LCD refresh. Does this mean additional clock chip or crystal or can the constant clock stream and the occational screen data dump be done with BS2 somehow? If anyone has any ideas and can take a quick look at their documentation pdf and drop us some ideas, we would be most grateful:
Their devkit seems to be atmel based.
11-29-2006, 05:47 AM
Sorry I can't answer your question but I had a question:
I looked around the other day and didn't see a price. What are these things selling for and what model was it?
11-29-2006, 05:56 AM
We got a sample of the rgb one, don't know the price, but I'm sure they distributors reply to that.
11-29-2006, 03:53 PM
Good question...I have some of these from NKK Switches (virtually the same thing) and I was looking at that myself the other day. If I had time I might be able to figure it out, but I don't... I'll attach myself to the questionershttp://forums.parallax.com/images/smilies/tongue.gif
You've got to play the game.
You can't win.
You can't break even, except on a very cold day.
It doesn't get that cold.
~Laws of Thermodynamics~
11-29-2006, 05:20 PM
You probably need to use the SHIFTOUT command to drive the device. SHIFTOUT will provide both a clock and a data line.
11-29-2006, 05:29 PM
Hi Bruce, yes the SHIFTOUT is the one we have used with ADC chips or LED driver like MAX7219, but in this case, besides the date being shifted to the chip, a _constant_ clock pulse is needed for refreshing the LCD on the chip. If I understand correctly, the clock from SHIFTOUT command is clocking only the data dump, but the clock is gone after that. Maybe I miss something very obvious here.
11-29-2006, 05:41 PM
Normally screen refresh is the responsibility of the LCD driver chip. You are only responsible for supplying a clock during the transfer of data.
11-29-2006, 05:46 PM
Yeah, I agree, however in this case external clock is used for refresh as well. Clip from their specs:
"The clock is used for the internal control of the ASIC (data transfer, LCD refresh, etc.) and must be applied constantly. Note: Applying power to the LCD for extended periods when no clock is present may reduce the life of the LCD. The clock frequency can be between 50 kHz and 4 MHz. The minimum LCD repeat frequency is about 64Hz. "
11-29-2006, 05:54 PM
A clock can be as simple as a crystal or a resonator - nothing really special. If that's the case, they should give the specifications for the "clock".
11-29-2006, 06:37 PM
They do define the clock, and this is where it gets bit advanced for us: (see the attached graph to this)
For serial transmission of data to the display, the following conditions must be adhered to.
Clock frequency max Fmax 4 MHz
Clock frequency min Fmin 50 kHz
Clock phase low max Tcpl 20 μs
Clock phase low min Tcpl 125 ns
Clock phase high max Tcph 20 μs
Clock phase high min Tcph 125 ns
Hold data min Thold 10 ns
Setup data min Tsu 40 ns
If we use external clock, how we bitshift the data to chip? With SHIFTOUT? If so, how the external clock and SHIFTOUT clock go together?
And thanks a lot for your help Bruce! Most appreciated.
11-29-2006, 06:59 PM
That graph is merely showing the SHIFTOUT timing. Have you used SHIFTOUT and had it fail? If not, that's what I'd try first. Remember there are some variable parameters in SHIFTOUT, and you may need to set them appropriately.
The other thing to keep in mind is - are we speaking only of one clock here, or is there more than one? IF there is only one I can almost assure you it is the clock which SHIFTOUT will supply.
Post Edited (Bruce Bates) : 11/29/2006 4:04:39 PM GMT
11-29-2006, 07:09 PM
We failed with our first SHIFTOUT test, but did not really explore it fully since we felt we are missing something crucial there. We carry on with that. I'm quite sure it's just one clock. Thanks again for all these, I'll reply here how it goes.