![]() |
Forum Index : Microcontroller and PC projects : Picomite Phase Correct PWM
![]() ![]() |
|||||
Author | Message | ||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10315 |
Thanks for the explanation. Since the SYNC option is undocumented I can change it so the new version of the PWM command will be: PWM channel, frequency, [dutyA] [,dutyB] [,phasecorrect] [,deferredstart] Like deferredstart, phasecorrect will be a boolean (0 or 1) and the command will automatically correct for the frequency. Watch for the V5.07.07 beta thread. |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5091 |
Beautifull !! (note that phasecorrect requires to double to frequency the PWM runs on, if that can be done in MMBasic then it is completely transparent. Volhout P.S. phase correct is something that virtually all PWM's support, so this likely can also be ported to CMM2. Just to keep the flagship on par with the small pico vessel... It is really astonishing what functionality the pico has. I think there is no basic in the world with this level of peripheral support. Not even the old HPbasic. PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10315 |
Yes. And there are some things I haven't seen anywhere else like the sync. Basically each channel has an enable bit in its control and status register like every other chip. However, there is also a master enable register that allows a single instruction to enable any selection of channels simultaneously. This effectively means you can have a 16 output PWM if you want (16 phase clock anyone ?) The firmware has to be a bit clever in keeping track of which channels are in use, not only for PWM, but also for audio and LCD backlight but with a bit of housekeeping the functionality is really useful. I just wish they would bring out a version of the chip with a fixed ADC as that is its real weakness at the moment. |
||||
Bleep Guru ![]() Joined: 09/01/2022 Location: United KingdomPosts: 633 |
I would be amazed if they are not working on a upgraded version, simply because this one has been so well accepted, realising that over the last few months it has almost been the only option! but anyway, just the concept of the PIO and how it's been implemented does as you say give it amazingly flexible functionality. Personally I'm hoping for a bit more ram and a few more PIO blocks, better RTC, upgraded ADC or two? but maybe they'll come up with something even nicer :-) All Pi! in the sky, they could equally well be working on their own replacement for the BCM27XX 28XX, even though they imply they are not, time will tell. Regards, Kevin. Edited 2023-01-10 20:38 by Bleep |
||||
![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |