Go Down

Topic: stc 15f104W data sheet required (Read 7304 times) previous topic - next topic

Tonymura

Hi
Just wanting to know more about this STC 15f104W chip and its funtion if possible.

i have done a google search but little is showing.

Only sellers and manufactures of where they are imported from but i cant seem to get any detail data sheet of the function to this microcontroller.

DrAzzy

#1
Apr 27, 2017, 03:58 am Last Edit: Apr 27, 2017, 06:14 am by DrAzzy
Here's the datasheet if you can get it to load. Their website is agonizingly slow, at least for me (probably faster if you access it from china - I've seen that before) - it never loaded for me. I suspect it's written in chinese, though...

http://stcmcu.com/datasheet/stc/STC-AD-PDF/STC15.pdf

Update: It's in english, if you wait long enough. I've seen worse datasheets. Looks like it's a modernized replacement for a 8051-like micro. ISP programming is overUART (!) and they have GUI tools to do the flashing. Huh.
ATtiny core for 841+1634+828 and x313/x4/x5/x61/x7/x8 series Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts (some assembled), mosfets and awesome prototyping board in my store http://tindie.com/stores/DrAzzy

Tonymura

Hi
Unfortunately this does not load for me.

DragonII

Hi!
Here are a copy: http://zybernic.se/~dragon/STC15.pdf Note, its 26 Mb file.

Sincerley!

avr_fred

#4
Apr 27, 2017, 03:30 pm Last Edit: Apr 27, 2017, 03:38 pm by avr_fred
The link that drAzzy provided does work - it just appears like it doesn't because it links to a 1473 page pdf document in Chinese - which will take quite some time to load.

Are you specifically referring to this board?:



As drAzzy mentioned, the processor is an 8051 clone with 6 I/O, 4k of flash, 128b of ram and 1k of EEPROM. It has a programmable internal programmable clock up to 35mhz with 2 programmable timers. The chips are cheaper than cheap at about $0.17 US in quantity.

These have the 15F104W mounted as well as the USB to serial chip CH340G. I have been unable to find a schematic for this board - as it appears that there are solder pads to configure the board as 3.3v or 5v. That turns out to be a moot point because the 15F104W is a 3.6 to 5.5 volt part. It would have to be re-chipped with a 15L104 to make it a 3.3 volt capable board. No matter though, they work fine right out of the antistatic bag at 5 volts. The bootloader is already on the chip, you just need a loading package which is available from STC as well as an open source version in Python.

An English translation of the datasheet can be downloaded from their website:

STC15-English.pdf

The datasheet is about 11MB so it does take a few minutes to load. Once you have it open in your browser, save it to disk for future reference.

If you need help on how to get started with this board, just ask, I should be able to point you in the right direction.

avr_fred

#5
Apr 27, 2017, 03:33 pm Last Edit: Apr 27, 2017, 03:41 pm by avr_fred
Hi!
Here are a copy: http://zybernic.se/~dragon/STC15.pdf Note, its 26 Mb file.

Sincerley!
That's another useless 100% Chinese version from an unknown source, unless of course you read Mandarin. I reference a 100% English version in my post, direct from the manufactures site.

Tonymura

An English translation of the datasheet can be downloaded from their website:

STC15-English.pdf


Hi
Thank you for that.

That link worked great.

With regards to the board i have a different microcontroller altogether and attached to it is an ESP8266 wifi module that i purchased from ebay that has a relay to this that i am trying to get this to work.

I have yet to be successful in toggling the relay with the correct sketch program.

This is why i have asked about this microcontroller because there is only a few component of the board and was interested to learn more,

With the module removed there isnt much to this like some capacitors resistors, and a 3 to 5 voltage regulator like was mention in this post and that about it

I am hoping to better understand the schematic so to have this relay switching over.

DrAzzy

So where's the STC15 in there? o_o
ATtiny core for 841+1634+828 and x313/x4/x5/x61/x7/x8 series Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts (some assembled), mosfets and awesome prototyping board in my store http://tindie.com/stores/DrAzzy

avr_fred

#8
Apr 28, 2017, 12:04 am Last Edit: Apr 28, 2017, 12:17 am by avr_fred
DrAzzy,

You can see the bottom six pins of the package under the 8266 antenna...

TonyM:

Are you trying to toggle the relay through the ESP8266 via wireless? or have you removed the ESP board and you're just driving the relay from the 15F104W? It't not all clear to me what you're trying to do. If you're trying to toggle the relay over an IP connection, you'll need to know the message format to send to the ESP8266 in order to toggle the relay. That information should be available from the module manufacturer. Please explain what you're attempting to do.

Tonymura

So where's the STC15 in there? o_o
You will get a better view if the ESP8266 wifi module is removed, but here is another picture that you might be able to see it.

Tonymura

#10
Apr 28, 2017, 12:33 am Last Edit: Apr 28, 2017, 12:42 am by Tonymura
DrAzzy,

You can see the bottom six pins of the package under the 8266 antenna...

TonyM:

Are you trying to toggle the relay through the ESP8266 via wireless? or have you removed the ESP board and you're just driving the relay from the 15F104W? It't not all clear to me what you're trying to do. If you're trying to toggle the relay over an IP connection, you'll need to know the message format to send to the ESP8266 in order to toggle the relay. That information should be available from the module manufacturer. Please explain what you're attempting to do.
Ok sorry about this if there has been confusion here but i ddint want to cross post or ask this same question again as this isnt really allowed and my topic can be viewed here https://forum.arduino.cc/index.php?topic=468889.0

In simple terms i want to activate the relays through wifi in my web browers as i plan to use this to control the opening and closing of my sliding gates to my home.
I hope this clarifies matter.

So far all i can do is load the program through a serial to usb cable using the converter that i purchased seperatly the IDE program and the only comands i can get it to do is reduce the rate that the Led on the PCB to blink, and this is about it
It does work wirelessly and connects to my home (modem/router) and i have added an extra line to the blink program as a test trial and it seem to be responding but the onboard relay is doing nothing at this moment.

avr_fred

Sorry, but I'm still not clear as to what you are doing.

1) Which IDE are you using? If Arduino, which version?

2) Do you remove the ESP8266 from the relay board, connect it to your serial<>USB and download directly into the ESP8266 and then re-install?

I suspect that is what you're doing, but I'd like clarification from you before I explain what I think the misunderstanding is.

Tonymura

Hi avr_fred
Yes i do remove the ESP8266 seperatly and connect this to the Serial to USB converter through my pc which power this and loads this program.
Once it is loaded i then reinstall this back on the board.
I would think this is what i am doing wrong.
The IDE is the latest version downloaded form this site.

avr_fred

#13
Apr 28, 2017, 02:20 am Last Edit: Apr 28, 2017, 02:44 am by avr_fred
Ah, now I see said the blind man...

What you've effectively done is render your relay board/ESP8226 unusable. But all is not lost...

The problem occurred when you thought you had to program something with an IDE to get the relay to function. You didn't need to go to that trouble, you bought a ready made solution but due to the way the Chinese eBay sellers work, you didn't really know what you bought. As delivered, that relay board should have worked as-is, you just needed to know what code to send to the ESP8266 to make it turn on and off. This would have been sent from the device attached to the access point that the ESP8266 creates.

The ESP8266 communicates over a serial connection called SPI which is what the 15F104 is there to do. In reality, it isn't needed at all to control one relay but the 15F104 is cheap as dirt in China and well, they use them for lots of things that need a few I/O. So why can't you control the relay? Because it is most likely wired to one of the port pins of the 15F104, not directly to the ESP8266. You can verify this by tracing the circuit for the relay coil, if this is something you're capable of doing (don't know your skill set).

So what I think you've done is break the software connection between the 15F104 and the ESP8266 by re-flashing the latter.

If I had a decent photo of the top and bottom side of just the relay board, I might be able to make out enough detail to say for sure the relay is controlled by the 15F104 and not the 8266 if you can't work out the connection details.

Tonymura

#14
Apr 28, 2017, 03:40 am Last Edit: Apr 28, 2017, 03:47 am by Tonymura
That would be the likely scenario of what you just mention.

Still just having the unit as is and programmed by the manufacture, it wouldn't have helped me out as it did not come with any instructions on how to access the unit for me to input my modem SSID and Wifi password..

The main issue now is how do i write up the code which is in C++ which is nearly impossible for me.

It shouldn't be a very big code or sketch to write up as its just a on and of instruction

As with the relay i am able to trace this back to the microcontroller to confirm that the wiring is connected or I can even if you wish take a detailed close up photo of the PCB front and back and provide you a link for you to view this.
Providing i have permission to PM you the photo images.

Thanks

Tony

Go Up