variable exceeded ram errors ?
turbo
Posts: 24
Im having a problem with this PWM code im trying to get working it needs alot of work i know im sure this could be done more efficiently but im stumped on how to do it it works with two stages of PWM but as soon as i put all six stages in i get the "variable exceeded ram " errors any help on this would be wonderful.
Comments
Make your variables into arrays. Arrays are stored in a different area then regular variables.
So instead of:
Use
Then you just need to add parens in the code. "Duty(0)" instead of "Duty", and "Duty(5)" instead of "Duty5".
Bean
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.iElectronicDesigns.com
Post Edited (Bean (Hitt Consulting)) : 3/14/2008 11:10:40 AM GMT
cycles = 0
cycles.0 = switch1
cycles.1 = switch2
Now the variable "cycles" will have a value for 0 to 3 depending on how you have the two switches set.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.iElectronicDesigns.com
·
Like in my code where it is
If poval = 120 THEN
GOSUB G1
Something like this
If potval 120 to 140 then
GOSUB G1
This way it will fit inside this window and trigger everytime.
How would i do this?