FREQOUT compiler error on USB Pic


Closed Thread
Results 1 to 26 of 26

Hybrid View

  1. #1
    Join Date
    Mar 2008
    Posts
    43

    Default FREQOUT compiler error on USB Pic

    I have now got my USB Project working, and i am now working with some sound! (I needed to Comment out some lines in the 18F2550.INC file)

    But now when i use FREQOUT command in my USB script i get this error:
    "Warning[202] \PBP\PBPPIC18.LIB 1239: argument out of range. least significant bits used."

    I don't know what it is, but i think it's somthing with a kind of config!

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mindthomas View Post
    But now when i use FREQOUT command in my USB script i get this error:
    "Warning[202] \PBP\PBPPIC18.LIB 1239: argument out of range. least significant bits used."
    Generally, it means you're trying to stuff a WORD variable into a BYTE register.

  3. #3
    Join Date
    Mar 2008
    Posts
    43


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    Generally, it means you're trying to stuff a WORD variable into a BYTE register.
    Ohh, but why? The code line is this:
    Code:
    FREQOUT buzzer,1000,2000	'Freq=262 Hz

  4. #4
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Open your pbppic18.lib and scroll down to line number 1239. Where you see addlw (sintable) change it to addlw low(sintable)
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  5. #5
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    Bruce, What version of PBP do you have there? I just checked my latest version w/patch and find no instance of this.

    Dave Purola,
    N8NTA

  6. #6
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Hi Dave,

    I have the latest version + I keep all older versions for tech support. v2.47 is the version
    I noticed the low missing in. It works even without the mod, but always returns the warning.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  7. #7
    Join Date
    Mar 2008
    Posts
    43


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Bruce View Post
    Open your pbppic18.lib and scroll down to line number 1239. Where you see addlw (sintable) change it to addlw low(sintable)
    Thanks.. It worked, and how did you know that?

    Another thing, how can i put two bytes together, because i need to select the FREQUENCE with USB, but i can only go up to 255, so how can i make so i can send a higher value?

  8. #8
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mindthomas View Post
    Thanks.. It worked, and how did you know that?

    Another thing, how can i put two bytes together, because i need to select the FREQUENCE with USB, but i can only go up to 255, so how can i make so i can send a higher value?
    Word, highbyte, lowbyte, byte1, byte0, and so on...
    It's all in the book...

  9. #9
    Join Date
    Mar 2008
    Posts
    43


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Bruce View Post
    Open your pbppic18.lib and scroll down to line number 1239. Where you see addlw (sintable) change it to addlw low(sintable)
    How did you know that i should do that?
    Just want to know if it happends again.

  10. #10
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mindthomas View Post
    How did you know that i should do that?
    Just want to know if it happends again.
    If you've got MCS setup to dump out a .lst file with all the options turned on (usually fairly HUGE files), you can usually scroll thru it or search it for the phrase 'ERROR', then using a bit of deductive logic, can usually trace that back to your original problem...whether it be a problem with the typist, an include file, a macro, whatever.

Similar Threads

  1. USB CDC Communications for Dummies!
    By Squibcakes in forum USB
    Replies: 104
    Last Post: - 15th January 2014, 13:43
  2. need help! to beginner
    By emilhs in forum mel PIC BASIC Pro
    Replies: 27
    Last Post: - 6th May 2009, 18:44
  3. Reading a slave USB with a pic
    By pcaccia in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 25th October 2008, 12:00
  4. Replies: 15
    Last Post: - 30th October 2007, 19:25
  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