Fast Pin-Toggling
Hi everyone,
i have some questions.
I need to toggel some pins with a speed about 25 Mhz.
Is this posible with a parallax sx?
And if yes, with which one... are the eval-boards for it?
Regards
MXMike
i have some questions.
I need to toggel some pins with a speed about 25 Mhz.
Is this posible with a parallax sx?
And if yes, with which one... are the eval-boards for it?
Regards
MXMike
Comments
The SX48 can do this with one of it's internal timers by running the SX at double the required frequency.
So by running the SX48 with the 50MHz resonator you should be able to get a 25MHz output.
If you are just getting started with the SX, I would recommend the SX Tech Tool Kit ($90)
http://www.parallax.com/Store/Microcontrollers/SXProgrammingKits/tabid/140/ProductID/364/List/1/Default.aspx?SortField=ProductName,ProductName
Then you'll need the SX48 protoboard (only $15) http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/SX48/List/0/SortField/4/ProductID/362/Default.aspx
If you need a more flexible frequency generator, then you might look into the Propeller chip. It can create a wider range of frequencies because it has built-in PLL's to increase the counter frequency.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
There is a fine line between arrogance and confidence. Make sure you don't cross it...
Post Edited (Bean (Hitt Consulting)) : 5/20/2009 1:00:37 PM GMT
thank you for you answer.
You say the SX can do this with it's internal timers.
I need this frequency in the main loop. I need to fill a few SPI devices.
Is the Pin-Toggeling faster with the propeller?
Remember please, i don't ne a special frequency. I need to fill a few SPI devices and an FPGA.
Regards
Mike
The timer will toggle the pin regardless of what the main code is doing. You can turn the timer on and off to start or stop the counter output, but you will not be able to send data at 25MHz.
Are you just sending zeros ? Or do you need to send actually data to the SPI device ? More info please....
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
There is a fine line between arrogance and confidence. Make sure you don't cross it...
·
Hi Bean,
related questions, if you please. If you double the freq as you mention (50MHz yields 25MHz pin toggle), would there be enough code-speed headroom left to bit-bang serialized data ?
[noparse][[/noparse]note the thread where I asked about 100MHz clocking] This is interesting, if the calculation is that simple --- or wait, er no, it's just the way the timer works, e.g. if the chip is clocked at 100MHz, then the fastest timer would be 50MHz (Y/N)? At 100 could a I2C-like setup (1 pin SCL, 1 pin SDA) with the ISR overhead drive the two pins at 25MHz using the internal timer to trigger the interupt ? I know it can be setup that way, but the speed issue is really what I'm asking. (And perhaps MXMike will have to deal with similar issues. --- Hey, Mike, I'm just jumping in a sec .. don't want to highjack your thread
thanks,
Howard in Florida
PS Bean *thank you* for all your support and work!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Buzz Whirr Click Repeat
Sends 2048 bits in 153.58uSec or 13.33 MHz.
P.S. This probably wouldn't work in the real world because of the back-to-back I/O on the ClkPin.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
There is a fine line between arrogance and confidence. Make sure you don't cross it...
·
i need to send Data.
Your example is that what i need but its to slow. Do you know if this will work faster with a propeller ?
Regards
MXMike
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
Post Edited (Leon) : 5/21/2009 9:41:25 AM GMT
I would try using VGA 2-color mode, one bit would toggle each "pixel" for the clock, the other bit would be the data, and would update every other "pixel". The other 6 bits wouldn't be used.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
There is a fine line between arrogance and confidence. Make sure you don't cross it...
·
By cranking the SX up in frequency to 80 Mhz (or more) and with interleaving code, you might be able to do what you need. Unfortunately you have inadequately descibed the "other things" the SX needs to do, either simultaneously, or consecutively with generating the 25 MHz pulse train, so it is impossible to say for sure.
A complete description will make that assessment possible.
For what its worth, I have many systems where I burst data out of an SX at 10 Megabits/second with a 50Mhz resonator. I know that isn't 25 MHz, but simultaneously it also does other things.
Cheers,
Peter (pjv)
A while back,·having problems with SETB/CLRB rapid fired, a look in the 'manual' said something to the effect that toggling a pin this way
could cause uncertain results.· Sorry, I can't find the quote at the moment. Think it was in the area about an external device pulling a pin low when the SX was trying to push it high.· Am also wondering if, at these speeds,·there could be a capacitive/impedance factor.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
No matter how much you push the envelope, it'll still be stationery.