The setup is as follows, there is a chip, PIC16F886, which does a lot of thing - updates 1602 LCD, monitors user input, endstops, issues enable/disable statement to motors, etc. Chip is quite busy, I want to say that.
So I also need to have square wave outputs in say 50Hz-10Khz range, to control speed of stepper motors. Need at least 4 outputs, with independent control. Frequency precision and number of steps is not that important - having say 32 fixed frequencies in that whole range will be enough.
The 1st idea is to use a PIC chip with 4 channel built-in PWM generator, but you can't set their frequencies independently and also minimal range is quite high - around 400-500Hz, depending on chip speed.
The 2nd idea is to use ready modules like AD9833. Price is negligible, they cost $1.5 in china. But they require quite a lot of programming.
The 3rd idea is to use CD4536B or similar timers (say CD4541), feed their input from HPWM output of MCU and use independent control to get desired frequencies. While there will be no such wide choice of frequencies as in case of AD9833, "programming" is straightforward and very simple.
Another idea is to mod DT's multi-channel PWM into outputting not different duty cycle, but different frequencies. But that is beyond my knowledge of PBP
Any other ideas?
Bookmarks