Shop OBEX P1 Docs P2 Docs Learn Events
Emulating a crystal — Parallax Forums

Emulating a crystal

codekingcodeking Posts: 39
edited 2007-02-11 22:02 in Propeller 1
I have a graphic LCD that requires a 2kHz crystal. Unfortunately, I don't have a crystal at that speed, so I set up the prop to emulate it. I have a !OUTA[noparse][[/noparse]18] at 4kHz. Am I doing this right, because the LCD is acting funny.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Theron Luhn

"There are two things that are infinate: Human Stupidity and the universe. I'm not sure about the latter." - Mark Twain

Comments

  • HarleyHarley Posts: 997
    edited 2007-02-11 19:05
    codeking said...
    I have a graphic LCD that requires a 2kHz crystal. Unfortunately, I don't have a crystal at that speed, so I set up the prop to emulate it. I have a !OUTA[noparse][[/noparse]18] at 4kHz. Am I doing this right, because the LCD is acting funny.

    Well, does the LCD require both leads of a crystal, or do you mean that it requires a clock of 2 KHz? If so why supply it 4 KHz?

    Maybe I don't understand the configuration you need.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Harley Shanko
    h.a.s. designn
  • Dennis FerronDennis Ferron Posts: 480
    edited 2007-02-11 21:21
    I imagine he's trying to toggle outa[noparse][[/noparse]18] four thousand times per second, which would take two toggles to make one complete cycle, making 2KHz.

    There is a frequency synth object on the object exchange. I'm using that to generate my 1 MHz 6502 clock.

    I would imagine direct input to the LCD crystal pins would work, but most likely the crystal spans 2 pins and one of them is an input and the other is an output, so you have to get the right one.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-02-11 21:28
    codeking,

    2KHz is REALLY slow for a crystal or resonator. Are you sure it's not supposed to be 2MHz instead? If that's the case, you can still generate the requisite clock using the Propeller. But you'll have to utilize one of the special counter modes to do it. Spin won't be fast enough.

    -Phil
  • bassmasterbassmaster Posts: 181
    edited 2007-02-11 22:02
    what model is the LCD, Can you post a link to the datasheet?

    I have played with hundreds and never needed a crystal, and shifting data in with a clock requires may be described as a minimum speed of XXX, most (expletive)ing in is not as speed dependant as the bits falling in the right place of the clock, does it also have a latch pin?

    If its shifted serial you should see a figure like this on the datasheet..

    clock....
    _/|_/|_/|_/|_/|_/|_/|_/|_/|_/|_
    _____-___-____-__-__________
    data...(Active low)
Sign In or Register to comment.