FREQOUT compiler error on USB Pic


Closed Thread
Results 1 to 26 of 26

Hybrid View

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

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

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

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

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

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

  7. #7
    Join Date
    Mar 2008
    Posts
    43


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    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.


    What about it?
    What about it: It's how the code is used in the USB Script, so how could i get more than only a byte to send? Can you set to bytes together so you can send 255*255?

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