Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : PWM problem, probably me but..
Author | Message | ||||
DaveJacko Regular Member Joined: 25/07/2019 Location: United KingdomPosts: 76 |
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 |
||||
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: 9129 |
You are setting a value (0) for pwm1b. Just omit the ",0" |
||||
DaveJacko Regular Member Joined: 25/07/2019 Location: United KingdomPosts: 76 |
That was quick! thanks Peter ! worked a treat. 'beeep'ed great ! |
||||
lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3150 |
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: 2137 |
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. |
||||
Print this page |