IMHO, code is ok, maybe DSO138 is messing with you (screen antialiasing). Switch to uS range and look how much voltage ripple it have.
Or maybe too high LP filter capacitor. It will distort your waveform from saw to triangle.
Or, Instead of 50000, try with 250000 pwm frequency.
Search found 140 matches
- Thu Feb 24, 2022 2:07 pm
- Forum: General discussion
- Topic: spikes/teeth in filtered PWM output waveform
- Replies: 2
- Views: 1324
- Fri Feb 18, 2022 8:09 pm
- Forum: General discussion
- Topic: How to dynamically change duty cycle with HardwareTimer library?
- Replies: 24
- Views: 8158
Re: How to dynamically change duty cycle with HardwareTimer library?
This sounds like it would be useful for my application. Would you happen to have an example of this? My main hurdle with this is actually figuring out how to do the code. I'm definitely doing something wrong, but I haven't been able to change the duty cycle using the HardwareTimer library at all th...
- Sat Feb 12, 2022 12:15 pm
- Forum: General discussion
- Topic: How to dynamically change duty cycle with HardwareTimer library?
- Replies: 24
- Views: 8158
Re: How to dynamically change duty cycle with HardwareTimer library?
From my audio experiments with STM32, i found that using two timers gives excellent results. One timer is used for interrupt callback at samplerate (20uS for 50kHz, but can be much less), and second timer at much higher frequency (around 250KHz) of which you are changing duty cycle. Depending of you...
- Mon Jan 24, 2022 4:08 pm
- Forum: General discussion
- Topic: USB Composite + Roger Clark's Core, Serial over USB
- Replies: 20
- Views: 9336
Re: USB Composite + Roger Clark's Core, Serial over USB
I looked into driver itself on my computer, and it is using "USB serial driver" (Usbser.sys) that comes with Windows 10. If i'm right, and you are using Windows 7 (aero theme in your screenshot), google said that Windows 7 don't come with that driver. It might be a reason why your midi dev...
- Sun Jan 23, 2022 5:06 pm
- Forum: General discussion
- Topic: USB Composite + Roger Clark's Core, Serial over USB
- Replies: 20
- Views: 9336
Re: USB Composite + Roger Clark's Core, Serial over USB
There is also one more thing to try: USBComposite.setManufacturerString(ManufacturerName); USBComposite.setProductString(DeviceName); USBComposite.setSerialString(DeviceSerial); USBComposite.setProductId(0x0029); // or any other number than 0x0020 I wouldn't recommend it until you try other solution...
- Sun Jan 23, 2022 4:51 pm
- Forum: General discussion
- Topic: USB Composite + Roger Clark's Core, Serial over USB
- Replies: 20
- Views: 9336
Re: USB Composite + Roger Clark's Core, Serial over USB
Uf, windows and drivers... There is few thngs you can try: - right click on icons with problems, choose "uninstall" and click "scan for hardware changes" icon. - right-click, "update driver", "Browse my computer for drivers", select path "c:\Windows"...
- Sun Jan 23, 2022 10:17 am
- Forum: General discussion
- Topic: USB Composite + Roger Clark's Core, Serial over USB
- Replies: 20
- Views: 9336
Re: USB Composite + Roger Clark's Core, Serial over USB
Yes, they are both used in same time. As if you plugged in two different USB devices.
Go to device manager, and see if there is problem with driver (if you are using Windows OS).
Also, how do you upload sketch to bluepill?
Go to device manager, and see if there is problem with driver (if you are using Windows OS).
Also, how do you upload sketch to bluepill?
- Fri Jan 21, 2022 9:19 pm
- Forum: General discussion
- Topic: USB Composite + Roger Clark's Core, Serial over USB
- Replies: 20
- Views: 9336
Re: USB Composite + Roger Clark's Core, Serial over USB
I created some simple example sketch to deal with both midi and virtual COM port. I hope it is helpful for you. #include <USBComposite.h> uint32_t counter = 0; const char ManufacturerName[] = "Just Me"; const char DeviceName[] = "My Device"; const char DeviceSerial[] = "0000...
- Mon Jan 17, 2022 4:36 am
- Forum: General discussion
- Topic: USB Composite + Roger Clark's Core, Serial over USB
- Replies: 20
- Views: 9336
Re: USB Composite + Roger Clark's Core, Serial over USB
Can you check your previous thread and look for my first post there for example? That should give you both midi and usb virtual com port over one usb cable. I used st-link for upload, not stm32duino bootloader.
- Fri Jan 14, 2022 7:20 am
- Forum: General discussion
- Topic: USB Composite library MIDI Get Bytes without using Callbacks
- Replies: 28
- Views: 8039
Re: USB Composite library MIDI Get Bytes without using Callbacks
As ag123 mention it, maybe st-link debugger can be helpfull. I personally don't know how to use it, most of the time i use digital analyser for debugging and pin toggling. USB stuff is very complex for me to understand, i like simple predictable protocols, like serial or spi :D I had experienced cra...