Does this IC exist?
![Timothy D. Swieter](https://forums.parallax.com/uploads/userpics/482/n6OIB3WNWVK0M.jpg)
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
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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Everything in the world is purchased by labour; and our passions are the only causes of labor." -- David·Hume (1711-76)········
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
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.
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!
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
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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think Inside the box first and if that doesn't work..
Re-arrange what's inside the box then...
Think outside the BOX!
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