FREQOUT compiler error on USB Pic


Closed Thread
Results 1 to 26 of 26

Hybrid View

  1. #1
    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

  2. #2
    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

  3. #3
    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

  4. #4
    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?

  5. #5
    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...

  6. #6
    Join Date
    Mar 2008
    Posts
    43


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    Word, highbyte, lowbyte, byte1, byte0, and so on...
    It's all in the book...
    Ya, but when i need to send it over USB?

  7. #7
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mindthomas View Post
    Ya, but when i need to send it over USB?
    Same thing applies going either sending or receiving...

    variableword var word
    variable_highbyte var byte
    variable_lowbyte var byte

    variableword = (variable_highbyte * 256) + variable_lowbyte
    variable_lowbyte = variableword.lowbyte
    variable_highbyte = variableword.highbyte

  8. #8
    Join Date
    Mar 2008
    Posts
    43


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    Same thing applies going either sending or receiving...

    variableword var word
    variable_highbyte var byte
    variable_lowbyte var byte

    variableword = (variable_highbyte * 256) + variable_lowbyte
    variable_lowbyte = variableword.lowbyte
    variable_highbyte = variableword.highbyte
    In english please
    But look at this:
    Code:
    USBBufferSizeMax   con 8  ' maximum buffer size
    USBBufferSizeTX    con 8  ' input 
    USBBufferSizeRX    con 8  ' output
    
    ' the USB buffer...
    USBBufferIn        Var Byte[USBBufferSizeMax] 
    USBBufferOut        Var Byte[USBBufferSizeMax]
    USBBufferCount   Var Byte 
    
       USBBufferCount = USBBufferSizeTX              ' TX buffer size
       USBService                                    ' keep connection alive
       USBOut 1, USBBufferOut, USBBufferCount, DoOutBuf ' if bus available, transmit data

  9. #9
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mindthomas View Post
    In english please
    That's perfect english...shows how to define a word and a couple of bytes, and how to split them up and join them back together.

    But look at this:
    What about it?

  10. #10
    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.

  11. #11
    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.

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


    Did you find this post helpful? Yes | No

    Default

    How did you know that i should do that?
    The warning message tells you where the problem is. Warning[202] \PBP\PBPPIC18.LIB 1239

    I looked in the library at the line # indicated by the warning message. In v2.50a there was no problem. In v2.47 this was missing, so it's a simple fix to get rid of the warning.

    It also helps if you know assembler...;o]
    Regards,

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

  13. #13
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Bruce View Post
    The warning message tells you where the problem is. Warning[202] \PBP\PBPPIC18.LIB 1239
    Ya know, I never made the correlation between the 'PBPPIC18.LIB' and the '1239' in the error messages. I always did it the hard way described above.
    Thanks for the tidbit...

  14. #14
    Join Date
    Mar 2008
    Posts
    43


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Bruce View Post
    The warning message tells you where the problem is. Warning[202] \PBP\PBPPIC18.LIB 1239

    I looked in the library at the line # indicated by the warning message. In v2.50a there was no problem. In v2.47 this was missing, so it's a simple fix to get rid of the warning.

    It also helps if you know assembler...;o]
    Ohh, it's because i have PBP 2.46!

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


    Did you find this post helpful? Yes | No

    Default

    It may go back a few versions, but I didn't check back any farther than 2.47.
    Regards,

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

  16. #16
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mindthomas View Post
    Ohh, it's because i have PBP 2.46!
    $25 for the upgrade...

  17. #17
    Join Date
    Mar 2008
    Posts
    43


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    $25 for the upgrade...
    To what, 2.50?

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