Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can this interface be (ab)used for generate serial IO? #11

Open
papadeltasierra opened this issue May 15, 2016 · 2 comments
Open

Can this interface be (ab)used for generate serial IO? #11

papadeltasierra opened this issue May 15, 2016 · 2 comments

Comments

@papadeltasierra
Copy link

It is possible to send carefully timed, but arbitrary data, using this module? I'm looking to send 433MHz data that consists of high/low periods where each 'period' is a multiple of 400us. So I wondered could I clock the HSPI at 2500Hz and get it to stream '1s' and '0s' representing each needed high/low.

@MetalPhreak
Copy link
Owner

Sure can. At 2500 Hz you can easily load more data once the 16byte buffer is exhausted without any noticeable delay.

A better option might be the i2s (not i2c) module, as I've seen people use it to drive WS2812 LEDs. The i2s module can also be used with DMA to continuously stream data in the background with no interruption to the main code. There should be a few examples around of this, but i've never used it myself.

@MswPaulDSmith
Copy link

Thanks. I'm looking at the I2S interface at the moment, the problem being that it cannot be slowed down to anything close to 2500Hz. I'm currently trying to run it at 80kHz and 'scale up' all my data by 32 (so 32 '1' bits represents a single HIGH in 433MHz speak). FYI, some of the I2S examples seem wrong as they imply a maximum divisor of (127 x 127) but it looks like it's (63 x 63); I suspect that someone didn't count the bit mask properly ;-). Oh, and I happen to have esp8266-01 which don't expose the HSPI pins - I'll know better for next time and get some esp8266-13s instead :-).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants