|
Forum Index : Microcontroller and PC projects : PWM problem, probably me but..
| Author | Message | ||||
| DaveJacko Regular Member Joined: 25/07/2019 Location: United KingdomPosts: 86 |
PicoMite, absolutely fabulous, next job making an accurate pedometer. (the accelerometer should be taped to the big toe for best results) then no need for complex maths. I just want a beep, what am I doing wrong. (it's usually me) setpin gp2,pwm1a pwm 1,256,50,0 error = 'pin not set for pwm' also, while I'm at it, do flag=1 loop until flag 'not a biggie, but be aware regs Dave Try swapping 2 and 3 over |
||||
| ice2642 Regular Member Joined: 27/05/2023 Location: BrazilPosts: 82 |
1 - Do you set the option power pwm ? (page 57) 2 - Look in the manual 87 page for the pwm configuration. 3 - look in page 92 for the correct setpin with pwm use. I hope it help you. Best regards, MMBasic 5.0707 on PicoMite VGA |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10636 |
You are setting a value (0) for pwm1b. Just omit the ",0" |
||||
| DaveJacko Regular Member Joined: 25/07/2019 Location: United KingdomPosts: 86 |
That was quick! thanks Peter ! worked a treat. 'beeep'ed great ! Try swapping 2 and 3 over |
||||
| lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3481 |
Re DO, it's not clear what you're seeing or finding a problem with, but you need a ":" after DO. PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
| phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2835 |
Perhaps he is expecting an error as WHILE is usually the only thing that can follow DO. Trapping every possible typo is a bit difficult. |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |