Comments (16)
your schematic has quite a few differences
ntc, ldr, ds1302 all on different pins...
can you scan a better copy of that schematics as pdf or sharper/cleaner jpg? we can add to the docs section of the repo to go along with this "new" model
can you tell me where you got this, or did it have some name?
(I'm trying to think of how to distinguish between the different models... As none of them really seem to have a name, but sometimes use same chip with different layouts, I'm tempted to just call them something unimaginative, like HW_MODEL_A, HW_MODEL_B, etc)
from stc_diyclock.
I created a new branch for testing which tries to consolidate and expose all of the various board dependent settings into one file, hwconfig.h:
https://github.com/zerog2k/stc_diyclock/blob/hwmodels/src/hwconfig.h
then, looking at your schematic, I added your board as HW_MODEL_C (because I'm aware of at least two others prior ;)
I compiled a firmware from this branch with the following options:
make CFLAGS="-D WITH_ALT_LED9 -D WITHOUT_LEDTABLE_RELOC -D HW_MODEL_C"
you can try this out and see if it works for you:
main-HW_MODEL_C.zip
from stc_diyclock.
I bought this from Taobao(Origin of Aliexpress). Its name is DY-020
Here's more crisp schematics (sorry for upside down images..)
After, I upload compiled firmware from you, I notice that LED is also Okay(All of them works normally). However, it shows "1F:7F." and the clock minute doesn't count up after a minute. (F is defined in this sourcecode so it should be F).
from stc_diyclock.
Can you try setting the clock? Maybe the DS1302 has initial junk values (happens if no power and backup battery is dead)? If this is the case, the process of setting the values should clear this out. If not it may be something else. I just double-checked the hwconfig.h for your model (what we will call "HW_MODEL_C" for now) and it looks correct.
from stc_diyclock.
I have another pinout version with STC15F204EA. I figured out the connections, and I will share it. This version has one 4 digit display. I could also change pin definitions in your code.
This one from Aliexpress
But I have the same problem as above.
When I turn on, it displays 1F 7F and it is never changes.
I can change mode with button 2.
Next mode is temperature, and it is works correctly. I can change C display to F with button 1.
Next mode is unknown for me. It displays an empty digit and then -8-
I tried long and short press combinations with both buttons, but I could not set up the clock.
from stc_diyclock.
@vargham I see this has a slightly different 4 digit led module (uses single one rather than several separate led digits) which results in a different scheme required to display properly.
Also other stuff (like ds1302 chip) may have different connections.
Do you have a schematic diagram for this? Likely we need to create another hardware model variant to handle this one. Please open up a new issue so we can track adding support for it.
from stc_diyclock.
may have different connections
Everything have different connection. It is not a problem, I figured out all the connections. Clock, buttons, led segments, everything. The display is OK, I wrote a little test loop inside your main() and it iterates over all symbols. And your program correctly displays the temperature.
Only the clock setting is wrong.
I will draw the schematic and post in a new issue.
I also could fork your repo, commit changes, and you can check them.
from stc_diyclock.
Yes realized that display is working properly if you can see the temperature... Does the kit include schematics? Can you take a good picture or scan and include here? I can abstract any differences in hwconfig.h
from stc_diyclock.
@vargham try this:
update these pin mappings to match your ds1302 connections to stc mcu:
https://github.com/zerog2k/stc_diyclock/blob/master/src/hwconfig.h#L84-L89
(note DS_CE is RST pin on ds1302)
Looking at another schematic on aliexpress, it might be something like:
#define DS_CE P1_2
#define DS_IO P1_1
#define DS_SCLK P1_0
// needed for asm optimizations
#define _DS_IO _P1_1
#define _DS_SCLK _P1_0
from stc_diyclock.
No, there is no schematic. I have to draw.
I can abstract any differences in hwconfig.h
I made changes in hwconfig.h with new HW_MODEL_D. Is this occupied? I can change if needed.
from stc_diyclock.
yeah - i dont think we have really good names for them as there are so many and they are super generic... HW_MODEL_D is fine ;)
from stc_diyclock.
OK, here is the pinout:
01 P2.6 Button2
02 P2.7 Button1
03 P1.0 DS1302 PIN_7 (SCLK)
04 P1.1 DS1302 PIN_5 (DATA I/O)
05 P1.2 DS1302 PIN_6 (CE)
06 P1.3
07 P1.4
08 P1.5
09 P1.6 LDR
10 P1.7 TEMP
11 P0.0
12 VCC
13 P0.1 BUZZER Negative
14 GND
15 P3.0 7SEG_a RX
16 P3.1 7SEG_b TX
17 P3.2 7SEG_c
18 P3.3 7SEG_d
19 P3.4 7SEG_e
20 P3.5 7SEG_f
21 P3.6 7SEG_g
22 P3.7 7SEG_dp
23 P2.0 7SEG_4
24 P2.1 7SEG_3
25 P2.2 7SEG_2
26 P2.3 7SEG_1
27 P2.4
28 P2.5
from stc_diyclock.
I will fork, commit. Discuss the error, and pull request if solved. Is It OK?
from stc_diyclock.
sure... please put some comments in the hwconfig.h about your new HW_MODEL_D (e.g. link from aliexpress, etc), and I'll take a PR if you can test it out ;)
from stc_diyclock.
Here is the issue in the forked repo:
vargham#1
from stc_diyclock.
I probably have schematics and code for that model. Please post a picture of the component side of the circuit board as there are at least three different models. Further differences are that the LED's can be either common cathode or common anode and the display LED is all direct drive (with no current limiting resistors) from the I/O ports so you have to diddle the port STC port configurations to increase the current capability of the I/O. The end result is that you end up with somewhat different digit intensities, depending upon how many segments are illuminated. It's a really down and dirty design but they work and they are more compact in size.
from stc_diyclock.
Related Issues (20)
- "Waiting for MCU, please cycle power" HOT 3
- Maybe new model? Schematic Provided.. HOT 9
- 4 digit display models? HOT 3
- buttons don't work HOT 17
- Website for original maker of these kits
- Need help with make on windows HOT 1
- синхронизация времени с приемником GPS вывод последовательных данных NMEA HOT 8
- Time stops ticking when power is lost HOT 1
- Привет! HOT 3
- Dot-Matrix version? HOT 3
- hourly chime HOT 3
- Weird bevaviour with STC15W408AS HOT 7
- New hardware version from Banggood w/ STC15W408AS? HOT 25
- My kit reset time to 00:00 01-01-2000 each power cycle HOT 2
- barebone firmware HOT 3
- Firmware for clock with voice HOT 3
- Worked for 10 minutes with new chips and then stopped... HOT 3
- Brightness level HOT 7
- Random slow downs. STC15W408AS HOT 2
- Makefile SDCCOPTS HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stc_diyclock.