Isn't the USB-connector at J2 blocking the voltages with schottky diodes? That port afaik is the one directly connected to the PSoC chip while the other is used for programming and debugging. Or has the diode reached its unglorius end?
Thank you both for your responses. I think I was a bit mislead by the attached portion of the schematics. I thought that meant VBUS was connected to a pin. It sounds like I won't be able to do what I want without any modifications.
My new plan is to power the board via AC adaptor, cut my USB cable, solder a pin onto the VBUS wire from the USB cable, plug it into one of the GPIO pins on the prototyping area, and try to trigger my ISR on the rising edge of that pin. Does anyone see any major flaw with that plan?
VBUS2.png 116.8 K
Page 15 in the -030 kit user guide explains how the power section work. To sum it up:
- the AC adapter and the 9V battery are diode-ORed into Vin (look at the image Dana posted)
- from Vin, all the power rails are generated (digital 5 and 3.3V rails, and analog 3.3/5V rail)
- also, Vbus from the USB connector is diode-ORed into Vin (and in the 5V digital rail)
- same for Vbus from the debug USB connector
- so all of these power sources can power the PSoC, and they won't conflict with each other
- in the schematic part you posted, R8 is marked as 'no load', so its not on the board
- so P6_7 is not connected to Vbus2
- but you can add it, and it will detect all a signal at Vbus2 (which is the normal USB connector)
- Vbus2 won't be powered by any other power source (all external power sources are connected via diodes, so therew is no current backflow)
Interestingly, the section 'USB compliance for self-powered devices' in the USBFS component data sheet requires exactly what you want to do.
So just place R8 and R2 on the board (to get a voltage divider), and you should be ready to go. The voltage you are measuring can be just from the pin being an output, or from an internal pullup. The pin should not, in fact, be connected to the USB port after all.
I made such a nice bulleted list, and then the formatting is not shown :( And I cannot go back and edit the post *desperate*
Awesome. Thanks for pointing out what "No Load" means. I will get some resistors in there and make some magic happen. Thanks!
Welcome to the wonderful world of PSoC :)