-
Notifications
You must be signed in to change notification settings - Fork 69
Custom pin support. #20
Comments
your schematic has quite a few differences |
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: 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: |
I bought this from Taobao(Origin of Aliexpress). Its name is DY-020 |
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. |
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. But I have the same problem as above. |
@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. 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. |
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. |
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 |
@vargham try this: Looking at another schematic on aliexpress, it might be something like:
|
No, there is no schematic. I have to draw.
I made changes in hwconfig.h with new HW_MODEL_D. Is this occupied? I can change if needed. |
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 ;) |
OK, here is the pinout:
|
I will fork, commit. Discuss the error, and pull request if solved. Is It OK? |
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 ;) |
Here is the issue in the forked repo: |
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. |
I want to use this firmware because of critical bugs on stock clock kit.
Since this kit is different from banggood varients, I want to modify pin numbers.
However I cannot change A1~A4 pin numbers of this source code because I don't know the way this code works.
Could you tell me the way to change these pins?
(In this schematic, A1-A4 is P3.4-P3.7)
The text was updated successfully, but these errors were encountered: