System for 1 USD * - TV remote control by piotr_go

Hello, after a long break. This time the Chinese ... chip from Taiwan was used to build an IR remote for TV from LG.
The remote control can turn on / off the TV, change the channel or the volume. The number of functions has been limited due to the small number of IO of the microcontroller.
The used PFS154 can be changed to PMS150C after a slight modification of the program.
Codes:
To find out how the original remote control works, I connected an analyzer to its transmitting diode.
The pilot transmits at a frequency of 38 kHz. First there is a longer start bit, then 8 data bits + the same 8 bits only inverted, then another 8 data bits + negated 8 bits, finally a short stop bit.
Holding the key down causes sending a slightly different start bit every 100 ms without additional data.
The frequency of 38 kHz is generated by software:
Code: AVR assembler
Similarly with "emptiness":
Code: AVR assembler
In the "a" register, the signal length.
Diagram:

I gave up the diode current limiting resistor

The current capacity of the pin at a short-circuit to plus 3.3 V is 24 mA (measured).
* in before covidowo / wojnej currency, 2019 BC (before covid)
Comments
It is a bit unprofessional to load the pin of the microcontroller with a current exceeding 20 mA. I understand that the LED current is limited by the microcontroller gate protection, because the voltage... [Read more]
The Chinese like to connect 7-segment displays without resistors. These microcontrollers have a programmable IO current capacity. IR LEDs consume quite a lot of current> 20 mA If I counted correctly,... [Read more]
But they have very bright displays that even hit the eyes at a few mA. Beautiful tomcat. :D [Read more]
What on the common anode / cathode gives ... I would not connect to AVRk like that. Apparently you can. [Read more]
Well, in fact, such a 'you can because you can', but I have also done such recently, one of the thermometers will flash the temperature with green and red LEDs, and red blinking non-stop when it... [Read more]
Out of curiosity, maybe I will test how much they can withstand a short circuit. I used to tire 3V Chinese ARM above 7V. It didn't die, it just turned off. Until 7 V, he walked normally, he did not... [Read more]
16 mA it would be if some limiting resistor were used in the US. If it is a gate current stabilization, then by subtracting the voltage drop across the LED, there is still more than 2 V of reserve, and... [Read more]
I would not expect a built-in current source from a 3 cent chip. 16mA after taking into account the decrease in the LED, 24 mA without the LED. Although I admit that I did not measure with the LED. I'll... [Read more]
With a higher voltage, the internal value of the reference voltage rev probably also changes. hence a higher but stable value of the gate current for different loads. As long as it is programmable, ie... [Read more]
IO current can be set to normal, low and pull-up. I only measured normal. [Read more]
Which means that whatever you set, its value will always depend on the nap. power supply, not the load, unless there is a voltage drop. the load resistance will be so large that the source will not have... [Read more]
My guess is there must be more than a single transistor shown in the PDF. [Read more]
The transistor shown is a gate / port skeleton only. Probably the PDF contains a simplified / block architecture of the processor itself, so that it is known what it looks like from the perspective of... [Read more]
I tired PA5 set to 0 and shorted to +. After an hour on 3.3V and 5V power supply. The short-circuit current is still as it was. [Read more]
If there was the same mA at a short circuit for 3.3V and for 5V, then you had to configure a stable internal ref source somewhere. either in coffee grounds or in code. I don't know this US, nor have... [Read more]
The PFS154 just has a global setting for all Low / Normal current output pins, something like fuses in the AVR. In PFC460, individual Normal / Strong pins can be individually set in a dedicated IOHD register. ... [Read more]
Same as an hour ago. Nothing has fallen. I will emphasize right away that I do not know the newer AVRs very much. In AVR, is this internal reference used for IO? It eats up a lot of electricity. Some... [Read more]
The value of the output current can be adjusted by software, but to keep a stable parameter, it must have a hardware pattern ... [Read more]
Where do you say that this is a stable parameter? The Iout characteristic as a function of Vcc is almost the resistor characteristic. https://obrazki.elektroda.pl/7444015300_1658490276_thumb.jpg ... [Read more]