disconnect USB - is it possible?


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Jun 2005
    Location
    Surrey, England
    Posts
    35

    Default

    Quote Originally Posted by Squibcakes View Post
    Guys,

    Having trouble compiling UCON.3= 0

    Getting a syntax error with PB2.47. Anyone else?

    Squib
    I had the same problem - have now bought PBP2.6 upgrade but have not tested yet but I got around this in assembler where UCON is recognised:
    Code:
                T0CON.7 = 0     ' Disable USBservice interrupts
    '           UCON.1 = 1      ' UCON not defined in PBP 2.46
    @	        clrf	UCON	; Disable USB & detach from bus
    @	        clrf	UIE  	; Mask all USB interrupts
    Peter

    PS I have Timer0 running on 1 mSec interrupts - the Interrrupt handler simply doing an USBservice and returning - turned this off here also
    Last edited by FinchPJ; - 24th August 2010 at 10:02. Reason: Postscript

  2. #2
    Join Date
    Jun 2005
    Location
    Surrey, England
    Posts
    35

    Default

    I have just had a chance to check this out and it works fine - add:
    Code:
    UCON    var byte EXT
    to your PBP 2.46 program and it should solve the problem! You can now refer to for example:
    Code:
           UCON.3 = 0
    Peter

Similar Threads

  1. USB CDC Communications for Dummies!
    By Squibcakes in forum USB
    Replies: 104
    Last Post: - 15th January 2014, 13:43
  2. Simple USB Comms Problem
    By awmt102 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 6th January 2010, 20:17
  3. One USB keyboard to Two USB Ports
    By picnaut in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 11th June 2009, 00:04
  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 : 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