cocus / vc288-alt-fw

VC288 Volt-amp meter alternative firware. Targets the cheap DSN-VC288 volt-amp meter and the STM8S003F MCU.
21 stars 12 forks source link

Out data to UART #1

Open jetdream opened 6 years ago

jetdream commented 6 years ago

Feature request Would be great to have the data sent to UART if values are changed.

cocus commented 6 years ago

The UART pins are shared with the 7 segment muxed display. In order to enable this feature, we'll have to disable the third digit of the first row. And it will flicker with random segments on/off. If you want to use it as remote 2-channel ADC, and you don't mind this, then it might be doable.

jetdream commented 6 years ago

Got it. Actually yes, in my case I want to use it primarily for remote reading the voltage and current. I need indicator just to visually get the information during maintenance, so the occasional flickering is not the problem since it will happen only when values are changing. So it might be a config option.

cocus commented 6 years ago

Actually, the random flickering will be present there when you are transmitting. When the UART is idle, it will be at a HIGH state, meaning that the LEDs in that digit (in case that you have a common-cathode) won't be lit any time. In both case, when transmitting data, the digit will flicker.

But in any case you'll not be able to modify the digit because you don't have control of that pin.

And if you want to create a scheme where you can enable the UART temporarly to send data, you'll end up with garbled data in the receiver whenever the UART is not enabled.