ANSEL command


Results 1 to 5 of 5

Thread: ANSEL command

Threaded View

  1. #1
    Join Date
    Jan 2006
    Location
    Slovenia EU
    Posts
    32

    Default ANSEL command

    Hello,

    I was made one simple test program with ADC. I have problem with MCS compiled. I don't understand what is wrong with ANSEL = 1 command? Into status line write syntax error!! When disable this ANSEL command compiled finished ok. I was trying compile with PBP2.50b and MPASM and result is equal.
    Who is problem here?

    @ Device PIC12F675,WDT_ON,PWRT_ON,PROTECT_OFF,MCLR_OFF,BOD_ OFF
    ANSEL = 1
    ADCON0 = 3
    CMCON = 7
    DEFINE OSCALL_2K 1
    DEFINE ADC_BITS 10
    DEFINE ADC_CLOCK 3
    DEFINE ADC_SAMPLEUS 50

    w0 VAR WORD
    w1 VAR WORD
    w2 VAR WORD
    w3 VAR WORD
    w4 VAR WORD
    w5 VAR WORD
    w6 VAR WORD
    w7 VAR WORD
    out VAR GPIO.2

    meritev: ADCIN 0, w0


    w1= 1023-w0/2

    high out
    pause w1
    low out
    pause w1

    goto meritev
    Attached Images Attached Images  
    Last edited by Samoele; - 9th January 2009 at 13:25.

Similar Threads

  1. My code for TV remote and MIBAM for RGB control
    By idtat in forum Code Examples
    Replies: 4
    Last Post: - 12th January 2013, 20:52
  2. Easy HID Command -Response application
    By ptig185 in forum USB
    Replies: 25
    Last Post: - 22nd September 2010, 19:56
  3. Active low input?
    By CosMecc in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 8th August 2010, 20:31
  4. Can I do this???
    By noobie in forum mel PIC BASIC
    Replies: 2
    Last Post: - 10th June 2006, 18:57
  5. Interupts and Command string
    By Tissy in forum Serial
    Replies: 13
    Last Post: - 17th March 2006, 23:59

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