Pic 18f Usb


Closed Thread
Results 1 to 40 of 135

Thread: Pic 18f Usb

Hybrid View

  1. #1
    Join Date
    Jul 2005
    Posts
    93


    Did you find this post helpful? Yes | No

    Default

    Ok that compiled... with warnings...

    Warning c:\progra~1\picbas~1\18F4550.inc 20: _CONFIG has been depreciated for PIC18 devices. Use CONFIG (repeated about 8 ti

    does the fact that the "POKE" command compiled tell us why ADCON1 & ADCON2 would not?

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by RYTECH View Post
    does the fact that the "POKE" command compiled tell us why ADCON1 & ADCON2 would not?
    PBP 2.47 shows fixes for miscellaneous items and a few other things.
    Maybe that's one of the fixes...who knows. And, heck, if Poke works, who cares

  3. #3
    Join Date
    Jul 2005
    Posts
    93


    Did you find this post helpful? Yes | No

    Default

    Ok, so poke just manually writes values to the given registers?

    I'd still like to figure out why ADCON1 & ADCON2 is not working.



    ADCON1 = %00001110 ' A/D channel 0

    'ADCON2 = %10000011 ' Left justify for 10-bit
    Poke $fc0, $83 'which is the same thing as the line above.
    Last edited by RYTECH; - 11th June 2007 at 00:19. Reason: I asked for the answer to a simple problem

  4. #4
    Join Date
    Sep 2006
    Location
    Mexico
    Posts
    47


    Did you find this post helpful? Yes | No

    Default

    Download Microcode Studio 3.0

    http://www.mecanique.co.uk/code-studio/

  5. #5
    Join Date
    Jul 2005
    Posts
    93


    Did you find this post helpful? Yes | No

    Post info

    This is now what I have installed
    Version:

    Microcode Studio 3.0
    PBP 2.46 (w/patched 2.46 from support page)
    MPASM v5.11
    melabs Programmer Version 4.21 beta

    PIC18F4550

  6. #6
    Join Date
    Jul 2005
    Posts
    93


    Did you find this post helpful? Yes | No

    Exclamation update

    no change to my situation.

    ADCON1 = %00001110 ' A/D channel 0
    ADCON2 = %10000011 ' Left justify for 10-bit
    'Poke $fc0, $83 'which is the same thing as the line above.

    compiling my code posted previously (no other changes) using the code above still causes a Syntax error.

    'ADCON1 = %00001110 ' A/D channel 0
    'ADCON2 = %10000011 ' Left justify for 10-bit
    Poke $fc0, $83 'which is the same thing as the line above.

    using the code above it compiles.

    i'm new to poking ... I guess i've never had to directly write to any registers. I think i've peeked once.

    Ok so I can deal with using POKE commands if they end up working to get my project moving along again.

  7. #7
    Join Date
    Jul 2005
    Posts
    93


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    PBP 2.47 shows fixes for miscellaneous items and a few other things.
    Maybe that's one of the fixes...who knows. And, heck, if Poke works, who cares
    Yeah if the peek and poke work thats fine for me, I had used ADCON commands before and am a little stumped about why it would work in once case for a certain PIC and not for another (the 18F4550). I knew it might be a matter of having support for the specific chip. i'm hoping other commands don't have syntax errors as i go...

    I wonder if 2.47 resolves the Syntax error as I intend to start using the USB type 18Fxxxx type PICs

    How do i find the microcontroller register address for ADCON0 - ADCON1 - ADCON2, is it in the datasheet? ( the sections describing A/D operation dont seem to list the address locations)
    Last edited by RYTECH; - 11th June 2007 at 03:23.

  8. #8
    Join Date
    Jul 2005
    Posts
    93


    Did you find this post helpful? Yes | No

    Exclamation Version 2.47

    Is there no downloadable version of Pic Basic Pro Upgrade 2.47. The shipping is like 3 times the cost of the cdrom!!

  9. #9
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Probably the person who sell you the upgrade may do it for you?
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  10. #10
    Join Date
    Jul 2005
    Posts
    93


    Did you find this post helpful? Yes | No

    Default

    Yeah I suppose I should ask about a downloadable version. I guess 50 bucks isn't all that much to pay for the upgrade in total.

Similar Threads

  1. USB CDC Communications for Dummies!
    By Squibcakes in forum USB
    Replies: 104
    Last Post: - 15th January 2014, 13:43
  2. Reading a slave USB with a pic
    By pcaccia in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 25th October 2008, 12:00
  3. Replies: 15
    Last Post: - 30th October 2007, 19:25
  4. USB communication with pic
    By Shamir in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 14th August 2006, 23:43
  5. USB PIC without USB Connection
    By Tissy in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 26th December 2005, 17:39

Members who have read this thread : 0

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