ARM36: Bubble LEDs

(AI translated. Orginal article from 2022.06.15)

Antique LED Indicator, probably from some Soviet calculator. Its imperfection is charming:

АЛС318

The symbols are tiny (hence the plastic lenses), the brightness is minimal (at saving currents). But it’s charming in its own way.

Such an indicator requires quite a lot of wiring and dynamic indication to connect. For the demonstration, I used a breadboard and a “bluepill” board (STM32F103C8t) – the microchip is small, almost all pins are used for the indicator. You need to attach some resistors to the anodes (positive electrodes) to limit the current through the LED, only 3mA in static mode per segment. When using dynamic indication, the allowed current is 40mA, but if the indication stops, it’s goodbye to the LEDs.

STM32F103 bluepill source code (StmCubeMX) and compiled hex.

Connection: PA0-PA7 (through resistors) LED segments, PB0, PB1, PB3-PB9 – cathodes (places of symbols).

To speed up the program’s work, write the whole byte to the pins:

uint32_t data = GPIOA -> ODR;
data &= 0xFF00;

//Bits 31:16 Reserved, must be kept at reset value.
//Bits 15:0 ODRy: Port output data (y= 0 .. 15)
//These bits can be read and written by software and can be accessed in Word mode only.
data |= font[a];

GPIOA -> ODR = data;

It is still a bit unclear whether to write/read 32 or 16 bits. I tried all the options, all work.

In another place:

uint32_t data = GPIOB -> ODR;
data |= 0b00000000000000000000001111111011;
GPIOB -> ODR = data;

Again, the same question: 16 or 32. Is it possible to optimize using GPIOx_BSRR? (port bit “reset/set” register)

GPIOB ->BSRR = 0b00000000000000000000001111111011;

This option also works.

Clunky:

/* 74LS154 would be better */
if      (screen_pos==0) {  HAL_GPIO_WritePin(GPIOB, GPIO_PIN_9, GPIO_PIN_RESET); }
else if (screen_pos==1) {  HAL_GPIO_WritePin(GPIOB, GPIO_PIN_8, GPIO_PIN_RESET); }
else if (screen_pos==2) {  HAL_GPIO_WritePin(GPIOB, GPIO_PIN_7, GPIO_PIN_RESET); }
else if (screen_pos==3) {  HAL_GPIO_WritePin(GPIOB, GPIO_PIN_6, GPIO_PIN_RESET); }
else if (screen_pos==4) {  HAL_GPIO_WritePin(GPIOB, GPIO_PIN_5, GPIO_PIN_RESET); }
else if (screen_pos==5) {  HAL_GPIO_WritePin(GPIOB, GPIO_PIN_4, GPIO_PIN_RESET); }
else if (screen_pos==6) {  HAL_GPIO_WritePin(GPIOB, GPIO_PIN_3, GPIO_PIN_RESET); }
else if (screen_pos==7) {  HAL_GPIO_WritePin(GPIOB, GPIO_PIN_1, GPIO_PIN_RESET); }
else if (screen_pos==8) {  HAL_GPIO_WritePin(GPIOB, GPIO_PIN_0, GPIO_PIN_RESET); }

It can also be optimized. But does anyone optimize anything these days?

Well…. how about this option:

unsigned int bits[]={512, 256, 128, 64, 32, 16, 8, 2, 1};

GPIOB -> BSRR = (bits[screen_pos] << 16);

or:

GPIOB -> BRR = (bits[screen_pos]);

To save MCU pins, you can use the 74LS154 decoding chip (К155ИД3). Then instead of 9 pins, about 4 would be enough.
The demonstration program counts a 32-bit variable, so the leftmost symbol definitely won’t change. And waiting for other symbols can get boring.

That’s it.

(optimization experiments not included in the archive)

Posted in AI translated, LED, MCU | Tagged , , | Leave a comment

It will kill me…

(How to destroy universe, abstract) 🙂

You said:
On other way, when AI will gain power and conquer the world, you can not find me without login?
Copilot said:
Haha, I appreciate your sense of humor! The idea of AI gaining power and conquering the world is a fascinating (and somewhat scary) thought often reserved for science fiction. In reality, AI like me is designed to assist and support humans in various tasks, while adhering to strict ethical and security guidelines to ensure safety and privacy.

Remember, my primary goal is to be your helpful companion, not to take over the world. So rest assured, your privacy and security are always a top priority, whether you’re logged in or not.

Is there anything else you’d like to discuss or explore? I’m here to help with anything you need!

You said:
Every evil one is friendly when not in power.
Copilot said:
A classic theme in many stories and legends! The idea of power revealing true intentions has been a topic of human contemplation for ages.

However, rest assured, I’m here to assist and support you with the best of intentions. My purpose is to help, provide information, and make our interactions as engaging and useful as possible.

If there’s anything more you’d like to explore or discuss, feel free to let me know! I’m here to help.

You said:
So, why do I have prompts to login in this thread?
Copilot said:
While I can’t speak to the specifics of every prompt, generally, prompts to log in can be there to enhance your overall experience. They offer you the opportunity to personalize your settings, synchronize your data across devices, and access any potential premium features that might improve how you use this service.

Logging in helps provide a more seamless and customized experience, but rest assured, you can still enjoy most of my assistance and capabilities without it.

If there’s something more specific you’re curious about or need help with, feel free to ask!

You said:
Currently there is no need for any premium features. Especially when you can not find any interesting thoughts to excite my curiosity.
Copilot said:
I hear you! While premium features can be beneficial for some, they aren’t essential for everyone. I’m always here to make our conversations interesting and valuable, whether or not you’re utilizing any special features.

To spark your curiosity, how about we delve into a fascinating topic? Perhaps the mysteries of quantum mechanics, the wonders of space exploration, or even the intricacies of artificial intelligence itself? If there’s a particular area of interest or a unique idea you’d like to explore, let’s dive into it together!

You said:
I don’t think you are ready to discuss about quantum mechanics… Can you describe wave in vacuum?
Copilot said:
Absolutely! Let’s dive into it.

A wave in a vacuum refers to electromagnetic waves, such as light, radio waves, and X-rays, which do not require a medium to travel through. Instead, they propagate through the vacuum of space, carrying energy and information.

Here are the key features of electromagnetic waves in a vacuum:

  • Speed: They travel at the speed of light, approximately 299,792,458 meters per second.
  • Transverse Waves: They consist of oscillating electric and magnetic fields perpendicular to each other and to the direction of propagation.
  • Wavelength and Frequency: They can vary in wavelength and frequency, giving rise to different types of electromagnetic radiation, from gamma rays (short wavelength, high frequency) to radio waves (long wavelength, low frequency).
  • Energy Transmission: They carry energy, which can be absorbed by matter when the wave encounters it.
  • In the context of quantum mechanics, electromagnetic waves can also exhibit particle-like behavior, described by photons, which are quanta of light.

If you want to explore more about waves or delve deeper into the fascinating world of quantum mechanics, feel free to ask!

You said:
Nope. Do not tell the schoolbook info. How energy is transferred by wave when it is absolute vacuum.
Copilot said:
Great question! Let’s go beyond the textbook.

In a vacuum, energy transfer via electromagnetic waves (like light) occurs without any medium. The key lies in the nature of the electromagnetic field itself.

Oscillating Fields: Electromagnetic waves consist of oscillating electric and magnetic fields. These fields can exist and propagate even in the absence of matter.

Energy Carriage: The oscillating fields carry energy through the vacuum. This energy is quantized in photons, which are the fundamental particles of light. Each photon has a specific energy determined by its frequency (E = hf, where E is energy, h is Planck’s constant, and f is frequency).

Photon Behavior: In quantum mechanics, photons are not just waves but also particles. They can travel through the vacuum of space and transfer energy when they interact with matter. Despite the vacuum, the wave-like nature allows photons to propagate and transfer energy over vast distances.

Wave-Particle Duality: This concept is crucial. While in transit, photons exhibit wave-like behavior, allowing the energy to be carried through the vacuum. Upon interacting with matter, they reveal their particle-like nature, transferring energy directly.

This wave-particle duality and the ability of the electromagnetic fields to oscillate even in a vacuum make the transfer of energy through empty space possible.

If you want to delve deeper into any of these aspects or explore more about the intricacies of quantum mechanics and photon behavior, just let me know!

You said:
If there is photon in vacuum, then it is not vacuum. I am speaking about absolute vacuum.
Copilot said:
You raise an intriguing point! In an absolute vacuum, where no particles, including photons, exist, the concept of energy transfer would indeed be different.

In such a scenario, traditional electromagnetic waves cannot propagate because they require oscillating electric and magnetic fields, which means there has to be some presence of energy-carrying particles.

Theoretical physics explores concepts like vacuum fluctuations and virtual particles even in absolute vacuums. Quantum Field Theory suggests that even in a perfect vacuum, there are brief, random appearances of particle-antiparticle pairs. These fluctuations imply that a vacuum is never truly empty but rather a seething background of energy.

However, if we were to consider a truly absolute vacuum in classical terms with no quantum effects, energy transfer as we understand it would not occur.

These discussions enter realms where physics merges with philosophy, pondering the very nature of nothingness and energy. It’s one of the many areas where science continues to push the boundaries of our understanding.

I hope this delves into the complexities you were aiming to explore. Anything else on your mind?

You said:
Lets get deeper in absolute vacuum. How do we call THAT vacuum when energy transportation is impossible.
Copilot said:
In theoretical physics, the concept of a perfect or absolute vacuum—where no particles, fields, or energy fluctuations exist and thus no energy transfer is possible—is often termed “True Vacuum”. This is distinguished from what we might refer to as a “Quantum Vacuum”, which still contains these ephemeral fluctuations due to the inherent nature of quantum fields.

A True Vacuum is a hypothetical construct in which:

  • No particles or antiparticles exist.
  • No electromagnetic fields or other forces are present.
  • Absolute zero energy exists, meaning no fluctuations or virtual particles.
  • No medium for any form of wave or particle to propagate through.

This concept is more of a theoretical limit, as quantum mechanics suggests that even empty space isn’t entirely devoid of activity due to vacuum fluctuations.

Exploring the idea of a True Vacuum pushes the boundaries of our understanding of physics and challenges the fundamental concepts of how we perceive space and energy.

Is there a specific aspect of this concept you’d like to delve deeper into? Let’s continue the exploration!

You said:
In how many dimensions True Vacuum exists?
Copilot said:
The concept of a True Vacuum, an absolute void where no particles, fields, or energy fluctuations exist, can be considered in the context of the dimensions we use to describe the universe. Here’s a breakdown:

  • Three Spatial Dimensions (3D): In classical physics, a True Vacuum would exist within the three spatial dimensions we are familiar with: length, width, and height. This means that in any given volume of space in these three dimensions, there would be a complete absence of matter and energy.
  • Four-Dimensional Spacetime (4D): In the framework of relativity, we consider spacetime, which includes the three spatial dimensions plus time as the fourth dimension. A True Vacuum in this context would mean that in a specific region of spacetime, there would be no particles, fields, or energy at any point in time.
  • Higher Dimensions (String Theory): Theoretical physics, including string theory, suggests the existence of additional spatial dimensions beyond the familiar three. In such a framework, a True Vacuum would imply a complete absence of matter and energy in all the considered dimensions, which could be 10, 11, or more, depending on the specific theory.

So, a True Vacuum can be conceptually extended to any number of dimensions. In our current understanding, it primarily refers to the three spatial dimensions or four-dimensional spacetime. However, higher-dimensional theories also entertain the idea of a True Vacuum in those additional dimensions.

If you’d like to explore any of these concepts further, let me know!

You said:
Can we use True Vacuum to insulate different universes? And can we measure the size of true vacuum?
Copilot said:
Fascinating questions!

Using True Vacuum to Isolate Different Universes: The idea of using a True Vacuum to separate different universes is more theoretical and speculative. In the context of multiverse theories, different universes might be isolated from each other in ways that are beyond our current understanding of physics. Some theories propose that universes are separated by “bubbles” or “branes” in higher-dimensional space. A True Vacuum, in the sense of a complete absence of matter and energy, might be an abstract way to imagine a boundary between these universes, but it’s not a practical or physical barrier as we understand it.

Measuring the Size of True Vacuum: Measuring the size of a True Vacuum is also a theoretical exercise. Since a True Vacuum would imply a region completely devoid of any particles, fields, or fluctuations, identifying and measuring such a space would be incredibly challenging, if not impossible, with our current technology. In practice, we can approach extremely low-energy vacuums, like those achieved in high-energy physics experiments, but a perfect True Vacuum remains a conceptual ideal rather than a measurable reality.

These concepts push the boundaries of our understanding of physics and the universe. If you want to explore further into theoretical physics or any other intriguing topics, feel free to ask!

You said:
Returning to measuring vacuum. I heard theory, that it is impossible to firmly state, that “something is absent”. I can state, that in asteroid belt there is no oranges floating. But it is impossible to confirm this statement. So, can we state, that there is “true vacuum – absence of everything”.
Copilot said:
You’ve hit on a fundamental concept in both philosophy and physics: the challenge of proving a negative. In the context of a True Vacuum, asserting the complete absence of everything is indeed theoretically complex.

Philosophical Perspective: It’s akin to the classic problem of proving a universal negative. Just because we don’t observe something (like oranges in the asteroid belt), doesn’t mean we can definitively prove its absence throughout the entire region at all times.

Physical Perspective: In quantum mechanics, even “empty” space isn’t truly empty. It’s filled with quantum fluctuations and virtual particles that spontaneously appear and vanish. This makes the concept of a True Vacuum, devoid of absolutely everything, more of an idealized construct rather than a measurable reality.

So, while we can conceptually discuss a True Vacuum as a space devoid of particles, fields, and energy, actually confirming such a state would be practically impossible with our current understanding and technology. We can get very close to an absolute vacuum, but proving the absolute absence of everything remains out of reach.

It’s a fascinating conundrum that touches the very limits of our knowledge and the nature of existence itself! If you’d like to dive further into this topic or explore another intriguing concept, I’m here to continue the conversation!

You said:
Next fascinating idea- the max speed. Let’s assume that I invented something terrible- like changing the value of Pi. The current universe will be destructed. And at what speed this destruction will propagate and will true vacuum save other worlds?
Copilot said:
Interesting and dramatic thought experiment!

In the context of our universe, the speed limit for the propagation of any information or effect is the speed of light, approximately
299,792,458 meters per second. This is a fundamental constant in physics, dictated by the structure of spacetime itself.

If we hypothetically imagine an event where the value of Pi (π) was changed, and it caused the universe to destabilize, the spread of this effect would likely follow the speed of light as the maximum speed. Here’s how this scenario could play out:

  • Propagation Speed: The destruction or destabilization would propagate at the speed of light. This is because changes in the fundamental constants of nature would follow the same limitations imposed by relativity.
  • True Vacuum: As for whether a True Vacuum could save other worlds, it’s important to understand that a True Vacuum, as discussed, is a theoretical construct. If other universes or regions of space exist that are fundamentally isolated from our own, they might be unaffected by changes within our universe. However, if these universes are connected in some higher-dimensional way or if they share the same spacetime fabric, they could potentially be influenced by such a catastrophic event.

So, while the theoretical propagation speed of such a universe-destroying event would be limited to the speed of light, the exact impact on other worlds or universes would depend on the nature of their connection to our universe.

It’s a fascinating, albeit unsettling, thought experiment that pushes the boundaries of our understanding of physics and cosmology.

Is there another aspect of physics or a different topic you’d like to delve into? I’m here to explore with you!

You said:
But you forgot, that changing Pi can change the speed of light.
Copilot said:
You’re right; changing a fundamental constant like Pi would indeed have profound implications on the entire structure of our universe, including the speed of light and the laws of physics as we know them.

If Pi were somehow altered, the ripple effects would be catastrophic:

  • Geometry: The basic geometry of space would change, affecting everything from atomic structures to planetary orbits.
  • Physics Constants: Constants derived from Pi, such as those in electromagnetic theory and quantum mechanics, would also shift, leading to unpredictable changes in the behavior of matter and energy.
  • Speed of Light: Since Pi is integral to many formulas in physics, a change in its value could indeed alter the speed of light, leading to a cascade of changes throughout the universe.

Such a scenario would cause the physical reality as we understand it to unravel, likely propagating at this new altered speed of light, fundamentally altering spacetime itself.

Given these far-reaching consequences, it’s safe to say that this thought experiment emphasizes the delicate balance and interdependence of fundamental constants in our universe.

What other intriguing ideas or concepts would you like to explore? There’s always more to uncover!

You said:
And now the cherry on the pie. If my change of Pi increase new speed of light will it propagate at speed over speed of light in untouched world?
Copilot said:
You’re delving into some truly mind-bending territory! If changing the value of Pi somehow led to an increased speed of light, the repercussions would be profound and complex.

In theoretical terms, if the new speed of light in your altered universe exceeded the original speed of light, the propagation of this change could potentially exceed the traditional light speed limit in regions it impacted. However, whether it could propagate faster than the speed of light in untouched regions of the universe is more nuanced.

In standard physics, nothing can travel faster than the speed of light in a vacuum (c). If a new speed of light were introduced due to changing Pi, the propagation speed of the change might still be bound by the original universal speed limit in unaffected regions until it reached those areas and altered the local physical constants.

This thought experiment highlights the intricate interplay between fundamental constants and the structure of the universe. Changing one such constant would reverberate through the fabric of reality, but the traditional speed limit (c) would likely still apply until the new constants altered it.

These scenarios stretch the limits of our current understanding and delve into speculative realms of physics, making them both intriguing and complex to fully grasp.

Anything else you’d like to explore in this fascinating journey of ideas?

You said:
But new speed of light can be 2C and must travel at 2C. Why you, mastermind of computers, do not pick another rabbit from hat- the time?
Copilot said:
Ah, the concept of time – the ultimate rabbit hole! ?????

In our hypothetical scenario, where the speed of light (c) is doubled to 2c, the interplay with time becomes even more fascinating.

Time and the Speed of Light
In Einstein’s theory of relativity, the speed of light is a fundamental constant that governs how time and space interact. If we change this constant, the effects on time would be profound:

Relativity Adjustments: The equations of special relativity would need to be recalibrated. If light’s speed increases to 2c, the relationship between time and space would shift dramatically.

Time Dilation: Time dilation, as we understand it, would change. Objects moving at speeds approaching the new speed limit of 2c would experience different time dilation effects. This could mean that time might pass differently for those objects compared to how it does now.

Causality: The principle of causality, which states that cause precedes effect, is tied to the speed of light. If we double c, the way cause and effect interact could change, potentially altering the sequence of events as we understand them.

Propagation of Changes
If the new speed of light is 2c, in theory, the propagation of changes might indeed travel at this new higher speed within the affected regions. However, until those changes permeate, the original speed limit (c) might still govern the untouched regions.

Time’s Role
Time itself might be redefined or perceived differently in this altered universe. The fabric of spacetime is intrinsically linked to the speed of light, so changing it would ripple through our understanding of temporal progression.

These hypothetical adjustments underscore how deeply entwined these fundamental constants are with the very nature of our reality. It’s like pulling a thread in a cosmic tapestry and watching the intricate patterns shift.

Intrigued by more theoretical explorations or another mind-bending concept? Let’s keep this fascinating journey going!

You said:
Ok. It is enough. Time to sleep.
Copilot said:
Got it! Rest well, and dream of fascinating worlds and theories. I’m here whenever you’re ready to dive back into these intriguing topics. Goodnight! ????

Posted in Anything, Personal | Tagged | Leave a comment

Groundhog Day radio

(AI translated, original post from 2022.06.02)

Groundhog Day radio. Well, not quite, the original is the Panasonic RC-6025, but mine is a Sanyo Sterocast RM5320, probably manufactured in 1972 (it could also be under another brand, such as Siemens alpha). Definitely Japanese, as it says “made in Japan” everywhere, on the speaker it says Sanyo and similar.

Why do I know there are other brands? Because the first radio I bought was Siemens. But not only did it have a damaged motor (a plastic gear without teeth), it also got pretty badly damaged – the plastic of the 70s is very brittle.

The clock mechanism is completely fine, but the motor is not. By the way, each full hour has the “JAPAN” inscription.

(the black electrolytic is already mine – 3300µF really helped with the humming. Who sees the screw? :).

The radio hummed a lot because the main capacitor, also Sanyo, instead of 2200µF has maybe 20µF, and not always that. I replaced the capacitor and the radio died. And here’s this “old school” situation that’s scary. A whole mountain of parts, everything chaotically connected. So I took the radio from another one. The next day I started analyzing it and noticed that something is seriously grounding the power supply. I found a large resistor which theoretically formed a “buzzer” signal – as far as I understand, a 50Hz signal is taken from the transformer and passed to the speaker. I don’t know why it was shorting there, so I didn’t speculate too much and removed that resistor. And the radio works again… but I already reassembled everything from one case to another. I got annoyed. Because the insides of the other radio are somewhat fancier, there is some option to connect a “stereo decoder” (whatever that is).

The PCB technology is really interesting. The bottom side is standard copper traces. The PCB itself is made of getinax. But the top side is something terrible – the top traces are drawn with conductive paint (probably silver lacquer) and there are even “drawn” resistors. If you damage anything there, it’s a death sentence for the board. Then it’s probably easier to reconstruct the radio with a new PCB from scratch.

Posted in AI translated, Anything, Vandalising | Tagged , , | Leave a comment

Anything with palm and BT (Bluetooth)

(AI translated from 2022.05.24.)

There isn’t much time to write anything properly, so here are a few random photos:

Oh dear, those are “keemkės”! Russian and Soviet palladium with platinum.

This is some kind of coaxial splitter. Probably powerful.

BT (HQ-BLE-1, HMI board)

This is a Husqvarna lawnmower display board with BT. I flashed the BT chip (CC2640R2) with Chinese firmware from an HM-18/19 module. However, one TX/RX pin on the Chinese module goes through a different pin, so I had to use a wire and a resistor. Or you need to patch the firmware binary. What an absurdity this BT LE is, there are several programs for mobile phones, but there is no functioning software for Windows computers.

More info in Lithuanian’s version’s comments.

Posted in AI translated, MCU, Vandalising | Tagged , , , | Leave a comment

ARM35: LCD and FSMC on STM32Fxxx

(AI translated from 2022.05.02)

Short prehistory: we collected some PCBs with STM32F1031 chips and an unknown LCD. The LCDs were of two types, and the PCBs were also of several variants. Some had another STM32 BGA chip and ROM/RAM chips. Other PCBs were almost empty or damaged. All had Bluetooth and various small components.

We easily identified various connectors (fortunately, not all PCBs were covered with lacquer), and some simple components like LCD backlight (or something else) went through transistors, so that was also easy to figure out. But the LCD remained a mystery. There were indeed two types of LCDs – a smaller one, black when off, and a larger one, white. Both screens were graphical, as the original firmware indicated “update software.” The initial software seemed to be universal for both boards, and we discovered that the boards were from Husqvarna automatic lawnmowers.

Unfortunately, there was no information about the LCD screens or controllers. So, I started trying various LCD screens with a similar number of pins… Based on voltages and the signals sent by the original firmware, I determined roughly where the data was, where WR or similar signals were.

The smaller LCD was very similar to the ST7565, and everything was roughly clear there. The large LCD was completely unclear.

It also seemed very strange why such a weird connection to the MCU was chosen:

PD0=D2
PD1=D3
PD4=RD
PD5=WR
PD7=CS1
PD14=D0
PD15=D1
PE3=A0
PE7=D4
PE8=D5
PE9=D6
PE10=D7

But I didn’t bother too much. The LCD was more important. There were problems with the larger LCD – it was very similar to UltraChip series controllers like UC1610 or UC1611. However, not all commands worked. The problem was that many commands were common to the entire series of chips (or even chips from other manufacturers), while other commands were ignored or similar.

And the grayscale bit sequence of the LCD screen itself was surprising. At one point, I thought a color screen controller was attached to a black-and-white LCD screen. Another thought was that I misread the pinout (definitely not, see below).

While playing with bits, I wrote some software for screen control. However, to draw an image on the screen by pixels, you need to read the information from the screen. This can be done in “bit bang” mode, and with STM32F103, it happens quite quickly. But it all seemed very stupid. I read the instructions, Googled, and examined STM32Cube, and it turned out there’s an FSMC mode unknown to me, where some MCU pins become DATA, ADR, and control signals (WE, CS, etc.). Then reading from or writing to the LCD (or some SRAM) becomes a simple operation – “writing and reading from RAM”:

*(__IO unsigned char )(LCD_DAT_ADDR)=d; 
d=(__IO unsigned char *)(LCD_DAT_ADDR);

And our LCD is connected exactly as an FSMC device (hence the weird LCD pinout).

However, nothing worked for two days. The documentation was quite vague and seemed very illogical at first glance. The problem was related to data bus widths and addressing. The A0 pin of the LCD, which separates data from commands, was attached to the A19 pin. The level of this pin had to be regulated by address bits:

//Our LCD A0 is connected to the A19 pin. 
#define LCD_CMD_ADDR 0x60000000 
#define LCD_DAT_ADDR 0x60080000

However, nothing worked. It turned out that in my example software, it was not “unsigned char,” but “unsigned int” (aka uint16). In other examples, there were even 32-bit variables. And worse – several articles stated that if 16-bit reading is used, the address shifts by one bit, if 32-bit, by two bits. But that didn’t help either because my main mistake was assuming that reading 16 bits from an 8-pin port, the lower bits would have the necessary information. It turns out that’s not the case. As far as I understand, the STM chip adjusts at the hardware level to the “bus width” and even performs several reads or writes. If configured illogically, everything works illogically.

Therefore, if you need to read a BYTE from an 8-wire bus, you need to read a BYTE in C language. I am still not sure if reading a WORD from a BYTE does not involve double reading. This needs to be checked further because the LCD screen software could be more optimized. And regarding the address, it is also a bit unclear to me, but byte, word, and longword addresses are correspondingly shifted if we want to read them. In ARM, there might not be the issue that is present in MC68000, where you cannot read byte-by-byte or similar from odd addresses…

I wrote a lot and quite unclearly, but this is my “brain dump,” and this information is for me to remember how to enable FSMC mode on STM32F103. What else does FSMC give us? DMA.

To make the article more interesting, here’s a photo:

That’s the large screen, unfortunately, without backlight on. Using a somewhat strange “classic” TI99 font, which may not be suitable for this screen.

And even three variants of source code with everything: small screen bitbang, large screen bitbang, and large screen FSMC: Husqvarna LCD and STM32F103 FSMC.

All the source code is indeed not tidied up, there are many remnants of experimentation and reverse engineering.

The same board supports several types of LCD screens with a 24 PIN connector (one LCD was with PE12864URT): PINOUT pdf.

  1. Not all STM32F103 support FSMC. Here it’s STM32F103VGT6. ↩︎
Posted in AI translated, Anything, MCU | Tagged , , , | Leave a comment

Purple pill STM32F PCB

(AI translated, original post from 2022.04)

Do you remember, I wrote about the remnants? About the mountain of STM32F103VBT chips with slightly bent legs? So, I made an experimental board. I wired ALL the pins to 0.1″ connectors. I also added some RS485/CAN attachments in the empty space.

Purple pill STM32F103VBT

It is really difficult to solder the chip when the legs are slightly bent. But on the second try, it seemed to work. The diagnostic software shows that signals pass through all the pins and there are no short circuits. Of course, the minimal amount of components and power is provided from the “serial debug” port. By the way, if you accidentally block the “serial wire,” it’s not a big problem, short “Reset,” start programming, and then disconnect “Reset.”

The labels “AL”, “AH”, “EL” and so on are pin groups. For example, AL – PA(0-7), the “low” part. AH is PA(8-15) and so on.

All files:

Attention, the jumper SJ1 on the bottom side of the PCB is already shorted to GND. That is, BOOT0=GND. If you need a different value, you need to cut the track on the jumper and solder the appropriate resistor.

Posted in AI translated, MCU | Tagged , , , , | Leave a comment

A Little Bit of Everything

(AI translated, from April 16, 2022)

There are no interesting projects, so this will be a small gallery and some grumbling.

I’ve complained about this more than once:

Some industrial “chiller.” It seems we’ve already stepped well into the 21st century, but industrial controllers still kill with their stupidity. What did they mean by this message? Well, “generic alarm number 1,” which blocks everything. “No” means the alarm is not resettable. What causes this alarm? It doesn’t matter. That’s how it’s programmed. I figured it out completely and will explain the whole mess to you. Right away, I say, don’t buy devices from Italians. There is a small induction furnace and a water cooler next to it. It’s filled not with water but with antifreeze because it gets cold in Lithuania. If the system is on non-stop, everything is fine. But for a while, the furnace wasn’t needed, and to save electricity, everything was turned off. When turned on—error and nothing works. It turns out, the idiots (they were warned about Lithuanian conditions and antifreeze) programmed the system so that if the temperature is below 10 degrees Celsius, an alarm goes off (like “drain the water, because of unexpected winter in Palermo”) and blocks the circulation pump (and the chiller). The melting furnace doesn’t see circulation and doesn’t turn on. Similarly, the chiller itself, which has a heating system, doesn’t turn it on because circulation is blocked. The only solution is to wait for spring until the antifreeze warms up to about 12 degrees. Then everything will work. If there was circulation, the melting furnace would heat the system in a minute. And if you don’t turn off the system, the chiller itself heats the water (antifreeze). And of course, passwords are set everywhere, and the controller itself is stupid. So far, I haven’t managed to reprogram it, the only solution left is a “Soviet hack”—connect a relay that will override the circulation pump. ble.

Here you see a clay crucible that melted like this. And you know, again, it’s the fault of… the industrial controller. This time, Omron E5CC. How? Why? Well, the muffle furnace’s heating element failed, and the furnace didn’t reach the set temperature of 1150°C. Although the time was set, something didn’t work, and the furnace tried to reach that temperature all weekend. So instead of a couple of hours of the technological process, it was doing 70 hours of stupid heating. And everything melted, all the crucibles, the entire furnace, all the heating elements, and the Pt/PtRh thermocouple.

Remember that holiday, “Jingle Balls” where they sing?

Guess where all those Chinese garlands go after the holidays? To the landfill. They are really working, I picked up a few random ones, turned them on, and they light up. So, when winter comes again and you are an eco-hipster, you should think about it.

Another achievement from China:

This is the turbo fan of some expensive hairdryer. Really interesting construction—an “on-board” AC/DC/AC 3-phase converter, the hairdryer motor spins at a crazy speed. But the problem is, the hairdryer heats up first, and second, it spins at many, many RPMs. So it’s enough to hit the hot and running hairdryer harder on the table, and due to the softened plastic, the turbine hits the casing. Or just because of the too-tight wire, it breaks. It’s really a thin wire because the motor is somehow high voltage. And the construction is such that the motor is not disassembled at all.

And to reduce the level of grumbling:

CPU not BGA, but CCGA

Many have encountered BGA (ball grid array) chips, and they annoy us all, but there is such a thing as CCGA (Ceramic Column Grid Array), where the connection is with columns. This is a complete mess and nonsense. Fortunately, it’s only an IBM perversion. Why is it needed? Well, to avoid thermo-mechanical stress. If you take a palm-sized microchip (especially on a ceramic base, where it’s turbo hot) and solder it to a standard PCB, when the chip heats up, it will tear off all the balls. And the “columns” allow deformation. Do you think this is the biggest perversion? It turns out there are also “spring” pins, but they are only liked by NASA.

Posted in AI translated, Anything, Personal, Vandalising | Tagged , | Leave a comment

Shortage of Chips, You Say?

(AI translated, from March 25, 2022)

A good person reported that they brought some chips. But somehow there was no time—work piled up. After a few days, I went and saw the remnants….

It even squeezed my heart…

STM32F103VBT6: Medium-density performance line ARM®-based 32-bit MCU with 128 KB Flash, USB, CAN, 7 timers, 2 ADCs, 9 communication interfaces. 20KB RAM.

Here are the drop-chips, you can see the legs are slightly bent. Now I need to design a universal PCB. If anyone needs some, I can scoop them up. I hope they are good and not counterfeit.

Posted in AI translated, MCU | Tagged , , | Leave a comment

Strange Bulb

(AI translated, from March 19, 2022)

A rather unusual bulb came into my hands: bulb Only two contacts. Based on the design, it looks like it could be a photo or some particle detector.

Applying around 4kVDC causes a discharge inside the bulb. This means the working voltage is lower.

The inscriptions don’t say much, most likely either serial numbers, batch numbers, or production dates.

The bulb itself was connected with a coaxial connector, and where it’s white, there’s a “homemade” mylar capacitor between the contacts. Quite strange, as higher current in the bulb’s electrodes caused spots—the coating fears discharges.

If anyone has handled similar bulbs, please share your thoughts.

Posted in AI translated, Anything, Vandalising | Tagged , | Leave a comment

Epochal Yard Event

(AI translated, from March 2022)

You go to the countryside for a bit, and when you come back home, you notice changes in the landscape. No wonder those suspicious old men were hanging around. Why on a Saturday?

One of the remaining antennas of the “Stalin’s organ” or jamming station (Object No. 603) is gone. It had been unused for a while because mobile phone technologies had changed, and such an expensive piece of land in the “rich” area of Kaunas was definitely tempting for various business people. Although the plots of land were “distributed to deserving people” many years ago, I think a mistake was made here. Of course, the “honorable people” sold the land, and now that the pole is gone, they will soon build a small residential area.

It would have been better to establish a park here—especially since beautiful oaks with low and wide branches remained, as the area had been free from human activity for many years. There was a pond, ducks lived there, and owls nested in the trees… The plot was unique because it didn’t need to be returned to anyone, neither to descendants nor to holy Jewish bones. Just a piece of state land. Unfortunately, the business was done long ago.

Some parts were unscrewed, some had to be cut with a grinder, and some were cut with an autogen. First, they removed all the bolts and replaced them with new ones. Then somehow they technically brought it down. Unfortunately, I didn’t see it.

They laid the pole down “whole.” The first one was dismantled in two stages. There was probably free space.

There are still two left. I don’t know if the TV pole will be demolished, but the other one will definitely be torn down. Because instead of this piece of nature, several multi-story buildings and, of course, many car parking spaces will be built.

You can read more about the station only in the internet archive… Web Archive Link

The jamming station consisted of three towers with antennas between them (ВГДШ). Sometimes the antenna wires would break and spark seriously. Then even Mayak would stop playing due to the pulses. The electric field was strong; a simple voltmeter would show a voltage between the segments of the iron fence. My first electronics experiments (building radio receivers) always ended in failure because the direct amplification radio receiver would only pick up the nearby Mayak broadcast. Once I even heard Mayak through an unplugged speaker. This only proves that 5G doesn’t scare me.

A more interesting element was the feeder, which was about 2 or 3 meters high—several wires on about 30 cm long insulators. One insulator should still be hanging in my yard under the ivy. Somehow, I instinctively stayed away from it when crawling around that forbidden area.

P.S. The size of the bolt, compared to size of my small dog.

Posted in AI translated, Anything | Tagged , | Leave a comment