18f2550 USB OSC Problem


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    Join Date
    Oct 2008
    Posts
    14

    Default

    I wil check again everything i done.. Possibble i made a mistakeee

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

    Default

    reduce your code to a blink test and post everything here using the code tags...
    Steve

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

  3. #3
    Join Date
    Oct 2008
    Posts
    14

    Default

    Thanks for your interest.

    This is what I have done.. So I want to make serial connection

    Now i reduced my code.. Now it's working... but if I use PAUSE 1000 without for.. next, it interrupts USB connection.. But leds blinking right time... I will try now serial connection again..

    Another question : For what do I need DEFINE RESET_ORG 800h and DEFINE INTERRUPT_ORG 808h ?

    define OSC 48
    DEFINE LOADER_USED 1
    DEFINE RESET_ORG 800h
    DEFINE INTERRUPT_ORG 808h
    I VAR word
    LOW PORTB.0
    HIGH PORTB.1
    USBINIT

    dongu:
    FOR I=1 TO 1000
    usbservice
    pause 1
    NEXT I
    toggle portb.0
    toggle portb.1
    goto dongu

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

    Default

    Yup, USBService work a treat when you take care of it each millisecondes or so. Another route is to use a Timer intterrupt such as in the first USBDemo version.

    EVEN BETTER, look at the following modified version A.K.A post #148 which use Darrel's instant interrupts...
    http://www.picbasic.co.uk/forum/show...&postcount=148

    so now you no longer need to care about USBSERVICE, it will be done automatically... BUT i've NEVER tried with the bootloader firmware installed
    Steve

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

  5. #5
    Join Date
    Oct 2008
    Posts
    14

    Default

    Can you tell me or give me the code, how can I add TMR0 interrupt to my project ?
    But I understood after your explenation what this lines mean
    DEFINE RESET_ORG 800h
    DEFINE INTERRUPT_ORG 808h
    I think Interrupts begins after 808h so when an interrupt occurs it will not jump to bootloaders section .. Can be ?
    Last edited by serkanc; - 29th October 2008 at 19:45.

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

    Default

    have a look at USBDemo, first post, first code, everything should be clear after that.
    http://www.picbasic.co.uk/forum/showthread.php?t=5418
    Steve

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

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. 18F2550 MCRL/RE3 problem with USB bootloader Microchip
    By Ronald123 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 24th September 2007, 10:48
  4. Speed of USB EasyHID and Time problem
    By sjohansson in forum USB
    Replies: 10
    Last Post: - 18th January 2007, 22:21
  5. 18f2550 'access is denied' USB error?
    By Giulio in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 30th December 2006, 14:29

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