Programming editor bug (v 5.3.2)

nbw

Senior Member
Hi Technical, just found a small bug in the editor

On the PWMOUT wizard, I entered 60 as the value of Hz (without realising it might be a bit low). The editor threw an error message that said:

"Runtime error 6 - overflow"

(Is finding this worth a free picaxe ;-)
 

nbw

Senior Member
Oh, and after you click 'OK' the whole editor shuts down. Bummer if you have unsaved code! Reminds you though to frequently save :)
 

nbw

Senior Member
No worries :)

It doesn't quite solve how I'm going to get a 100 - 150 Hz square wave out of the PWM pin, but it all helps to fine-tune an already very good piece of software.

cheers
barney
 

eclectic

Moderator
No worries :)

It doesn't quite solve how I'm going to get a 100 - 150 Hz square wave out of the PWM pin, but it all helps to fine-tune an already very good piece of software.

cheers
barney
Which Picaxe chip?

Is it possible, say,
to set the pwmout frequency to
400 or 800.

Then, slow the clock using
Setfreq or
Poke $8F

e
 

nbw

Senior Member
I'm temporarily using a 40x1 at 8MHz, I can get it down to about 500 Hz pwm and then it says "no more".

I'm going to be using the square wave (at about 100 - 150 Hz) to drive the backplane of an LCD, not sure if they would like being kicked at 500 Hz.

The alternative of course is the good ol', ubiquitous 555 in astable mode :)
 

eclectic

Moderator
I'm temporarily using a 40x1 at 8MHz, I can get it down to about 500 Hz pwm and then it says "no more".

I'm going to be using the square wave (at about 100 - 150 Hz) to drive the backplane of an LCD, not sure if they would like being kicked at 500 Hz.

The alternative of course is the good ol', ubiquitous 555 in astable mode :)
Well, if you're going to use another chip,
why not use a Picaxe.

e
 

Dippy

Moderator
If you want to see the nitty-gritty of calculating pwm range then get yourslef a copy of PIC Multicalc.

It is a very useful little App. and has had quite a few mentions on this Forum.

Even if you can't set the registers youself, it'll give an ACCURATE value for range.
 

Attachments

Last edited:

hippy

Technical Support
Staff member
While waiting for a Programming Editor PWM Wizard fix, it's possible to use the PWM Wizard of WinAXEpad instead.
 

nbw

Senior Member
@Dippy - it just seems a bit of waste to use a picaxe and slow the poor bugger all the way down to generate a slow-enough square wave, I ended up using a cap, 2 resistors and a grubby old 555.... :)
 
Top