Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 12:41 29 Nov 2024 Privacy Policy
Jump to

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 : PicoMite: PWM - Invalid frequency

Author Message
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4047
Posted: 08:40am 19 Mar 2023
Copy link to clipboard 
Print this post

Hi Peter,

I know this used to work, up until very recently, as I was using this frequency (with volume 0) when I needed to play a "rest" on my handheld:

> pwm 2,15.43,0
Error : Invalid frequency


Note that 15.43 Hz is the note below bottom-C.

Obviously I can "fix" my code but:

1. Is there a reason for this limitation ?
2. When was the limitation added ? I could swear it was working one week and then not the next week without my having updated the firmware inbetween - obviously that isn't what happened, but still .

Best wishes,

Tom
Edited 2023-03-19 18:40 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9139
Posted: 08:49am 19 Mar 2023
Copy link to clipboard 
Print this post

You are running at a greater cpu frequency than before
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4047
Posted: 09:01am 19 Mar 2023
Copy link to clipboard 
Print this post

Thanks Peter.

You are correct of course and that fixed the problem. I could have sworn I had already tried that already though after I read the source - getting old is no fun, and by the demographics of TBS I'm barely halfway there.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2141
Posted: 11:04am 19 Mar 2023
Copy link to clipboard 
Print this post

From the manual.

Minimum frequency = (cpuspeed + 1) / (2^24) Hz. Maximum speed is
OPTION CPUSPEED/4. At very fast speeds the duty cycles will be
increasingly limited.
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6814
Posted: 11:08am 19 Mar 2023
Copy link to clipboard 
Print this post

Welcome to my world....   ;)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024