Flowcode 11 PWM
-
pantelispv5
- Posts: 2
- http://meble-kuchenne.info.pl
- Joined: Thu Dec 17, 2020 9:14 pm
Flowcode 11 PWM
Hi, I have a fairly simple project and I need to use the PWM on channel 0 (channel 1 in Flowcode) in a ATtiny25 chip. Although the simulation seems fine the real chip do not seem to respond. I have checked the enable, prescaler, dutycycle, pin B0, etc. I use an ELNEC smartprog2 programmer and I first compile the project to HEX and then I download to chip. The clock is from internal RC osc. 8 MHz. Any idea?
-
Steve-Matrix
- Matrix Staff
- Posts: 1674
- Joined: Sat Dec 05, 2020 10:32 am
- Has thanked: 237 times
- Been thanked: 396 times
Re: Flowcode 11 PWM
My first step in debugging this is to make sure a "1 second flasher" program can be downloaded successfully and works as expected. This rules out so many issues with timing and the toolchain in general.
Once you have done that and proved that there is not a timing or reprogramming issue, then you can focus on it being an issue with the PWM.
Hopefully that helps. If you are certain there is an issue with the PWM, then maybe post a simple project hat shows the issue and someone here may be able to see what the problem is.
Once you have done that and proved that there is not a timing or reprogramming issue, then you can focus on it being an issue with the PWM.
Hopefully that helps. If you are certain there is an issue with the PWM, then maybe post a simple project hat shows the issue and someone here may be able to see what the problem is.
-
pantelispv5
- Posts: 2
- Joined: Thu Dec 17, 2020 9:14 pm
Re: Flowcode 11 PWM
The problem is solved by setting the clock source to 8 MHz Ext crystal oscillator. Then compile to HEX and download to chip using the smartprog2 which of course is set to internal RC osc. 8 MHz. Any advice on why that is happening?Steve-Matrix wrote: ↑Fri Dec 12, 2025 9:21 amMy first step in debugging this is to make sure a "1 second flasher" program can be downloaded successfully and works as expected. This rules out so many issues with timing and the toolchain in general.
Once you have done that and proved that there is not a timing or reprogramming issue, then you can focus on it being an issue with the PWM.
Hopefully that helps. If you are certain there is an issue with the PWM, then maybe post a simple project hat shows the issue and someone here may be able to see what the problem is.
-
Steve-Matrix
- Matrix Staff
- Posts: 1674
- Joined: Sat Dec 05, 2020 10:32 am
- Has thanked: 237 times
- Been thanked: 396 times
Re: Flowcode 11 PWM
Glad the problem is solved. Perhaps the programmer you are using is setting the config for the device. I am not familiar with that programmer.