Worst day of my life


Closed Thread
Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Nov 2006
    Posts
    70

    Default Still stumped

    I have .47uF on Vusb, and a 4Mhz crystal. The configs are either default (those in the include file for 18F2455) or those from the USBdemo code (with the include file configs commented out). Basically I'm following the design in the USBdemo pbp code. Does the fact that the pc sometimes appears to recognize the PIC imply that the hardware is OK?

    As for what I am trying to do, at this point I just want to get something working--some means of sending text over a usb cable. The end goal is to have a simple data logging device that joe schmoe can plug into a computer and download stored data. Either CDC or HID would be good at this point.

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default

    The default configs for the 2455 are for a 20mhz crystal.
    But you say you also commented those and used the ones in USBdemo which are for a 4mhz crystal, so it may be unlikely, but you may want to verify the settings in the programmer before downloading just to make sure.

    @ 4mhz, Should be ...
    Code:
     
      __CONFIG  _CONFIG1L, _PLLDIV_1_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L
      __CONFIG  _CONFIG1H, _FOSC_XTPLL_XT_1H & _FCMEN_OFF_1H & _IESO_OFF_1H 
      __CONFIG  _CONFIG2L, _PWRT_ON_2L & _BOR_ON_2L  & _BORV_2_2L  & _VREGEN_ON_2L
    Does the fact that the pc sometimes appears to recognize the PIC imply that the hardware is OK?
    No. Not really.
    Especially if it reported being a "HID Mouse".
    Shouldn't have said anything about a mouse with USBdemo.

    USBdemo definitely works, so the problems not in the program (assuming you haven't modified it).

    Have you verified that D+ goes to Pin 3 of the USB connector, D- is on Pin 2, Pin 4 is grounded, and Pin 1 is left Open?

    DT

  3. #3
    Join Date
    Nov 2006
    Posts
    70

    Default A new day

    Thanks for the suggestions, Darrel. It is helpful to know that HID Mouse was not what I should have been seeing. I'm going to try a complete rebuild today and see what happens. I'll try switching out some 20 and 4 MHz crystals. That seems to be a likely explanation since I kept a 4MHz on the board all day yesterday.

    Also I was generally using pin 1 on the USB connector to supply power. I only tried a few times with an external source. I'll give that another shot.

    I didn't mean to imply that USBdemo does not work. There are a lot of success stories on the forum. Props to mister_e.

    More later......

  4. #4
    Join Date
    Nov 2006
    Posts
    70

    Default Some success

    So I tore down the breadboard and tested all the components. Found a capacitor marked at 10uF that only read off at 0.7uF. I replaced it and tried again. This time when I tried USBdemo, the PC recognized it as a USB CDC device and let me install the driver. BUT, I still could not get any communication between the Vbasic program and the PIC. Then I tried the CDC for dummies thing again (now with a 20 MHz crystal) and it worked just fine. So, I am off and running now. Too bad about USBdemo...would have been fun to play with.

  5. #5
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default

    Great, glad you found it. Kind of hard to find those things from this end.

    If you have both the USBdemo and the CDC for dummies projects in the same folder, the files will conflict.
    Since you tried CDC after HID failed, the files are probably still set up for CDC.

    A fresh install of USBdemo in it's own folder would probably fix it.

    DT

Similar Threads

  1. picbasic-l Calculating the day of Week from a date
    By Melanie in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 3rd August 2012, 00:09
  2. Happy Fathers Day.....
    By Dave in forum Off Topic
    Replies: 3
    Last Post: - 17th June 2007, 09:45
  3. EEPROM life expectancy?
    By muddy0409 in forum General
    Replies: 3
    Last Post: - 1st May 2007, 12:44
  4. Bad Eeprom write on '628???
    By bethr in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 17th March 2007, 07:21
  5. Battery Life Calculation???
    By manumenzella in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 24th February 2007, 19:26

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