Emile666 / stc1000_stm8

STC1000p for the STM8 microcontroller (HW version WR-032)
GNU General Public License v3.0
45 stars 10 forks source link

New rev WR-032 V2 #12

Open radim100 opened 3 years ago

radim100 commented 3 years ago

I have received STC-1000 WR-032 V2 with 74HC164 chip on front board and no-label chip for uC , still assume that it is STM8 based . SWIM interface has signals SIG , RST , VDD, GND , GND1 so probably it is uC STM8 Please is there any schematics or info on this revision ?

lalo-uy commented 3 years ago

May you upload photos of both sides of the boards?

radim100 commented 3 years ago

20210325_165335 20210325_165328 20210325_165318 20210325_165309 20210325_165300 20210325_165249

radim100 commented 3 years ago

20210325_170056 SWIM Pins + GND1

radim100 commented 3 years ago

20210325_170302 20210325_170314

radim100 commented 3 years ago

I have added 10k resistor from RST to VCC since reset was sitting at GND

lalo-uy commented 3 years ago

It is hard to tell without checking continuity with a tester. My bet is that the 74164 outputs goes tho display pins 5 to 12. The cpu loads the shift register with data on pin 1&2 and clock on pin 8. You need to check where in the cpu are that pins connected. In the original hw the display pins are used also for input functions, ntc1&2 and buttons. In this hw the functions are not multiplexed, simplifying the software.

El El jue, 25 de mar. de 2021 a la(s) 20:05, Radim Stepanik < @.***> escribió:

I have added 10k resistor from RST to VCC since reset was sitting at GND

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Emile666/stc1000_stm8/issues/12#issuecomment-807684855, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXBW4P2FTF47HWVO33IX2TTFO6SLANCNFSM4ZZNQHOQ .

radim100 commented 3 years ago

Hello Eduardo and thanks for reply . Yes I agree with 74HC164D shift register functionality .

My problem is that so far I could not communicate with STM8 neither from STVP or IAR debugger / programmer .

I have modified following so far :

  1. pull up 10k on RST
  2. Pull up 2k7 on SWIM
  3. Originally VCAP capacitor was not populated so I have added 1uF
  4. Originally 10nF cap on RST was not populated - added

I have checked some connections

  1. PIN 18 of uC is connected to SIG pin on 5 pin front header ( SWIM signal ). It is also shared with DOWN push button .
  2. PIN 4 of uC is connected to RST pin on 5 pin front header ( /RST signal )
  3. GND1 on 5 pin header is connected to VCAP I power front board USB ST-Link ( 3.3 V or 5.0V ) the same result - display powers up OK I have verified that ST-Link works on another board with similar STM8L051 uC , verified reading and writing from STVP and IAR .

Is there any HW R/W protection of this uC I have to enable before communicating with SWIM debugger ?

radim100 commented 3 years ago

Clipboard01 This is error screen I get

Emile666 commented 3 years ago

I have not seen this HW version before. Last ones I bought were all with a Nuvoton N76e003at20 uC. Were did you buy this version? Can you try the STVP suggestion from the dialog box? With NRST forced low. I have not seen this protection before. Only one I had was the read-out protection. I am interested to hear some more. Maybe I can adjust the firmware, so that it works with the HC164 device.

radim100 commented 3 years ago

Hello Eduardo , Thanks for your reply I have bought this one from Amazon :

https://www.amazon.ca/gp/product/B07SFM44WS/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1

The uC on chip print is removed so I cannot say for sure what uC is used . I just guessed that if SWIM header is present and SWIM, RST, VCC, GND signals have continuity check to corresponding pins on uC that it is STM8 family chip . Based on your experience with Nuvoton chips , are they direct pin-pin replacement for STM8 . I was under impression that Nuvoton is using different ICP signals .

Regarding to STVP suggestion with holding NRST low during power On , yes I have tried this with no success . I like HC164 chip use since it would release lots of pins of uC . Our goal is to preserve as much as possible HW from original STC-1000 and somehow attach ESP8266 or ESP32 module to it for WiFI MQTT connectivity to regulator . Also ( of course ) it is challenging project :-) :-) Thanks for your interest and help

lalo-uy commented 3 years ago

I wuld like that too. Setint some form of commands in/out on the serial will be enough to hook it to a Tasmota for mqtt connectivity.

El El sáb, 27 de mar. de 2021 a la(s) 20:05, Radim Stepanik < @.***> escribió:

Hello Eduardo , Thanks for your reply I have bought this one from Amazon :

https://www.amazon.ca/gp/product/B07SFM44WS/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1

The uC on chip print is removed so I cannot say for sure what uC is used . I just guessed that if SWIM header is present and SWIM, RST, VCC, GND signals have continuity check to corresponding pins on uC that it is STM8 family chip . Based on your experience with Nuvoton chips , are they direct pin-pin replacement for STM8 . I was under impression that Nuvoton is using different ICP signals .

Regarding to STVP suggestion with holding NRST low during power On , yes I have tried this with no success . I like HC164 chip use since it would release lots of pins of uC . Our goal is to preserve as much as possible HW from original STC-1000 and somehow attach ESP8266 or ESP32 module to it for WiFI MQTT connectivity to regulator . Also ( of course ) it is challenging project :-) :-) Thanks for your interest and help

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Emile666/stc1000_stm8/issues/12#issuecomment-808814768, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXBW4K7GL3EZUYW2L6LYULTFZQB3ANCNFSM4ZZNQHOQ .

radim100 commented 3 years ago

Hi Eduardo , I have ordered second STC-1000 from different vendor on Amazon . Hopefully it will be older version with STM8 Should have it on Monday . I will let you know .

radim100 commented 3 years ago

Hi Eduardo , My second STC1000 arrived but it is completely different than others . It has Nuvoton MS51FB uC , hiding under LCD :-) See some attached pictures . It is hard to figure out from what supplier what version would come . I saw you have some STM8F105 PCB from Eagel design . Are those open source or private ?

radim100 commented 3 years ago

20210329_170102 20210329_170007 20210329_170019 20210329_170014

Emile666 commented 3 years ago

I made a frontpanel and a backplane in Eagle: it reuses the 7-segment display. Problem is that newer stc-1000s, with the nuvoton uC, sometimes ship with a CA 7-segment display. So I updated my frontpanel and added a MCP23017 IC that controls the 7-segment display, no matter if it is CA or CC. With the MCP23017, the CA or CC option can be set in software.

I also made a frontpanel version with the stm8s105 uC: this one has more IO and also includes an one-wire (DS18B20) temperature sensor interface, uart comms and I2C. To have this available at the back, you also need a new backplane pcb. So I reuse the stc-1000 casing, the terminals, the relays and the 7-segment display, but add a new frontpanel PCB and a new backplane PCB. The version with the STM8S103 and MCP23017 closely resembles the original stc-1000, the stm8s105 has lots of features added.

I have no problem making these boards available here, but you also need the specific firmware for it. I have to find out how to do all that in a logical way in Github (hardware boards + firmware). I will probably make a new project (or 2, even better) for this.

radim100 commented 3 years ago

Hi Eduardo , Thanks for your information . Yes , unless we deal directly with manufacturer , there is no guarantee that we get the same HW all the time . I will be following your posts on this repo and looking forward for future addons . Our goal is to make plug in replacement for industrial freezer which already use STC-1000 . So save on cost we were planning to attach ESp8266/ESP32 to existing hw . But we may as well redesign both PCBs and use ESP as main micro .

dnoha commented 2 years ago

Our goal is to make plug in replacement for industrial freezer which already use STC-1000 . So save on cost we were planning to attach ESp8266/ESP32 to existing hw . But we may as well redesign both PCBs and use ESP as main micro .

Any progress about attaching ESP to existing HW?

I also have now one STC with microcontroller behind LCD. No idea what it is, just hoping I can monitor and control over serial port. Hopefully ESP with Tasmota firmware which should just forward commands from mqtt to serial port, and back.