Thanks Steve.
I'm using PBP 2.45a to compile your code
and I'm getting an error:
"59: [235] Opcode Expected Instead of '_config'
Does the code compile for you?
Thanks Steve.
I'm using PBP 2.45a to compile your code
and I'm getting an error:
"59: [235] Opcode Expected Instead of '_config'
Does the code compile for you?
I tried the suggested PWM built in PBP and it works pretty good.
Here is the code I used to get a nice ramp up and down even with
high brightness LEDs which are harder to control linearly.
led VAR PORTB.5
steps VAR WORD
cycles CON 2
' Change limits for steps to play around 0 or 100% brightness
' Change steps for different duration of ramps
' Works good even with high brightness LEDs, harder to control linearly
fade:
up:
For steps=0 TO 255
PWM led,steps,cycles
Next
High led
Pause 2500
down:
For steps=255 TO 1 STEP -1
PWM led,steps,cycles
Next
Low led
Pause 2500
GoTo fade
End
Nick this is caused by the @config line... simply remark this line.. This line set the configuration fuses for your PIC. If you're using PM instead of MPASM this will gives you this error message. See the FAQ about configuration fuses. Really handy stuff.Originally Posted by Nick
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hallo I´m new in programming, is it possible to get the circuit for the programm from Nick.
Thank you.
Olli
Hello Olli,
All you have to do , is connect a diode to the pin in which you are working with... connect up your +/- voltage, and presto. No circuitry per se is required...is it possible to get the circuit for the programm from Nick.
Dwayne
Ability to Fly:
Hurling yourself towards the ground, and missing.
Engineers that Contribute to flying:
Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute
Pilots that are Flying:
Those who know their limitations, and respect the green side of the grass...
Bookmarks