Dear members,
FOA,I'm not new to the PIC World, I'm using CCS C compiler regularly
Recently I started using PICBasic Pro because i knew basic is easy to use when it come create very simple project... you know leds stuff!
However after reading that @ __config is depreciated for PIC18
I'm trying to use CONFIG instead but how ?
Code:
CONFIG FOSC = HS,LVP = OFF,BOR = OFF,MCLRE = OFF
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
Microcode studio says ERROR syntax at the first line! why ?
Yes i did read the other post, including the faq about headers but like i said __CONFIG dont work anymore with MPASM
Best Regards,
Laurent
EDIT: oh btw , pic18f4550 with 12mhz hs xtal
Bookmarks