Shop OBEX P1 Docs P2 Docs Learn Events
Does this IC exist? — Parallax Forums

Does this IC exist?

Timothy D. SwieterTimothy D. Swieter Posts: 1,613
edited 2007-09-09 18:18 in General Discussion
Quick background:· I have a device I am testing that requires a clock between 50kHz. and 4MHz.· Data is sent to the device and it is synchronous with the clock.· The clock must always be clocking if I am sending data or not so the device's logic runs.

I am using the Propeller as my micro for experimentation.· I tried writing a routine in Spin but realized the code executes too slow.· I was using a counter, which is fully capable of generating the clock (it was set for 50kHz, slow by Propeller standards), but the·Spin code·for loading the next bit on the pin is too slow (even though it is two lines of code and then a wait for the clock pin to toggle).· I read some more about instruction timing and waitfors/waitpne and I am guessing that multiple clocks are happening while the new data is being loaded to the pin (I really need to get an oscilloscope/logic analyzer).

I don't really want to write an·ASM routine and have a whole COG dedicated to shifting data out to this device.· So....

The IC I am looking for would have a Serial In, Clock for In, Latch/Load, Serial Out, Clock for Out.· The IC would have two seperate clocks.· The Propeller would clock data out at a leisurely rate into the IC.· Then the latch line would be toggled and the data would load from the serial in data to the serial out data.· Another pin on the Propeller would be·configured with a counter to always operate with in the range that my device requires.· With this meathod the device is always receiving clocks, my software can be simple and I can conserve COGs.

If I used two IC, one being a serial in/parallel out and the other being a parallel in/serial out I could get the same effect in hardware.· Does this exist in one package though?

I guess I want to conserve too much - I want simple software, less COGs, less IO, and one chip.· There will always be design trade offs.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter
tdswieter.com
One little spark is all it takes for an idea to explode

Comments

  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2007-05-24 13:44
    If you told use the device, you might get a better answer on how to clock it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Everything in the world is purchased by labour; and our passions are the only causes of labor." -- David·Hume (1711-76)········
    ···················· Tropically,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2007-05-25 00:19
    Good point Kramer!· How many times have I read a post on this forum and asked the same question?· I guess I lost my mind last night when I was posting after a long day of work. (I live in HK, I see you live in Taiwan)

    I am experimenting with the ScreenKey (http://www.screenkeys.com/prod_rgb_series.shtml) More specifically the RGB24T.·

    Right now I am only·experimenting, but I am considering a couple projects/products for it.· For experimenting maybe I should stop trying to be so stingy and·just write an ASM program, but the final product may use several COGs (perhaps all of them) and I hate to waste a COG if there is a simple IC chip like I described.

    I suppose I could always program a cheap micro with a couple IO lines to behave like I want.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter
    tdswieter.com
    One little spark is all it takes for an idea to explode
  • Mike GreenMike Green Posts: 23,101
    edited 2007-05-25 04:09
    What you're asking for is an SPI master chip. I haven't seen one other than a specially programmed microcontroller (and I haven't really seen that either).

    You be best served by using an SX or a PIC or equivalent Atmel processor to do the 50MHz to 4MHz clocking of data into an internal buffer, then (with a separate set of pins) allow the Propeller (in Spin) to clock the data out (or in) also using SPI at a slower rate.
  • metron9metron9 Posts: 1,100
    edited 2007-05-25 04:56
    The Atmel Atiny2313 has what you need in a 20 pin DIP

    It also has built in a USR to automatically shiftout the data from the serial interface'

    Once you set it up not much programming to do as it is all interrupt driven and wirks in the background. (One of the reasons I like Atmel chips so much, they have so many chips with so many features. You will need a crystal though for reliable serial communication.


    From the datasheet

    The Universal Synchronous and Asynchronous serial Receiver and Transmitter
    (USART) is a highly flexible serial communication device. The main features are:
    Full Duplex Operation (Independent Serial Receive and Transmit Registers)

    • Asynchronous or Synchronous Operation
    • Master or Slave Clocked Synchronous Operation
    • High Resolution Baud Rate Generator
    • Supports Serial Frames with 5, 6, 7, 8, or 9 Data Bits and 1 or 2 Stop Bits
    • Odd or Even Parity Generation and Parity Check Supported by Hardware
    • Data OverRun Detection
    • Framing Error Detection
    • Noise Filtering Includes False Start Bit Detection and Digital Low Pass Filter
    • Three Separate Interrupts on TX Complete, TX Data Register Empty and RX Complete
    • Multi-processor Communication Mode
    • Double Speed Asynchronous Communication Mode

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think Inside the box first and if that doesn't work..
    Re-arrange what's inside the box then...
    Think outside the BOX!
  • Mike GreenMike Green Posts: 23,101
    edited 2007-05-25 05:08
    If it were me, I'd put together an assembly routine that could handle several of those cute ScreenKeys, sort of like the Servo32 driver in concept. That way you'd devote one cog to all the ScreenKeys. The cog would use a counter to provide the clocks for all the ScreenKeys (they'd all be attached to the same I/O pin). There'd be one data line for each ScreenKey and the routine would service them one at a time.


    By the way, the minimum clock is 50Hz, not 50KHz. You could easily do it all in Spin. Spin-only serial I/O routines can handle 9600 Baud.

    Post Edited (Mike Green) : 5/25/2007 5:13:24 AM GMT
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2007-05-25 05:33
    Thank you all for your thoughts and insights.· I think the Atmel solution is an option, but right now I am not familiar with Atmel products (I really need to learn).· I have basic capabilities with MSP430 though, but the cheaper chips don't have·a UART, it would have to be incorporated as a software UART. Soo...

    It looks like I may go the route of an assembly routine.· The final product (If it happens)·should have·many Screenkeys and it would be nice to dedicate one cog to run all of them.· Probably a better design choice for now.·

    Mike - your last comment said the minimum clock was 50 Hz.· I am looking at this datasheet (http://www.screenkeys.com/downloads/RGB24%20ScreenKey%20Datasheet.pdf) and it says 50KHz. is the minimum, unfortunately Spin is out of the question.· Where did you read 50 Hz?· Perhaps there is a better Screenkey I should use.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter
    tdswieter.com
    One little spark is all it takes for an idea to explode
  • metron9metron9 Posts: 1,100
    edited 2007-05-25 18:56
    I read a bit more from the technical sheets. Perhaps a Parallax person could answer this. Is the basic stamp capable of RS232C 4 wire interface? That is all that is needed to send and receive data from these little buggers.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think Inside the box first and if that doesn't work..
    Re-arrange what's inside the box then...
    Think outside the BOX!
  • FlyingFishFingerFlyingFishFinger Posts: 461
    edited 2007-09-09 18:18
    Hi-hate to wake this old thread, but I'm wondering about the screenkeys too...can a Stamp handle them?
    Specifically this: http://www.nkksmartswitch.com/media/pdf/SmartSwitchProductCatalog.pdf
    The clocks don't specify a minimum...only a max. They seem different from the ones discussed above...
    I have several and was randomly experimenting with them...

    Raf

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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~

    Post Edited (FlyingFishFinger) : 9/9/2007 6:47:01 PM GMT
Sign In or Register to comment.