PICBasic newbie problem


Results 1 to 33 of 33

Threaded View

  1. #1
    Join Date
    Feb 2008
    Posts
    8

    Question PICBasic newbie problem

    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
    Last edited by ELCouz; - 7th February 2008 at 22:09.

Similar Threads

  1. Newbie? Problem with LCD
    By lew247 in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 7th December 2009, 19:48
  2. Picbasic Newbie Problem
    By Stargazer3141 in forum mel PIC BASIC
    Replies: 4
    Last Post: - 21st August 2007, 17:40
  3. Problem on writing EEPROM in Winpic800 with picbasic pro
    By selimkara in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 4th May 2007, 16:33
  4. PicBasic Pro Math Problem??
    By Glen65 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th March 2006, 04:36
  5. DMX & PicBasic coding problem
    By magicmarty in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 20th September 2004, 15:35

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts