hexagon5un / hackaday_esp-14_power_meter

An experiment in crazy: running an interactive Forth shell on a tiny microcontroller, connected to WiFi
14 stars 4 forks source link

quick question #1

Open markfink opened 5 years ago

markfink commented 5 years ago

Hi, I just realized that you are from Munich, too. servus

I want to use an STM8 device like this one: https://github.com/TG9541/stm8ef/wiki/Board-W1209

... and add an ESP-32 - for wifi control. can your code help with that?

I can manage the esp (& sw side of things). My question is on the hardware side - do I replace the STM8 or just connect rx, tx? I guess for the reprogramming I take the STM8 out?

hexagon5un commented 5 years ago

Servus!

That project (Forth on STM8s) isn't mine, but I did have some fun with it. :)

The short answer is that you leave the STM8 in place, but you'll have to hook up some wires to a few test points under the board to flash in the Forth firmware. Once that's done, you can connect up to the chip's serial pins (RX/TX/GND) and you've got an interactive terminal. Play around with that, live from your laptop, until you've got a good enough feel for the Forth system, and then you can connect up the serial lines to the ESP, which can then send the commands you would have otherwise typed in.

My experience is that it's also worth hooking up the NRST reset pin from the STM8 device to the ESP so that you can reset it remotely in case it gets wedged. Once you get the code right, the systems are extremely reliable. But when you're just starting out with Forth, you'll press reset a lot.

A final warning: the ESP spits out a bunch of bootup status stuff over serial, and will send this to the STM8 on bootup. It's possible that this will confuse it. Again, a quick reset on the STM8 will get you back to a known-good state.

Or you could remove the STM8 and just run the hardware from the ESP. Aside from running the LED display, the STM8 only uses an ADC input and a couple of outputs -- you could run those directly from an ESP32. Heck, that might be easier. :)

What are you building?

On 18-10-23 04:22:46, Mark - notifications@github.com wrote:

Hi, I just realized that you are from Munich, too. servus

I want to use an STM8 device like this one: https://github.com/TG9541/stm8ef/wiki/Board-W1209

... and add an ESP-32 - for wifi control. can your code help with that?

I can manage the esp (& sw side of things). My question is on the hardware side - do I replace the STM8 or just connect rx, tx? I guess for the reprogramming I take the STM8 out?

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/hexagon5un/hackaday_esp-14_power_meter/issues/1

markfink commented 5 years ago

@hexagon5un thank you... I will definitely try that... I already ordered the programmer and parts! once that works I try to use the same approach on the STC 1000 (temperature controller for brewing etc.). A proper approach would be to design a PCB to replace the STM8 with a ESP-32 but this is just too much of a project for me.