PDA

View Full Version : USB power definitions



RYTECH
- 23rd June 2008, 16:01
Hi,

I've (finally!!!!) got a working "FS PICDEM" type 18F4550 protoboard (I made my own) with rb4 and mclr using pushbuttons to set bootloader mode etc. It works great (finally, 3 protoboards and a breadboard circuit later).

I've got DT's Instant Interrupts working to service the usb instead of polling, I think it's working - my device is recognized and stays connected.

Now, what I would like to do is get farmiliar with this USE_SELF_POWER_SENSE_IO operation. I've read the Microchip C18 user guide that describes the functions, but I still don't get how it's going to work - there's mention of a sense I/O pin, I happen to have RA2 reading my "AA" battery voltage b4 it goes into a maxim boost chip (max756). I have a maxim boost IC on my board and a 7805 regulator for some options for power... so far I've only managed to have the pic be recognized in "bus powered" mode. I.E. When I've commented out the power sense / bus sense definitions.

Can anyone shed light on how to make my device operate in "self powered" mode and get recognized, anyone doing anykind of autoswitching for supply power?

Any help is appreciated - I've googled can't seem to find anyone getting into the specifics of USE_SELF_POWER_SENSE_IO.

Darrel T, Bruce, Melanie, Mister_e, skimask, or any other PIC genious care enlighten the noobery on how to use this feature / setting.

Thanks in advance,.. RYTECH

RYTECH
- 23rd June 2008, 18:57
scratch that... what was working perfectly yesterday is now having major issues...grrrr.... when i hold down RB4 button and press mclr button the pic reboots showing up correctly as the "Microchip Custom USB device" as soon as I let RB4 go the device disconnects and the device dissapears in device manager... if I hold down RB4 I can use the bootloader application to read and write hex files to the device... but as soon as the RB4 is released the device disconnects...

RYTECH
- 23rd June 2008, 19:01
when I program the chip (while holding down RB4) with the mouse demo it works as expected when started with a cable plug, does not work when MCLR rebooted. The HID works when fresh plugged and does not disconnect on its own.
Any ideas...

RYTECH
- 23rd June 2008, 20:08
jeesh... now it's reverted to operating normally after I did nothing... I thought USB was supposed to make things easier! lol

RYTECH
- 24th June 2008, 05:52
just to update the thread in case anyone else is actually reading it... the pic seems to work fine when I program the mouse demo (or my cdc application code) using the usb bootloader, but, a) it wont reset to the user code from the bootloader mode using memory clear i have to fully unplug the cable (and thus the bus power), b) releasing RB4 seems to make the PIC in usb bootloader mode disconnect.

RYTECH
- 24th June 2008, 18:40
A fresh start today, I re-downloaded the Microchip Framework and (re)programmed the 18F4550 with the precompiled bootloader... seem's to have resolved the issues I was experiencing... anyone have any info on the Power sensing stuff?

Sorry for flooding this thread.