Hello I found on the internet a standalone charger for the PS3 Pad. which is based on the ATtiny24A .
I wonder if it is possible to rewrite this code on ESP2866 or on its template to write a version on ESP?
The code is available here: ps3-charger.zip
.
I'm hoping for help or guidance on this topic
.
I wonder if it is possible to rewrite this code on ESP2866 or on its template to write a version on ESP?
Quote:USB is only supposed to supply power to devices that have been correctly calculated. In particular, devices must not draw a maximum of 500 mA unless the host has specifically assigned a device configuration that required that much power. Many devices ignore this rule or follow the USB battery charging specification , which provides the ability to configure a higher current draw using a specific resistor configuration on the D+ and D- lines. This is used by most USB-charged mobile phones etc, so it is easy to charge them with just 5 volts and a resistor. Most USB wall chargers also have this resistor.
However, the Sixaxis and Dualshock 3 controllers do not follow this convention and require full enumeration before charging. This means they cannot charge with most USB chargers and must talk to a real USB host and go through the enumeration process before they start drawing power.
A friend of mine wanted to build his own docking station to charge the controller, so we came up with a circuit and code that would do just enough of the USB enumeration process to get the controller to charge. The PS3 controller is a full-speed USB device, which means you need to talk to it at 12 MHz for this to work. We used the ATtiny24A , which is one of the smallest and cheapest MCUs that can control the output pins so quickly. The circuit is simple:
.
JP1 is only for in-circuit programming and is not necessary if you are programming the circuit in any other way. U2 is any 3.3v regulator. JP2 is where you supply 5v.
It currently only supports one controller. It must be directly connected to the controller; you cannot use a hub. The MCU should be able to handle charging up to 4 controllers simultaneously using other free pins, but the code needs a bit of love before this works.
The code is available here: ps3-charger.zip
Code: C / C++
I'm hoping for help or guidance on this topic
