-
Notifications
You must be signed in to change notification settings - Fork 7
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
Feature request: Is IR transmitter possible with ch582F chip in Rust? #4
Comments
I'll update this when Timers are implemented. |
OK thanks. I will be waiting. |
Thanks. Could you provide a similar example in C/CPP?
|
I have no similar example in C/CPP but there is a project in assembly linked below: https://www.sbprojects.net/projects/ir-repeater/index.php At the end of that page there is download link to download code and circuit schematic for PIC micro controller. Thanks. Thanks. |
Hi @happytm,
This project you shared is using an NE555 to generate the 38kHz carrier frequency and doing a ASK modulation using a MOSFET. On MCUs with PWM output capabilities, the circuit can be further simplified and the time base circuit can be removed. To control your IR diode using a PWM capable pin, set the PWM parameter to 20% duty with 38kHz frequency, then modulate the carrier signal output by configuring GPIO AF to GPIO/TIMER according to the baseband signal. You have already shared the specifications of the IR remote protocol:
So what you have to do next is implementing the protocol by looking at the "Protocols" chapter of the above blog post. Regards, |
@imi415 He is not using 555 timer at all. He is saying 555 timer is bad and reliable so he used PIC microcontroller. I am new to Rust so if you can provide sample code for encoder/decoder I will appreciate it. Thanks. |
There is IR implementation for Rust but for other microcontrollers if it is any help to port it to CH582 chip. https://github.com/jkristell/infrared Thanks. |
As you know I am very new to Rust language. With your help I just setup Rust environment couple of days ago.
Now I have new feature request. I was searching for IR transmitter solution for CH582F in Rust but could not find any. But came across a repository which implements IR transmitter for ATTiny13A micro controller and goes into detail of it's functionality. I think he uses timer functionality of ATTiny13A to create any custom IR protocol codes. The repository is linked below:
https://github.com/wagiminator/ATtiny13-TinyRemote?tab=readme-ov-file
He also have IR receiver implemented on ATTiny13A chip in another repository:
https://github.com/wagiminator/ATtiny13-TinyDecoder
His blog linked below is treasure trove for ATTiny devices:
http://www.technoblogy.com/show?24A9
One benefit of CH582F is it's builtin BLE. This makes it possible to use smartphone instead of buttons in above project to control any device in vicinity of IR transmitter. That can make very low cost home automation system.
Is it possible to implement this in Rust?
Thank you.
The text was updated successfully, but these errors were encountered: